Reputation: 642
I logged into SQL Server 2008 via SQL Server Management Studio using Windows admin account. When I run the command (ALTER LOGIN sa ENABLE
) I get the following error.
Cannot alter the login 'sa', because it does not exist or you do not have permission.
Upvotes: 0
Views: 1780
Reputation: 432421
You account doesn't have permissions. It isn't sysadmin.
CREATE DATABASE requires
Requires CREATE DATABASE, CREATE ANY DATABASE, or ALTER ANY DATABASE permission.
This is (legacy SQL Server 2000 lingo):
If the account is "end user" consider wrapping the call in a stored procedure to hide the permissiosn escalation
Edit, after question update
sa is always sa; you can't disable it as such
You need to grant some permissions to the Windows account using GRANT
Upvotes: 1
Reputation: 5885
Follow the advices in this article: http://blogs.msdn.com/b/dparys/archive/2009/09/17/create-database-permission-denied-in-database-master-my-fix.aspx
EDIT: The whole question changed!
Upvotes: 0