{"id":381,"date":"2011-11-07T08:00:41","date_gmt":"2011-11-07T08:00:41","guid":{"rendered":"http:\/\/emtunc.org\/blog\/?p=381"},"modified":"2013-06-15T13:11:10","modified_gmt":"2013-06-15T12:11:10","slug":"setting-up-a-jmeter-instance-on-the-cloud-to-inject-load-against-microsoft-sql-azure","status":"publish","type":"post","link":"https:\/\/emtunc.org\/blog\/11\/2011\/setting-up-a-jmeter-instance-on-the-cloud-to-inject-load-against-microsoft-sql-azure\/","title":{"rendered":"Setting Up a JMeter Instance on the Cloud to Inject Load Against Microsoft SQL Azure"},"content":{"rendered":"<p>So, you want to set-up load injection capabilities on the Amazon EC2 cloud to throw load against a Microsoft SQL Azure database?<\/p>\n<p>This quick tutorial will show you how to do the following:<\/p>\n<ul>\n<li>Setting up Apache JMeter (version 2.4 as of this post) on the Amazon EC2 Cloud<\/li>\n<li>Setting up appropriate JDBC drivers<\/li>\n<li>Setting the correct connection attributes to be able to successfully connect to the Microsoft SQL Azure database<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2>Setting up Apache JMeter on an Amazon EC2 instance<\/h2>\n<p>The following instructions should work on any EC2 instance. I used a standard Server 2008 R2 x64 AMI.<\/p>\n<p>Firstly, <a title=\"JMeter download page\" href=\"http:\/\/jakarta.apache.org\/site\/downloads\/downloads_jmeter.cgi\" target=\"_blank\">download the JMeter<\/a> file and extract it somewhere local like your C drive.<br \/>\nNext, run the jmeter.bat file located in the \/bin directory.<\/p>\n<p>if you get a \u2018java is not a recognised\u2019 error or something similar, make sure you have the latest <a title=\"JDK information page\" href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\" target=\"_blank\">JDK<\/a> installed. You may also need to add the JDK bin directory to the Windows environmental paths (this was not automatically done on the instance I was setting up)<\/p>\n<h2>Setting up the appropriate JDBC drivers<\/h2>\n<p>For JMeter to be able to connect to a Microsoft SQL Azure database, you need to provide JMeter the correct JDBC drivers (which are quite specific) to work with.<\/p>\n<p>The JDBC driver you need is provided directly by Microsoft. You can download the <em>Microsoft JDBC Driver 3.0 for SQL Server and SQL Azure<\/em> from <a title=\"Microsoft JDBC driver download page\" href=\"http:\/\/www.microsoft.com\/download\/en\/details.aspx?displaylang=en&amp;id=19847\" target=\"_blank\">here<\/a>.<\/p>\n<p>After you have downloaded the JDBC driver package, extract it and place the files named below in the <strong>JMeter\/lib<\/strong> directory (make sure you retrieve the files relevant to the instance architecture\u2026 i.e., 32bit vs. 64bit):<\/p>\n<ul>\n<li>sqljdbc4.jar (found in the \u2018<em>Microsoft SQL Server JDBC Driver 3.0\\sqljdbc_3.0\\enu<\/em>\u2018 directory<em>)<\/em><\/li>\n<li>sqljdbc_auth.dll (found in the \u2018<em>Microsoft SQL Server JDBC Driver 3.0\\sqljdbc_3.0\\enu\\auth<\/em>\u2018 directory)<\/li>\n<li>sqljdbc_xa.dll (found in the \u2018<em>Microsoft SQL Server JDBC Driver 3.0\\sqljdbc_3.0\\enu\\xa<\/em>\u2018 directory)<\/li>\n<\/ul>\n<p>Rename sqljdbc4.jar to sqljdbc.jar so that JMeter will recognise it as a JDBC driver.<\/p>\n<p>That should be all!<\/p>\n<h2>Setting up the connection attributes<\/h2>\n<p>Once you have set-up JMeter and successfully installed the JDBC drivers for SQL Azure connectivity, you are ready to set-up the connection strings in JMeter for connectivity.<\/p>\n<p>The below configuration is used in the JMeter \u2018<em>JDBC Connection Configuration<\/em>\u2018 configuration element; these are the settings JMeter will use to connect to your SQL Azure database.<\/p>\n<p>Database URL: <strong>jdbc:sqlserver:\/\/&lt;serverName&gt;.database.windows.net;databaseName=&lt;databaseName&gt;<\/strong><\/p>\n<p>JDBC Driver class: <strong>com.microsoft.sqlserver.jdbc.SQLServerDriver<\/strong><\/p>\n<p>Username: username@serverName<\/p>\n<p>Password: yourPassword<\/p>\n<p>That should be it\u2026 you should now be able to successfully connect and inject load to your SQL Azure database <img decoding=\"async\" alt=\":)\" src=\"http:\/\/s0.wp.com\/wp-includes\/images\/smilies\/icon_smile.gif?m=1306902123g\" \/><\/p>\n<p>This article was written by me on the Capacitas\u00a9 <a title=\"Capacitas Blog\" href=\"http:\/\/www.capacitas.wordpress.com\" target=\"_blank\">Blog<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, you want to set-up load injection capabilities on the Amazon EC2 cloud to throw load against a Microsoft SQL Azure database? This quick tutorial will show you how to do the following: Setting up Apache JMeter (version 2.4 as of this post) on the Amazon EC2 Cloud Setting up appropriate JDBC drivers Setting the [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[1],"tags":[15,58,57,16,52,53],"class_list":["post-381","post","type-post","status-publish","format-standard","hentry","category-tech","tag-aws","tag-azure","tag-cloud","tag-ec2","tag-jmeter","tag-performance-testing"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1trTO-69","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/comments?post=381"}],"version-history":[{"count":2,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/381\/revisions"}],"predecessor-version":[{"id":908,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/381\/revisions\/908"}],"wp:attachment":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/media?parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/categories?post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/tags?post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}