I have database Registered
and I backup that database from right click on database and backup and it is store registred.bak
file.
After I format the system once again I want to restore that database then I follow the step create new database and right click on that newly created database and select restore and I choose file those already I take as back up file (.bak
) file and click on restore the database restoring completed after then in right side of explorer view my database name registered (restoring...)
.
What is restoring point? Because when I click on this database it says
The dataase not accessible
What is this please explain me ???
Best Answer
Here is a run down to accomplish what you are trying to do. I added screen shots to help you along with backing up and restoring your database. The file paths won't exactly be the same.
BACKUP DATABASE
Backup the database Registered
Click on OK
The database has been backed up
RESTORE DATABASE
To restore the database registered, right click on the Registered Database in SSMS and choose Restore Database
In the window that appears, select From Device and click on the button with three ... to search for your backup
From here, click on Add and locate your backup file
Now click on OK
Click on OK
You are now back in the Restore Database Window, select Options
Make sure to select Overwrite the existing database (WITH REPLACE) and Leave the database ready to use option in the Recovery State options.
Then Click on General in the Select a page zone
Click on the checkbox "Restore" and then click on Script. I prefer sending the restore command to a new windows as a Script instead of directly clicking on OK. This way, I can drop any active connections to the database before restore which could result in a database in use error.
A new query window will be opened with the code necessary to restore the Registered database.
Add the following code just above the restore database script
You will notice that I modified the STATS option from STATS=10 STATS=1. This can be useful when restoring large databases. In the Messages tab, you can view the progression of the restore by %. With STATS=1, the restore can be monitored 1% at a time instead of every 10%
Now hit F5, to run the script.