SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Privileges
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Christech82
Starting Member

Hungary
20 Posts

Posted - 04/26/2013 :  16:06:47  Show Profile  Reply with Quote
Hi there
I have question regarding granting privileges to some one int he company
as I have a receptionist and would like to grant her /him privilege on some tables I hold. The receptionist clients details, videos details,
contract Details. How do I do that in theory.

James K
Flowing Fount of Yak Knowledge

3589 Posts

Posted - 04/26/2013 :  16:51:45  Show Profile  Reply with Quote
There are different ways in which you could give permissions to a user to access a set of securables.

One way would be simply grant permissions to that user. So you would do something like
GRANT SELECT ON YourTableName TO TheUserName

http://msdn.microsoft.com/en-us/library/ms187965.aspx

But that probably is not the best and most maintainable way to do it. What you should ideally do is to create a new role (or all administrative assistants, for example). Then, grant privileges to the role and add the user to that role.

Another alternative is to use an active directory group. You would have an administrative assistants group who would be a user on the database. You will grant permissions to the group.
Go to Top of Page

Christech82
Starting Member

Hungary
20 Posts

Posted - 04/26/2013 :  17:20:49  Show Profile  Reply with Quote
quote:
Originally posted by James K

There are different ways in which you could give permissions to a user to access a set of securables.

One way would be simply grant permissions to that user. So you would do something like
GRANT SELECT ON YourTableName TO TheUserName

http://msdn.microsoft.com/en-us/library/ms187965.aspx

But that probably is not the best and most maintainable way to do it. What you should ideally do is to create a new role (or all administrative assistants, for example). Then, grant privileges to the role and add the user to that role.

Another alternative is to use an active directory group. You would have an administrative assistants group who would be a user on the database. You will grant permissions to the group.





Thank you for answering

If I wanted to create a new role for admin assistance for example, what are kind of privileges(besides select, insert, alter) can he/she get in the system?


Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3589 Posts

Posted - 04/26/2013 :  17:28:47  Show Profile  Reply with Quote
If you don't grant the user/role any other privileges they won't have any other privileges. I am saying that in a loose sense. They will be, for example, able to see what databases are on the server (even though they won't be able to access any data or look at the schema of any other database).

The kinds of privileges that you can grant are listed here: http://msdn.microsoft.com/en-us/library/ms187965.aspx In SQL Server nomenclature, those are securables. SQL Server uses the concept of securables and principals. Principals are granted permissions on securables. The picture on this page explains it better than I can: http://msdn.microsoft.com/en-us/library/ms191465.aspx
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000