3

In one of my test I need to create a SQL Express database and then populate it.

It's run fine on my machine but when TeamCity tries to run the very same test it throws the following exception:

Test(s) failed. System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----> System.Data.SqlClient.SqlException : CREATE DATABASE permission denied in database 'master'.

What could be causing this?

4

2 回答 2

1

In Enterprise Manager-> Data Basericht click on master db select Properties and add your permission

于 2013-05-09T12:07:54.887 回答
1

I use this script to give administrator permission to [.]\System user (which is team city agent account).

于 2013-05-10T15:13:10.513 回答