November 16, 2007 at 7:16 am
Hi All,
I would like to synchronize a table to another table on different server by script. For example, tableSource, databaseSource, serverSource to tableDestination, databaseDestination, serverDestination.
Thank you.
November 16, 2007 at 7:31 am
Hello,
there are more ways to do this.
what i would do is to copy the source table on the destination table using DTS.
after that you can insert the missing data into the destinationtable like this:
insert into destinationtable
(list of columns)
SELECT
(list of columns)
from sourcetable
left outer join destinationtable on destinationtable.id = sourcetable.id
where
destinationtable.id is null
id -- is a fictive column that i used for the join condition
i'm not sure if this is what you are asking
Oana.
November 16, 2007 at 7:41 am
Oana Schuster (11/16/2007)
Hello,there are more ways to do this.
what i would do is to copy the source table on the destination table using DTS.
after that you can insert the missing data into the destinationtable like this:
insert into destinationtable
(list of columns)
SELECT
(list of columns)
from sourcetable
left outer join destinationtable on destinationtable.id = sourcetable.id
where
destinationtable.id is null
id -- is a fictive column that i used for the join condition
i'm not sure if this is what you are asking
Oana.
Thanks Oana,
I want that completely by commands only since our server cannot use other interfaces just today.
Thanks.
November 16, 2007 at 10:26 am
Would you please clarify what you mean by strictly by command? I think I know, but I would like to be sure before going further.
Also, know the DDL (including PK's) of the tables would help.
November 16, 2007 at 10:30 am
Lynn Pettis (11/16/2007)
Would you please clarify what you mean by strictly by command? I think I know, but I would like to be sure before going further.
I mean commands are in a bat file and run the bat file at a specific time.
Thanks.
November 16, 2007 at 10:32 am
What have you come up with so far?
November 16, 2007 at 10:45 am
Lynn Pettis (11/16/2007)
What have you come up with so far?
I am playing on http://msdn2.microsoft.com/en-us/library/ms162843.aspx
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply