Restoring the database can be achieved by taking the backup of the database and restoring it (or) attaching the mdf and ldf files.
In this article, let’s see how we are attaching the database through mdf and ldf files.
Detaching the database:
First, let me detach the existing database and we will attach the same.
Steps:
1. Right click on the database and select tasks -> Detach.
1. We will get a detach database window with the database listed down.
Options to be noted down:
a. Drop Connections: This option will drop the connection between the database and the server and detach the database.
b. Update Statistics: This option will update the recent statistics of the database and afterwards proceed with the detach option.
c. Keep Full Text catalogs: This option will create full text catalogs on the database and proceed with the detaching the database.
d. Status: Indicates, whether the database is ready to proceed any action on it.
2. Click “OK” to proceed further on this.
3. The database will get detached from the server. You can’ see the database.
Attaching the database:
Right click on the database and select “Attach” option.
You will get Attach database window,
No comments:
Post a Comment