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 2000 Forums
 SQL Server Administration (2000)
 Need User Permissions on Tables

Author  Topic 

Dushyanth_v
Starting Member

2 Posts

Posted - 2006-04-18 : 10:57:50
Hi All,

I need a script in sql server 2000, which gives the user permissions on tables in a database.

Thanks
Dushyanth

nr
SQLTeam MVY

12543 Posts

Posted - 2006-04-18 : 11:42:30
select 'grant select on ' + name + ' to username'
from sysobjects where xtype = 'U'

then run the result.
Better to give permissions to a role then all you have to do is add the user to the role.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Dushyanth_v
Starting Member

2 Posts

Posted - 2006-04-18 : 12:08:45
I already have the premissions given to the user. I need to retrive the data , like which permissions I have granted to the user in the database.

Dushyanth
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-04-18 : 21:43:57
sp_helprotect

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -