Restore

How to rebuild master database?

Different edition of SQL Servers have different ways to rebuild the master database. For SQL Server 2000, in the installation directory, there is a program named rebuildm.exe,(If you can't find it, you have to find it on MS website) you start this program and follow it's instructions to rebuild the master database .

How to restore SQL server database to the point of failure?

To restore a SQL Server database to point of failure, the database's recovery model should not be "Simple", because it needs a transaction log backup to do that, "Simple" recovery model does not have a transaction log.

If your database's recovery modal is "Simple", you can not restore to the point of failure, in this case, please select the latest differential and full backup do the restore. If your database's recovery modal is not "Simple", to restore the database to the point of failure :

1). Back up the tail of the transaction log after SQL Server fails.

After I restore the master database, a database is missing.

If the database is created after master is backed up ,new restored can no be seen in managment studio/enterprise manager, because master backup set has no informaton about the new database, after master is restored , the user database will not be known to SQL Server.

In this case , if all database files comprising the user database still exist on the disk(s), the user database can be created by attaching the database files .
Just open the Query Analyzer , and then execute the following sql statements: (we attach pubs database as sample)

How to start SQL Server in single-user mode?

Compare with user database , recovering master database is little bit different .

Before run master database restore job , you are required to start SQL Server running in single user mode.

To start SQL Server in single user mode , please do following :

1) Open "Control Panel->Administrative Tools->Services"

2) Mouse right click on specified SQL Server instance service and select "Properties" menu to bring up following service configuration window:

 

 

How to restore a sql server database to a point in time?

A very good feature for ms sql server backup software is the ability to restore database to a specified point in time.

This feature is very useful in certain circumstances.

For example ,

I have a scheduled job that performs full database backup every night at 23:00 . But today , something happened , I added some records this morning , however I deleted some usefull data accidentally at 2:00 pm.

Now the problem is :

Because I did not performed any backups during the day before 2:00 pm , the most recent backup is backup created at 23:00 last night. If I use this last night backup to restore my database, I'll lost all the data added/changed in the morning , but I want to keep work of this morning.

Thanks for ms sql server point in time recovery feature , I can restore the database to the point in time prior to 14:00 . I just need to do a transaction log backup at current moment (suppose it is 15:00) , and then I create a restore job and specify the restore point in time is 14:00 (maybe 13:59 is better) , of cause I run the restore job as soon as possbile. My work prior to 14:00 today is saved.

Although the ability to restore database to point in time is very useful , not all database can be restored to a specified point in time.

To restore a database to a point in time, the database and the backup must meet the following conditions: