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.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-01-13 : 08:46:11
|
Ramesh writes "Hai, i want to connect to a database say db2 which is in other machine say machine2.i want to query the tables from my database of other database(say db2)Both are sql server databaseCould some one help meThanks in advanceBye" |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-13 : 09:11:29
|
Look for sp_addlinkedserver in BOL, SQL Server help fileMadhivananFailing to plan is Planning to fail |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-01-13 : 10:11:00
|
Once you've made your Linked Server, as Madhi suggests, you can then just do:SELECT *FROM machine2.db2.dbo.RemoteTableNameKristen |
 |
|
|
|
|