Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Read only and access to specific databases objects


Read only and access to specific databases objects

Author
Message
sadanand0
sadanand0
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 9
Hi,

Solution required on...............


Can we give specific objects (i.e. Tabel, View, Procedure etc....) access to a user in SQL Server 2005?
If yes then How?

I do not I want windows based authentication, I need SQL Server Authentication.

If a user has got access to table1, table2 as read only rights then I need whenever he/she loggin in database using SSMS, he/she should see only table1, table2 rest other objects should not be displayed to him/her. OR he/she can only be able to SELECT on table1, table2.


Thanks in advance,


Regards
Sadanand
danfinuc
danfinuc
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 419
Probably want to create a view so that they are limited to the tables you specify...then you could create a new database roll add the user to the role and select the appropriate tables/views/objects what have you that your user needs select permission for. Make sense?
Carl Federl
Carl Federl
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2334 Visits: 4349
For a user, SSMS will only list those objects where there is some privilege on that object.

Recommend is to create a database role, grant/deny privileges to the database role and then assign database users to the database role.

SQL = Scarcely Qualifies as a Language
oded.raz
oded.raz
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 31
Use grant / revoke statements to control specific access writes.

CREATE ROLE SELECT_ONLY;

GRANT SELECT ON TABLE1,TABLE2 TO SELECT_ONLY;

EXEC sp_addrolemember 'SELECT_ONLY', 'USER1';
EXEC sp_addrolemember 'SELECT_ONLY', 'USER2';

Oded
www.dbsnaps.com
www.orbiumsoftware.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search