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
 General SQL Server Forums
 New to SQL Server Administration
 set a password to the database

Author  Topic 

sirwan.net
Starting Member

5 Posts

Posted - 2011-12-13 : 14:23:53
hi all
is there any way to set a password to the database
so even the "sa" user can't open that database with out the password

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-13 : 14:25:59
No, a sysadmin can always get in. Encrypt your data and stored procedure code if you don't want the sysadmin to be able to read it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sirwan.net
Starting Member

5 Posts

Posted - 2011-12-13 : 14:33:32
thank you tkizer ...... but
encryption couse a big over head with big tables , and also dont prevent deleting issue
....
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-13 : 14:36:46
Then make sure you hire trusted sysadmins.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sirwan.net
Starting Member

5 Posts

Posted - 2011-12-13 : 14:38:55
well , can i prevent the windows authentication for sa and set it to sql server authentication only ????
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-12-13 : 14:46:19
You can't remove windows authentication as it's required by SQL Server, but you can limit who has sysadmin access. You can start by removing sysadmin access for builtin\administrators group (already done for you if using 2008+). You can even disable the sa account. But someone or a group of people will need sysadmin access to administer the SQL Server. Whoever that someone is or that group is will be able to get into your database.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sirwan.net
Starting Member

5 Posts

Posted - 2011-12-13 : 14:59:12
actually i don't get it ....... is there a pdf file or a web site that describe these steps one by one ... ^_^
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-12-13 : 17:18:40
That said, you cannot prevent a windows administrator from getting access if he wants. You can slow them down, but that's all. Anyone with local administrator access to the server can get full access to the database engine if they want.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sirwan.net
Starting Member

5 Posts

Posted - 2011-12-14 : 10:34:17
ok then , all administrator users can access sql server manager and access any database they want ,
but the local standard users also can access sql server manager ( by windows authentication ) and access any database they want ,
is there any way to make windows authentication access exclusive to local administrator users ???
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-12-14 : 11:00:34
Local standard users can only access the DB via Windows authentication if their windows accounts have been granted login rights or if a group they are a member of has been granted login rights. By default they certainly can't get access to SQL at all, much less to any database on the server.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -