SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Permission for synonyms and SP
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lucsky8
Posting Yak Master

102 Posts

Posted - 03/14/2013 :  09:33:35  Show Profile  Reply with Quote
Hi,

If we have synonyms and i create a stored procedure.
Do we need give read permission for the synonyms or just to SP?

Tks
Luc

TG
Flowing Fount of Yak Knowledge

USA
6059 Posts

Posted - 03/14/2013 :  14:21:59  Show Profile  Reply with Quote
if the synonym, underlying table, and stored procedure are all in the same database then all you need is EXEC on the SP (assuming you are not using dynamic sql).

However if they are all not in the same database then the user needs explicit permissions to all the referenced remote objects whether that is a direct referernce (table reference) or indirect reference (table reference via synonym).

Be One with the Optimizer
TG
Go to Top of Page

lucsky8
Posting Yak Master

102 Posts

Posted - 03/14/2013 :  14:30:47  Show Profile  Reply with Quote
Tks for the fast response!

quote:
Originally posted by TG

if the synonym, underlying table, and stored procedure are all in the same database then all you need is EXEC on the SP (assuming you are not using dynamic sql).

However if they are all not in the same database then the user needs explicit permissions to all the referenced remote objects whether that is a direct referernce (table reference) or indirect reference (table reference via synonym).

Be One with the Optimizer
TG

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000