Original address: http://www.cnblogs.com/chenxizhang/archive/2009/06/01/1493939.html
In the original text see: http://msdn.microsoft.com/zh-cn/library/ms182600 (vs.80). aspx
The results of the load test are stored in a SQL database. This SQL database is called the load test Results store. This database can be either local (usually using SQL Express) or remote (using any SQL version). After you create the database schema, you can save the load test results to that database.
Attention
This applies only to load tests. For information about saving other test types, see saving and publishing test results.
One option is to create a database table on the local server running SQL Express. For the local load test Results store, you only need to run the script once to use it as the global setting for all load tests.
For the controller, Setup creates a default SQL Express local instance and load test Results store and configures it for use by the controller. For any setup program that does not use a rig, the database is created the first time that you run the load test. If you want to use a database on a more powerful SQL Server, you need to configure a different result store separately. You can later mine data that is mined by other users. For more information, see How to: Run Tests on a Rig.
Set up a computer running SQL Express
Open the Visual Studio command prompt. Type the following text:
CD n:\Program Files\Microsoft Visual Studio 8\Common7\IDE
"If it is VS2008, then C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE"
Type the following text in the folder above:
sqlcmd/s localhost\sqlexpress/i Loadtestresultsrepository.sql
Warning
Parameters are case-sensitive. You must type the uppercase S and lowercase i.
You can also choose to install the database on any existing SQL server. For example, if you have a SQL server named ContosoServer1 , you can use the following command:
SQLCMD/S contososerver1-i Loadtestresultsrepository.sql
Warning
Parameters are case-sensitive. You must type the uppercase S and lowercase i.
You may also need to specify a user name and password so that you can connect to ContosoServer1. In this case, you should use the following command:
SQLCMD/S contososerver1-u < user name >-p < password >-I loadtestresultsrepository.sql
Warning
Parameters are case-sensitive. You must type the uppercase S, U, and P, as well as the lowercase i.
On the Test menu, click Manage Test Controllers. The Manage Test Controller dialog box is displayed.
In the Load test results connection string, click the browse button (...) to display the Connection Properties dialog box.
Attention
If you change the connection string for a controller, you must select the appropriate controller.
In server name, type localhost\sqlexpress or the name of the server you are using in step 2nd (for example, ContosoServer1).
Under Log on to the server, select Use Windows authentication.
Under Connect to database, select Select or enter a database name. Select "LoadTest" from the drop-down list box.
Click OK.
In the Manage Test Controllers dialog box, click Close.
VSTS load test--How to: Create a result store using SQL