Sunday, February 19, 2012

How to access to an another database?

Hello,

I 'm making a procedure that needs to use a table that is in an other database and that database is in an other SQL Server Group. Did you know if is it possible. How can I make this?

Thank you very much for your help and time.

Jonathan.

yes u can do this...add the other server as a linked server to ur server..using sp_addlinkedserver...

then refer the table in other db as

servername.dbname.dbo.tablename

eg. select * from server1.mydb.dbo.table1

|||Thank you very much, Nithin Khurana!!!!

Jonathan

No comments:

Post a Comment