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 3313698
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:08:44+00:00 2026-05-17T22:08:44+00:00

I have two databases on the same SQL Server: Database A table 1 table

  • 0

I have two databases on the same SQL Server:

Database A

  • table 1
  • table 2
  • sproc x

Database B

  • table 3
  • table 4
  • sproc y
  • sproc z

I want to give user1 access to the database, but only through the EXECUTE permission on the sprocs.

  • sproc x does a join between table 1 &
    2, and user1 can execute.
  • sproc y does a join between tables 3
    & 4, and user1 can execute.
  • sproc z does a join between tables 1
    & 4, and user1 is unable to execute,
    unless I grant SELECT permission to
    table 1. Why is this?

I do not want to grant select permission, because this breaks the security model of “only access the database through sprocs”

  • 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-17T22:08:45+00:00Added an answer on May 17, 2026 at 10:08 pm

    You may need to enable cross database ownership chaining for both databases.

    To see if it’s enabled:

    select name, is_db_chaining_on
        from sys.databases
    

    To enable the setting:

    EXEC sp_dboption 'DatabaseA', 'db_chaining', 'true';
    GO
    
    EXEC sp_dboption 'DatabaseB', 'db_chaining', 'true';
    GO
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two SQL Server (2000) databases. Both are used for the same project,
I have a table and two databases which have the same table, but one
I have two databases with same structure in MS SQL server. I'd like to
I have two databases called DB1 and DB2 on the same database server. I
Using SQL Server 2008 (R2). I have two tables in different databases (with same
I have two tables CrossDBTrigTest_1 and CrossDBTrigTest_2 on same SQL Server instance. The databases
I have two databases at two different places, both databases are same with table
I have two SQL Server 2008 Enterprise databases (on two machines), and one of
In SQL Server 2008, I have my parent table in one database, and the
I have two databases, one MySQL 5, one SQL Server 2000. I've got the

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.