Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 How to give user access to another user

Author  Topic 

Niladri20052006
Starting Member

4 Posts

Posted - 2013-04-26 : 09:19:59
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
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-04-26 : 09:27:32
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 - 2013-05-14 : 04:53:30
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
   

- Advertisement -