Jim
Jim

Reputation: 1735

Permission Denied Accessing SQL Server Master Database from Windows Service

I have a Windows Service (running as Local System) and it needs to create/drop a database in the local SQL Server Express 2012. Doing so yields an error message:

"CREATE DATABASE permission denied in database 'master'."

I can connect to the instance as a local administrator and create/drop databases. Doesn't Local System have sysadmin permission on the local SQL Server? If not, how do I grant it permission?

Upvotes: 1

Views: 1509

Answers (1)

Jim
Jim

Reputation: 1735

Turned out Local System is not in the sysadmin group (only in the public group).

Upvotes: 1

Related Questions