Additional SQL Server features and topics not covered by specific categories
Hi @Chaitanya Kiran ,
Premissions on tables are not checked if the tables and the produre have the same owner. this is called ownership chaining
- A user tries to access an object that makes a reference to another object, such as, the user tries to execute a stored procedure that accesses other objects or a SELECT from a view that accesses other tables.
2.The user has access to the first object
3.Both objects have the same owner
if all of the above conditions are true, ownership chaining occurs
So for User C to call the GetCustomerOrderInfo stored procedure, he needs the GetCustomerOrderInfo execute permission(2)
At the same time, GetCustomerOrderInfo selects data from both Customers and Orders tables, User C needs to check permissions on Customers table, so you need The Select permission on Customers(1)
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.