Friday, February 24, 2012

Allowing users access to their DB only?

Hey all.
I'm trying to set up SQL Server so that people with Enterprise Mgr can create a DB registration to their DB only (sql.yoursite.com). Are there any tutorials out there for doing this?
Thanks for the help!If they connect using SQL authentication, I'm pretty sure that they'll only see the databases that they can access.

-PatP|||Thanks for the info. Part of the problem is keeping users from creating a registration to the main SQL server na dlet them only get to their DB. In a shared hosting environment, you definately don't want people seeing all the DBs availble.|||There aren't any tutorials that I'm aware of. The problem with this is that you have to be a security administrator to add a user. My suggestion would be to put a procedure in your model database that allows people to add a user.

It would insert this user, the database name, and a datetime into a "utility database". You could have a job running on the server that hits that table every 15 minutes and adds users.

If you want to get fancy, you can have the stored procedure/form have different permission levels also, so they can have more granular control over what they let their users do. Although if you have this, you will want to have the ability to edit them also.

They would just have to know they need to wait 15 minutes or so after adding a new user for it to take effect.

No comments:

Post a Comment