How to access other database objects from my datab | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to access other database objects from my datab

Hi, I got the database called db1 and created user1 and I also got another database called db2, how can I access the db2 objects from user1? Raj
give access to db2 database for user1. Rajeev Kumar Srivastava
–ALWAYS BE POSITIVE!–
make user1 role as public
Use this sp: sp_grantdbaccess Rajeev Kumar Srivastava
–ALWAYS BE POSITIVE!–
Hi, I could able to user like this also
Select * from db2.user1.TEST
Can i user like this or it will have any problems ?? Raj

ur query looks to be wrong.
Originally posted by gmail Hi, I could able to user like this also Select * from db2.user1.TEST Can i user like this or it will have any problems ??
I think user1 has rights to access db2.
if yes then u can simply do this… use db2
select * from test or else u try…
select * from db2..test

]]>