Restoring data from a different SQL server

  • I am at a loss. We reciently moved from SYBASE to SQL. On sybase I was able to "dump database XX to filename" then I could map a drive and "load database XXtest from filename". As long as the database that I was dumping from wasn't any bigger than the one I was loading to there wasn't any problem.

    Now I seem to have to have dump devices(which I tried) and it looked like it might work but then I got errors on file placement.

    Do I have to do a restore with the move option and tell it exactly where to put each file?

    This is something I want to do durring the day so I can't use the detach, copy and then attach option. I know I am missing something because many people have told me that SQL is much easier than Sybase.

    Does anyone have a suggestion.

  • You got it!  Use the with move option.

    Use restore filelistonly to get the logical filenames (pubs_data and pubs_log)

       RESTORE FILELISTONLY

        FROM DISK = 'X:\SQL_Backups\PUBS_special.bkp'

    Then just plug the appropriate stuff in the following -

       RESTORE DATABASE New_PUBS

        FROM DISK = 'X:\SQL_Backups\PUBS_special.bkp'

        WITH RECOVERY,

         MOVE 'PUBS_Data' TO 'f:\SQL_Data\PUBS_Data.mdf',

         MOVE 'PUBS_Log'  TO 'L:\SQL_Logs\PUBS_Log.ldf'

     

    Steve

  • Thank you it worked perfectly

  • do you test to do this with making Full bckup then make a restore from this full backup ..?


    Alamir Mohamed
    Alamir_mohamed@yahoo.com

  • Alamir,

    Yes, that's the idea.  Make a full backup, then you can restore it wherever you like.

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

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