Detach and Attach
Step 1: Attach and Detach database
Before proceeding need to know what is attach and detach!
While we took backup of a database, the .bak file saved in drive and also exists in server
when ever use a detach option this will takes backup of database and drops the database from server
While attach like a restore of a database which already backedup.
The following are the steps how we can attach and detach the database
Step 2: Click on database -->Tasks-->DetachBefore proceeding need to know what is attach and detach!
While we took backup of a database, the .bak file saved in drive and also exists in server
when ever use a detach option this will takes backup of database and drops the database from server
While attach like a restore of a database which already backedup.
The following are the steps how we can attach and detach the database
If you found following error, Set your database to Single User mode using SET operator
Now choose drop connections then click OK
Attach:
Click on database-->Attach
Choose database which you want to restore
click ok
The database came to previous position