SQL Server Performance

Table Sync in two databases

Discussion in 'T-SQL Performance Tuning for Developers' started by murari.vaish, Apr 10, 2005.

  1. murari.vaish New Member

    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
  2. dineshasanka Moderator

    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.

  3. murari.vaish New Member

    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
  4. mmarovic Active Member

    You can accomplish that goal using DTS.
  5. dineshasanka Moderator

    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
  6. murari.vaish New Member

    I don't think I can execute DTS from ASP.

    Could you provide how it can be done?

    Thanks
  7. derrickleggett New Member

    http://www.sqlteam.com/item.asp?ItemID=19595

    MeanOldDBA
    derrickleggett@hotmail.com

    When life gives you a lemon, fire the DBA.

Share This Page