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)
 Ownership chain

Author  Topic 

delpiero
Yak Posting Veteran

98 Posts

Posted - 2005-03-07 : 03:41:42
Hi all,

Suppose User1 owns Table1 and Procedure1.

Procedure1 has codes to select only from Table1.

He grants execute permission on Procedure1 to User2.

He does not grant any select privilege on Table1 to User2.

When User2 attempts to execute Procedure1, error prompts that he has no select permission on Table1.

Is that we must also grant the select permission of Table1 to User2? We did not grant the select permission on Table1 for zecurity reasons.

Thanks,
delpiero

nr
SQLTeam MVY

12543 Posts

Posted - 2005-03-07 : 08:46:24
This should have worked. Is the table in the same database ase the sp?
Are you sure the sp and table have the same owner?
Is the table accessed via dynamic sql?


==========================================
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

delpiero
Yak Posting Veteran

98 Posts

Posted - 2005-03-07 : 12:34:55
Oh, the first 2 conditions are met ... i.e., the table and SP are in the same database, and they have the same owner - dbo

however, I think u can say that the SQL is "dynamic", it is stored in a string variable in the SP and finally executed by the exec(@sqlstatement) command

Is this where the problem comes from?

Thanks,
delpiero
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-03-07 : 12:55:24
Yes - it checks the permissions of the user for executed strings.

==========================================
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

delpiero
Yak Posting Veteran

98 Posts

Posted - 2005-03-08 : 00:25:09
Many thanks!

delpiero
Go to Top of Page
   

- Advertisement -