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.
Author |
Topic |
thanvi
Starting Member
11 Posts |
Posted - 2007-10-31 : 12:39:12
|
Hello All,I have a stored procedure SPROC in Database A and I have Database B which has user1 that need execute permission on SPROC.Also, database A and B are on different servers.How should I go about granting him execute permission?Thanks in advance.Regards,Thanvi |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-10-31 : 13:07:03
|
GRANT EXEC ON <proc> to <userName>Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
thanvi
Starting Member
11 Posts |
Posted - 2007-10-31 : 13:19:23
|
I have tried the follwoing grant statements and they didnt work.GRANT EXEC ON <proc> to <userName>GRANT EXEC ON <proc> to <servername>.<userName> |
 |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-10-31 : 13:36:11
|
What is the error msg you get when the user tries to execute the proc?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
thanvi
Starting Member
11 Posts |
Posted - 2007-10-31 : 13:42:37
|
I created a user account with the same name on Database A and I am able to execute now.Thanks for you help Dinakar. |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-10-31 : 13:47:15
|
Better to create a role, give the role permission then add the user to the role.You can then give other users the same permissions by adding them 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. |
 |
|
|
|
|