Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: copying dat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 10 Topic 10986 of 11431
Post > Topic >>

Re: copying data from one server to another

by "Plamen Ratchev" <Plamen@[EMAIL PROTECTED] > Apr 22, 2008 at 09:49 AM

You can add linked server and use it to copy the table data across server. 
Creating linked server is done using sp_addlinkedserver:

EXEC sp_addlinkedserver 'RemoteServer', N'SQL Server'

Based on security settings you may need to map remote server logins. This
is 
done using sp_addlinkedsrvlogin:

EXEC sp_addlinkedsrvlogin 'RemoteServer', 'false', 'LocalUser', 
'RemoteUser', 'RemotePassword'

Then you just run a normal query referencing the linked server table with
4 
part name:

INSERT INTO TargetTable
SELECT <columns>
FROM RemoteServer.RemoteDB.dbo.RemoteTable

HTH,

Plamen Ratchev
http://www.SQLStudio.com
 




 10 Posts in Topic:
copying data from one server to another
Guineapig1980@[EMAIL PROT  2008-04-22 06:11:12 
Re: copying data from one server to another
"Plamen Ratchev"  2008-04-22 09:49:52 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-14 21:52:28 
Re: copying data from one server to another
"Plamen Ratchev"  2008-05-15 01:40:33 
Re: copying data from one server to another
Erland Sommarskog <esq  2008-05-16 20:04:24 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-14 23:18:58 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-14 23:25:58 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-15 01:35:39 
Re: copying data from one server to another
"Plamen Ratchev"  2008-05-15 09:01:18 
Re: copying data from one server to another
imorxr@[EMAIL PROTECTED]   2008-05-15 20:06:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 13:37:09 CDT 2008.