本地负载测试:无法打开负载测试结果数据库 [英] Local Load Testing: The load test results database could not be opened

查看:78
本文介绍了本地负载测试:无法打开负载测试结果数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2012创建一些负载测试.我可以使用无"的StorageType运行测试,但是当我将其更改为数据库"的StorageType时,会出现可怕的错误

I am creating some Load tests using VS2012. I can run the tests using a StorageType of "None", but when I change this to a StorageType of "Database" I get the dreaded error

无法打开负载测试结果数据库.检查 加载由您的连接字符串指定的测试结果数据库 测试控制器(或本地计算机)指定包含以下内容的数据库 负载测试架构,该架构目前可用.欲了解更多 有关信息,请参见Visual Studio帮助主题关于负载测试 结果存储库".连接错误为:时发生错误 尝试创建负载测试结果存储库架构: 创建数据库"LoadTest2010",您的用户帐户必须具有 SQL Server的"sysadmin"角色或"serveradmin"和 "dbcreator"角色

The load test results database could not be opened. Check that the load test results database specified by the connect string for your test controller (or local machine) specifies a database that contains the load test schema and that is currently available. For more information, see the Visual Studio help topic 'About the Load Test Results Store'. The connection error was: An error occurred while attempting to create the load test results repository schema: To create the database 'LoadTest2010' your user account must have the either the SQL Server 'sysadmin' role or both the 'serveradmin' and 'dbcreator' roles

我已经在名为LoadTest的SQL的非本地副本上创建了一个数据库.当我从"SQL跟踪连接字符串"对话框测试连接时,我获得了成功.

I have created a database on a non local copy of SQL called LoadTest. When I test the connection from the SQL Tracing Connect String dialog I get a success.

我创建了一个SQL用户,该用户具有dbcreator,public,serveradmin和sysadmin的服务器角色.该用户具有一个用户映射到LoadTest2010数据库的数据库,该数据库是从VS2012 IDE目录中的loadtestresultsrepository.sql创建的.在数据库上,用户具有数据库角色成员资格db_accessadmin,db_datareader,db_datawriter,db_owner. 在拥有的架构"中,我在db_datareader,db_datawriter,db_owner和db_securityadmin上打了勾,但是现在它们变成了蓝色方框,而不是显示时打勾.

I have created a SQL user that has the Server Roles of dbcreator, public, serveradmin and sysadmin. The user has a User Mapping to the LoadTest2010 database that was created from the loadtestresultsrepository.sql in the VS2012 IDE directory. On the database the user has the Database role memberships db_accessadmin, db_datareader, db_datawriter, db_owner. In the Owned Schemas i ticked on the db_datareader, db_datawriter, db_owner and db_securityadmin howver these have now gone to a blue square instead of a tick when displayed.

那是怎么回事?是Visual Studio尝试创建数据库还是其他问题?

So what's going on? Is Visual studio trying to create the database or is something else the issue?

我没有使用TestControllers或TestAgents,我只是在使用本地运行.

I am not using TestControllers or TestAgents I am simply using a local run.

推荐答案

答案很简单.我是在"SQL跟踪连接字符串"中设置连接字符串,而不是单击负载测试窗口顶部的小管理测试控制器"图标,然后从那里设置连接字符串.

The answer was simple. I was setting up the connection string in the "SQL Tracing Connect String" instead of clicking the little "Manage Test Controller" icon at the top of my load test window and setting up the connection string from there.

现在我要删除一些我在该SQL用户上创建的多余权限:)

Now I'm off to remove some of those superfluous permissions I created on that SQL user :)

SQL连接字符串 NOT 存储在负载测试文件中.该设置似乎是特定于PC的,所以我不得不在构建服务器上进行更改-如图所示,在一个负载测试文件(address.loadtest)中,然后所有其他负载测试都采用相同的连接字符串.

The SQL Connection String is NOT stored in the loadtest files. The setting seems to be PC specific so I had to change it on the build server - in one loadtest file (address.loadtest) as shown, then all the other loadtests adopt the same connection string.

这篇关于本地负载测试:无法打开负载测试结果数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆