It may be necessary to create a copy of an existing database on the same computer for testing purposes. This is a common occurrence because most computers within an organization do not have the same number and size of disk drives or identical software configurations. It may be necessary to restore some of the database files in the backup to a different drive because of capacity considerations. You want to restore a database from backups created in the default location of the earlier version. If the files within the database backup cannot be restored onto the destination computer, it is necessary to move the files to a new location while they are being restored. To avoid errors and unpleasant consequences, before the restore operation, you can use the backupfile history table to find out the database and log files in the backup you plan to restore. If the existing file cannot be overwritten, a restore error would occur. If the existing database file can be overwritten, it will be overwritten (this would not affect a file that belongs to a different database name). You are reusing a database name that exists on the restore destination and any of its files is named the same as a database file in the backup set, one of the following occurs: The target location might have insufficient space. For example, perhaps the backup contains a file that would be restored to drive E by default, but the destination computer lacks a drive E. The directory structure or drive mapping used by the database on the original computer not exist on the other computer. This might be necessary in the following situations: Optionally, when restoring the database, you can specify the device mapping, file names, or path for the restoring database. By default, the files created by SQL Server during the restoration process use the same names and paths as the backup files from the original database on the source computer. Restoring a database automatically creates the database files needed by the restoring database. Some additional considerations that may affect this process: Before You restore database files Restoring the database automatically creates all of the database files. Restore the backup of the source database on the destination computer. If needed, on the destination server instance, create the same backup devices as used to the backup of the source databases. On the computer to which you want to copy the database (the destination computer), connect to the instance of SQL Server on which you plan to restore the database. The computer on which this instance of SQL Server is running is the source computer. When you use backup and restore to copy a database to another instance of SQL Server, the source and destination computers can be any platform on which SQL Server runs.īack up the source database, which can reside on an instance of SQL Server 2005 (9.x) or later. General steps for using Backup and Restore to copy a database For more information about moving database files, see "Moving the Database Files," later in this topic. For information about the new default path see File Locations for Default and Named Instances of SQL Server. Therefore, to restore backups of a database created in the default location of earlier versions you must use the MOVE option. SQL Server 2016 uses a different default path than earlier versions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |