Deploy LoadTest2010 Database to Azure SQL

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

Author : Holger Schmidt

 

Purpose

The SQL script loadtestresultsrepository.sql is part of the Visual Studio software and is in the directory …\Common7\IDE. Use the search function of the file explorer to locate the file.

This SQL script can run against a local or on-premise installation of any version of SQL Server (Express, Developer, Enterprise, etc.) but not against an Azure SQL Server. The SQL script is incompatible to Azure SQL.

The blog describes the steps to create a LoadTest2010 database on an Azure SQL server.

 

Prerequisites

Make sure that you can access an Azure SQL Server and you have valid credentials to connect to this server. You need a running instance of SQL Server Management Studio (SSMS). You need the SQL script loadtestresultsrepository.sql on your disk.

 

Steps to create the LoadTest2010 DB

1. Start SSMS and connect to your existing SQL Server

2. Open a new Query Window and make sure that it’s using master database

May1.jpg

 

3. Copy the content of the file loadtestresultsrepository.sql to the new query window. In my sample I name the database LoadTest2010Tmp because I still have a LoadTest2010 DB which I don’t want to change for this documentation.

4. Comment out or delete these four lines and add an END statement after the last ALTER DATABASE statement.

 

May2.jpg

5. Mark all form the beginning until the newly entered END statement and execute it, lay back and enjoy database creation, it takes some minutes.

6. Delete the marked section from beginning to the newly entered END statement

7. Refresh the object explorer and find the new LoadTest2010 database that has been created

 

May3.jpg

8. Click to the query window and select the new LoadTest2010 database

 

May4.jpg

9. Add BEGIN statement to the first line, you deleted that in step 6

 

May5.jpg

10. Go to the end of the SQL script and comment-out or delete these lines

 

May6.jpg

11. Search this piece of code an comment-out the lines. Make sure that one closing bracket remains

 

May7.jpg

12. Find this piece of code an comment-out the two lines for EXEC sp_addmessage

 

May8.jpg

13. Run the SQL query, lay back and enjoy

14. Refresh the database view and see all the new fantastic tables in the new LoadTest2010 database

 

May9.jpg

15. In Visual Studio create the connection to the new database, click menu Load Test/Manage Test Controllers… and start configuration

 

May10.jpg

16. Enter the name of the SQL Server (1), the access credentials (2) and test the connection (3), fingers crossed (4)

 

May11.jpg

17. If you see this, you’re done

 

May12.jpg

18. Adapt the pricing tier of your new LoadTest2010 database in Azure portal if applicable. We’re running heavy load tests with up to 40k simulated devices with a S3 database.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.