Automatic Backup/restore

  • Hi all,

    Windows 2000 SP4/ Sql server 2000 standard edition

    I have two databases located in two different servers and I like to execute a copy from the first server to the second one. I tried to use export/import using DTS but doesn't work well.

    Now I'd like to planify automatic backup/restore between the two databases (from source to target).

    How can I do that ?

     

    Thanks for any suggestions.

    Hassan

  • Create a dts package with two EXECUTE SQL task.. one should run the backup on the source server and second should run the restore on destination server...

    Note: Database Backup file location should be accessed by both servers...

     

    MohammedU
    Microsoft SQL Server MVP

  • Thanky you Mohammed for your answer.

    I just begin work with dts (from Entreprise Manager) and I do not have experience. Please could you give me one exemple: Sql task to backup and restore and how I can execute these Sql tasks from the dts.

    Best regards,

     

    Hassan

  • In execute sql task you have to use backup command...

    BACKUP DATABASE <DB NAME> TO DISK = '\\SERVERNAME\D$\DBNAME.BAK'

    In another execute sql task use restore command check BOL for syntax

    RESTORE DATABASE <db name> from disk = '\\SERVERNAME\D$\DBNAME.BAK'

     

    MohammedU
    Microsoft SQL Server MVP

  • Thansk u a lot mohammed.

    last question : how can I add the sql tasks to a new DTS ?

    Best regards,

     

    Hassan

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply