how to attach 7.0 database on to sqlserver2000

  • Hello sql server Gurus,

    I have taken a backup(through maintenance plan) from SQLServer 7.0 server. I wanted to restore that onto SQLServer 2000 database. When ever I try to do that, it gives me the following error message.

    File you've specified is not a valid SQLServer database file. I am just copying it from the remote server to local(as they are shared). Please help me on this....

  • First thing to do would be to read up on restore in Books On Line. A basic script would look like the following;

    restore database YourDB

    from disk = 'f:\backup\YourDBBkUp'

    The path specified is to the backup file that you mentioned in your post. SQL Server 2000 is kind enough to do the conversion for you. If you are looking to have the data file, .MDF, or the log file, .LDF in a different location than what you had on the previous server then you will need to include a "with move". An example of this is below (the replace is only needed if a database with the same name already exists on the target server);

    with

    move 'YourDB_Data' to 'e:\databases\YourDB_Data.MDF',

    move 'YourDB_Log' to 'f:\databases\YourDB_Log.LDF',

    replace

    As stated earlier, the best step is to look at Books on Line for examples of using T-SQL and Enterprise Manager to help with your restore.

    Hope this helps.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • A simpler method if you can take the db out of production for a few minutes is to detach it from the 7.0 server, copy it to the SQL2K server, then reattach to both servers. SQL2K will auto upgrade the 7.0 mdf. This is exactly what the SQL2K copy database wizard does.

    Andy

  • I tried, Still it gives me the invalid file format error. Please help me on this. THanks...

  • Did you try the copy database wizard that Andy recommended.

    Expand the server in Enterprise Manager, right click on the Databases folder, select All Tasks, Copy Database Wizard.

    This will be the easiest method for this transfer. If you really need to do this from the backup, please post again and we can try to work further on that solution.

    Sorry it didn't work out of the gate for you!

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

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

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