Ben
Ben

Reputation: 1216

Exception when I try to create Database on my test, using TeamCity for CI

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

Answers (2)

Ben
Ben

Reputation: 1216

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

Upvotes: 1

KF2
KF2

Reputation: 10143

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

Upvotes: 1

Related Questions