Reputation: 1216
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?
Upvotes: 3
Views: 486
Reputation: 1216
I use this script to give administrator permission to [.]\System user (which is team city agent account).
Upvotes: 1
Reputation: 10143
In Enterprise Manager-> Data Base
richt click on master db select Properties
and add your permission
Upvotes: 1