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 |
|
hnomani
Starting Member
35 Posts |
Posted - 2004-12-27 : 17:49:20
|
| I am trying to establish connection from Server_A to Server_B using T-SQL. My process is currently connected to Server_A and I would like to connect/disconnect to Server_B from my T-SQL Script. Is it possible to do such a thing, please advice me if you have any other suggestions?LINK server does not fulfill all my reqirements.ThanksHaseeb |
|
|
chadmat
The Chadinator
1974 Posts |
Posted - 2004-12-27 : 18:01:41
|
| What requirements are not fulfilled by a linked server? -Chadhttp://www.clrsoft.comSoftware built for the Common Language Runtime. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-12-27 : 18:02:05
|
| Haseeb, you will need to use a linked server or OPENROWSET. You can find out the syntax and how to setup both in Books Online. Just go to the index tab. Type in linked server or OPENROWSET. If you need help after the initial try, let us know. Books Online is included with SQL Server free. Start/All Programs/Microsoft SQL Server/Books Online.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
hnomani
Starting Member
35 Posts |
Posted - 2004-12-27 : 18:10:57
|
| Thanks, I am trying to Create a table (Push) on Server_B from Server_A and the link server gives me the following error message,Connected: Server_Aselect *into Server_B.pubs.dbo.table1from pubs.dbo.table1goThe object name 'Server_B.pubs.dbo.' contains more than the maximum number of prefixes. The maximum is 2. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-12-27 : 18:42:50
|
| You can't use a linked server for a SELECT INTO. You would need to run that command on the other server.select *into pubs.dbo.table1from server_a.dbo.table1goYou could also do a regular insert.INSERT server_b.pubs.dbo.table(col1)select col1from pubs.dbo.table1MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
vsanthosaraj
Starting Member
2 Posts |
Posted - 2005-01-10 : 09:21:21
|
| Hiuse sp_addlinkedserver with ipaddress instead of nameex. sp_addlinkedserver [132.147.160.100]select * from [132.147.160.100].db.dbo.table-Victor santhosaraj |
 |
|
|
|
|
|