Monday, November 26, 2012

VS 2010 Test Controller / SQL Server 2012 - Could not find stored procedure 'sp_dboption'

While configuring VS 2010 Test Controller with SQL Server 2012 as Load Test Repository, I was getting an error:

Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateAndUpgradeLoadTestSchemaIfRequired(String loadTestConnectionString, String directoryContainingSchemaFile)
E, 2012/11/26, 09:35:41.787, Microsoft.VisualStudio.TestTools.WebStress.LoadTestException: An error occurred while attempting to create the load test results repository schema: Could not find stored procedure 'sp_dboption'.
Could not find stored procedure 'sp_dboption'.

Found the same issue when I tried to create the Load Test Repository manually by executing the script C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\loadtestresultsrepository.sql

Then I looked for the corresponding VS 2012 script on a different machine at C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\loadtestresultsrepository.sql which worked.

Looking at the difference, the fix was to replace exec sp_dboption with ALTER DATABASE


Replace exec sp_dboption N'LoadTest2010', N'autoclose', N'false' with ALTER DATABASE [LoadTest2010] SET AUTO_CLOSE OFF

1 comment:

  1. I just manually created the database through SQL Server Management Studio, that resolved the issue.