Friday, April 25, 2008

SQL Server Database Backup, SQL Server Database Restore

SQL Server BACKUP and RESTORE
Restoring a database backup re-creates the database and all of its associated files that were in the database when the backup was completed.
However, any modifications made to the database after the backup was created are lost. To restore transactions made after the database backup was created, you must use transaction log backups or differential backups.

Steps:
1. Copies all of the data from the backup into the database.

2. Rolls back any incomplete transactions in the database backup to ensure that the database is consistent.

3. To prevent overwriting a database unintentionally, the restore operation performs safety checks automatically. The restore operation fails if: the database name in the restore operation does not match the database name recorded in the backup set.

4. The database named in the restore operation already exists on the server but is not the same database contained in the database backup. For example, the database names are the same, but each database was created differently.

5. One or more files need to be created automatically by the restore operation, but the file names already exist. These safety checks can be disabled if the intention is to overwrite another database.
If you restore a database on a different instance of SQL Server than the one on which the backup was created, you may need to run sp_change_users_login to update user login information.

Tags: backup, database, restore, sql server database back up, sql server database restore, MSSQL database back up, mssql database restore

1 comment:

Yugender said...

Good going..Can u keep pictorial views.so,we can understand more easily if needed.