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 2005 Forums
 SQL Server Administration (2005)
 Restrict Access To Database To A Specified Login

Author  Topic 

Adel99
Starting Member

7 Posts

Posted - 2009-12-19 : 01:45:20

Hello,
I have hard time understanding SQL Server Login, User, Role, Schema… etc.

What I want:
Restrict access to my database to a specified login only. Say my database name is 'AC' and my login is 'Adel'; Adel only can access the database AC, and all other logins can NOT access it (including sa, administrators, guest, built in logins… etc. all must NOT be able to access it) even through Management Studio or whatever. No login or user should access the database 'AC' except the login 'Adel'. This must not affect other logins' access to other databases on the same server.

Details:
I'm deploying a .Net Windows Forms Application in which I use SQL Server 2005 Express Edition. My client already has a Windows Server 2003 server with some databases. I have nothing to do with these databases; it's not my business; other applications and websites are using them, so I should not affect them.
What I am going to do when deploying to my client is:
1- Make a new login named 'Adel' and password-protect it.
2- Create my database 'AC'.
3- Assign it to Adel only (how?)

Can you help me?
Thank you in advance.
Adel,


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-19 : 11:06:15
Well sa and other sysadmins will always have access to all databases, so you can't restrict them. You can only restrict other accounts by only providing access to the Adel account.

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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Adel99
Starting Member

7 Posts

Posted - 2009-12-19 : 16:57:54
quote:
Originally posted by tkizer

Well sa and other sysadmins will always have access to all databases, so you can't restrict them. You can only restrict other accounts by only providing access to the Adel account.

Thank you very much for you helpful reply.
That is sad.

Adel,
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-19 : 18:27:05
You should encrypt your data if you don't want sysadmins looking at it.

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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Adel99
Starting Member

7 Posts

Posted - 2009-12-20 : 14:33:59
quote:
Originally posted by tkizer

You should encrypt your data if you don't want sysadmins looking at it.

Actually, I do not care about the data. It's theirs. What I do not want them to know is the table structure. Using the table structure, they can figure out the system analysis.
Although I'm a beginner developer, my application addresses a field that is not much addressed. I do not want them to know anything about how I managed to do it. I do not have any marketing team helping me, this is my weak point. So, I thought "To Be Unique" was my only way to success.

Again, thank you so much for your advice.
Adel,
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-20 : 16:55:43
You can sort of hide your schema by renaming all of your objects: tables, columns, ...

We purchased a system that made everything generic, so it was impossible to figure out what was going due to the thousands of objects. Here's an example: Table1 with Thing1, Thing2, Thing3, ... as column names.

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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Adel99
Starting Member

7 Posts

Posted - 2009-12-21 : 09:08:51
Really thank you for helping me. I'm speechless.

I did not get your point.
Do you mean that I should have named my columns meaningless names, and written extra code in my application to make the needed translation.

Or, do you mean that I name my columns meaningful names, and there is a tool that intervenes with SQL Server to hide schema and to get the job done for me when I query.

Sorry but this is totally new for me, and I really need it.

Thank you so much.
Adel,
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-21 : 11:18:20
There is no tool in SQL Server to hide the schema, so the vendor that wrote the product we purchased probably started out with normal object names and then at release time did a switcheroo using some custom script. I can only assume though.

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

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

Adel99
Starting Member

7 Posts

Posted - 2009-12-21 : 14:31:00
Thank you. I appreciate your help. I totally understood your points.

Adel,
Go to Top of Page
   

- Advertisement -