Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Deny 'sa' from acessing a DB

Author  Topic 

aspnet25
Starting Member

5 Posts

Posted - 2012-02-09 : 12:48:21
I have created another login 'TestAdmin' with sysadmin role. Now I want only the 'TestAdmin' (and not 'sa') to access a DB that I've created.

I logged in with 'TestAdmin' and tried to change 'sa' to public, removed sysadmin role. And when I try to save it I'm geting an error.

"Cannot use the principal 'sa'".

How can I change the permission on sa?

Thnaks!!

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-02-09 : 13:04:56
you can't. sa is sa and will be sa forever


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2012-02-09 : 13:40:12
You can change the password on sa to a very long random strong password - and don't let anyone else know what it is.
Go to Top of Page

aspnet25
Starting Member

5 Posts

Posted - 2012-02-09 : 14:01:05
Thanks webfred and jeffw8713.

Go to Top of Page

Peter99
Constraint Violating Yak Guru

498 Posts

Posted - 2012-02-09 : 15:08:32
Disable sa.
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2012-02-10 : 12:49:43
The recommended practice is to disable sa or rename it.

After Monday and Tuesday even the calendar says W T F ....
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2012-02-12 : 11:12:54
quote:
Originally posted by Sachin.Nand

The recommended practice is to disable sa or rename it.

After Monday and Tuesday even the calendar says W T F ....



Be careful with renaming sa - that could cause a future upgrade to fail. If you rename it, make sure you rename it back before you apply any service packs or patches.
Go to Top of Page
   

- Advertisement -