[MSSQL] Errors - some of them...
Posted: Mon Sep 26, 2005 12:21 pm
[ERROR 1]
When trying to restore a backup file over a database (e.g. "newdb") which is NOT the one the backup came from (e.g. "mydb"), you might encounter this error:
[SOLUTION 1]
When restoring a backup from a file, the logical names and the data/log filenames of the database are taken from the backup file.
This means, that it will DEFINITELY not fit another database.
To solve this, select the "Options" tab in the restore dialog and in the table labeled with "Restore database files as:" you will see the logical filename and the physical filenames of data- and logfiles.
Change the physical path/filename to fit the database you're trying to import to.
WARNING: Do NOT change the logical filename, as this will result in this error message:
When trying to restore a backup file over a database (e.g. "newdb") which is NOT the one the backup came from (e.g. "mydb"), you might encounter this error:
The file 'c:\MSSQL7\Data\mydb_Data.MDF' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.
Backup or restore operation terminating abnormally.
[SOLUTION 1]
When restoring a backup from a file, the logical names and the data/log filenames of the database are taken from the backup file.
This means, that it will DEFINITELY not fit another database.
To solve this, select the "Options" tab in the restore dialog and in the table labeled with "Restore database files as:" you will see the logical filename and the physical filenames of data- and logfiles.
Change the physical path/filename to fit the database you're trying to import to.
WARNING: Do NOT change the logical filename, as this will result in this error message:
File 'newdb_data' is not a database file for database 'newdb'. Backup or restore operation terminating abnormally.