3 Replies Latest reply on Feb 6, 2013 12:01 PM by alexn

    epo db backup and restore

    risingflight

      Hello

       

      i am not much familar with sql, please guide me the syntax to backup sql and restore.

       

      I am planning to migrate ePO4.5 on windows server 2003 x86, SQL 2005 to a VM  on windows server 2008 x64 R2 and SQL 2008 R2 and go with ePO4.6

       

      I tried to backup sql using OSQL command but it is giving me errors.

      My Physical machine hostname is AVS, Database name : EPODB

       

        osql -E -S ePO4_AVS\EPODB -n -Q "BACKUP DATABASE  [EPODB] TO DISK = 'C:\backup.bak' WITH INIT,SKIP" (please correct this syntax)

       

      and also please guide me the syntax to restore.

       

      The new VM will also have the same old hostname and the same DB name and i want to export the database on SQL 2008 R2

       

      osql -E -S ePO4_AVS\EPODB -Q "RESTORE DATABAE ePO4_AVS FROM DISK='C:\backup\backup.bak' WITH MOVE 'ePO4_AVS TO

      'c:\SQL\data\ePO4_AVS.mdf' , MOVE 'ePO4_AVS_log' TO 'c:\SQL\data\ePO4_AVS.ldf'" (correct the syntax please)