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 Administration
 How to give user access to another user
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Niladri20052006
Starting Member

India
4 Posts

Posted - 04/26/2013 :  09:19:59  Show Profile  Reply with Quote
Hi All,

In server I have 2 users (except me). One is ap and another is Masteraccess. Now Masteraccess gets only few tables of CASH Database and ap user does not have any access of CASH database but ap user can access all the table.

it is working for me.

Now in another database AP5 I want to write a query using ap user who does not have the access of CASH table

select * from CASH.dbo.bankoffices but it shows me the error

Msg 916, Level 14, State 1, Line 1
The server principal "ap" is not able to access the database "mcfc_db" under the current security context.

is there way any way so that I can get it resolved

Niladri Sekhar Biswas

James K
Flowing Fount of Yak Knowledge

3657 Posts

Posted - 04/26/2013 :  09:27:32  Show Profile  Reply with Quote
You will need to do one of two things:

1. create a view or stored procedure in the local database to select from the remote table, grant access to that view to the user, and enable cross database ownership chaining.
2. create certificate-based access - I am not very familiar with it, but see TG's post in this thread: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=183685
Go to Top of Page

srimami
Posting Yak Master

160 Posts

Posted - 05/14/2013 :  04:53:30  Show Profile  Reply with Quote
I agree with James!!!

Also, if you are an Admin give read access to ap user from security tab (db_datareader).
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.36 seconds. Powered By: Snitz Forums 2000