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
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.
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
8. Click to the query window and select the new LoadTest2010 database
9. Add BEGIN statement to the first line, you deleted that in step 6
10. Go to the end of the SQL script and comment-out or delete these lines
11. Search this piece of code an comment-out the lines. Make sure that one closing bracket remains
12. Find this piece of code an comment-out the two lines for EXEC sp_addmessage
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
15. In Visual Studio create the connection to the new database, click menu Load Test/Manage Test Controllers… and start configuration
16. Enter the name of the SQL Server (1), the access credentials (2) and test the connection (3), fingers crossed (4)
17. If you see this, you’re done
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.