Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 318755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:35:56+00:00 2026-05-12T08:35:56+00:00

I see from BOL that you can apply permissions to a T-SQL synonym, but

  • 0

I see from BOL that you can apply permissions to a T-SQL synonym, but in playing around with synonyms I’m not clear when you would need to do that if you have already GRANTed permissions to the base object.

eg. If I have a synonym in database A that points to a table FRED in database B, then it appears that as long as user Joe is granted SELECT on [Fred].[B] then Joe can do SELECT * FROM [Fred].[B].

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:35:56+00:00Added an answer on May 12, 2026 at 8:35 am

    Using Synonyms (Database Engine)

    The following permission statements
    are associated only with the synonym
    and not the base object: (then mentions GRANT, REVOKE; DENY)

    After that, ownership chaining applies.

    When an object is accessed through a
    chain, SQL Server first compares the
    owner of the object to the owner of
    the calling object. This is the
    previous link in the chain. If both
    objects have the same owner,
    permissions on the referenced object
    are not evaluated.

    CREATE SYNONYM dbo.FooBar FOR dbo.MyBaseProc
    GO
    GRANT EXECUTE ON dbo.FooBar TO MyUser
    GO
    REVOKE EXECUTE ON dbo.MyBaseProc TO MyUser
    GO
    EXEC AS USER = 'MyUser'
    GO
    PRINT '1'
    EXEC dbo.MyBaseProc --fail
    GO
    PRINT '2'
    EXEC dbo.bob    --pass
    GO
    REVERT
    GO
    
    
    DENY EXECUTE ON dbo.MyBaseProc TO MyUser
    GO
    PRINT '3'
    EXEC AS USER = 'MyUser'
    GO
    EXEC dbo.bob    --pass, 'coz DENY aint checked...
    GO
    REVERT
    GO
    

    Edit: I hope I’ve answered your question…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As you can see from the title that code not working in IE but
I have a setup a SQL Server instance that I can see from all
GUI i am trying to use JSpinner but as you can see from the
I tried to echo the following html, I can see from firebug that the
I can see from the jqGrid JSON data being posted to the browser that
As you can see from my sql statement i am pulling a column called
I've got some code for stitching images together, but as you can see from
As you can see from the following array, there are three elements that appear
As you can see from above that the Category3 should be below SubCat's List,
I've got a large form and I can see from firebug that all of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.