Table Sync in two databases | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Table Sync in two databases

I am using SQL Server 2000. How best I can synchronise some of the tables of DataBase (say AAA) with the
tables from Database (say BBB)?. Tables are identical in both the databases.
That is I want to Delete all the rows of a table in DataBase (say AAA) then
insert all the rows of a table from Database (say BBB). The tables may have
indexes also. I thought BCP will serve the purpose. To checkout BCP command I tried bcp "fdatabase.dbo.imagelist" out "c:mvaish.txt" -U"Administrator" -P"axd$$56" it gave following error
Server: Msg 179, Level 15, State 1, Line 1
Cannot use the OUTPUT option when passing a constant to a stored procedure. I need some command line utility. Expect an early reply. Thanking you. Yours sincerely, Murari Vaish
How about doing this from DTS
Even you can sheduled the DTS so that it is updating other tble periodically.
quote:Originally posted by murari.vaish I am using SQL Server 2000. How best I can synchronise some of the tables of DataBase (say AAA) with the
tables from Database (say BBB)?. Tables are identical in both the databases.
That is I want to Delete all the rows of a table in DataBase (say AAA) then
insert all the rows of a table from Database (say BBB). The tables may have
indexes also.

I would not like to use DTS.. My ultimate aim is to first run and test the query in Query Analyser.
Then plug it into ASP so that Administrators can perform the task (without using terminal service e.t.c.)whenever it is needed. Thanks
You can accomplish that goal using DTS.
Why you can’t execute the DTS from ASP??
quote:Originally posted by murari.vaish I would not like to use DTS.. My ultimate aim is to first run and test the query in Query Analyser.
Then plug it into ASP so that Administrators can perform the task (without using terminal service e.t.c.)whenever it is needed. Thanks

I don’t think I can execute DTS from ASP. Could you provide how it can be done? Thanks
http://www.sqlteam.com/item.asp?ItemID=19595 MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
]]>