• We just launched and are currently in beta. Join us as we build and grow the community.

How to Attach and Detach a Database

JustTrynaHelp

Freelance Platform Wizard
J Rep
0
0
0
Rep
0
J Vouches
0
0
0
Vouches
0
Posts
169
Likes
187
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Sometimes you want to transfer or backup your database in SQL Server. When the database is attached you cannot copy/move it to any location. All you have to do is detach it first using SQL Server Management Tools.

Another reason why I write this tutorial is to teach you so that when we finish the Library System project you will be able to switch from my own database to your own database just in case you want to differentiate each of the table.

To attach a database

1. Open SQL Server Management Tools.

2. Right click Database and click Attach.

3. Click Add.

4. Locate the database and click OK button.

5. Click OK button again.

That’s it! The database is now attached to using SQL Server Management Tools.

To detach a database

1. Open SQL Server Management Tools.

2. Right click the database that you’d like to detach, point your mouse to Tasks menu and click Detach.

3. Click OK button.

That’s it, again! :)

If you encounter an error after you click the OK button, check if the database is not in use.

Back to Visual Basic .NET 2008 Tutorial.

 

440,010

316,559

316,568

Top