August 21, 2010 at 7:08 pm
anybody does plzzz..sennd the code!!!!!!
August 21, 2010 at 11:26 pm
I generally create the query dynamically and execute IT there after
Use DBName
SELECT 'GRANT EXECUTE ON <OBJECTNAME > TO ' + NAME FROM SYSUSERS
Hope this helps
August 22, 2010 at 10:33 am
jude.pieries (8/21/2010)
SELECT 'GRANT EXECUTE ON <OBJECTNAME > TO ' + NAME FROM SYSUSERS
sysusers is deprecated, should not be used for new development and will be removed in a future version of SQL. It is only included for backward compatibility with SQL 2000.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 22, 2010 at 12:03 pm
use the following syntax
GRANT <permission>, <permission>, ... ON OBJECT::dbo.mytable
TO [user1], [user2], [user3], ..........
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
August 22, 2010 at 11:46 pm
You can try syntax in following pattern:
GRANT <permission> on <Object Name> to <User Name1>, <User Name2>..... <User Name n>
example:
grant select on test to SQLVillage,SQLVillage_Reader
P.S. Realized little later that Perry Whittle has already answered
[font="Verdana"]--www.sqlvillage.com[/size][/font]
August 24, 2010 at 10:41 am
I would make a database role, add users to the role and assign the permissions to the role.
You assign the permissions only once and you can add or delete users as needed from the role.
Steve
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply