This topic describes how to attach a database by using dbForge Studio for SQL Server. You can use this feature to copy, move, or upgrade a SQL Server database.
You can attach a copied or detached SQL Server database. When you attach a database, all data files (MDF and NDF files) must be available. If any data file has a different path from when the database was first created or last attached, you must specify the current path of the file.
You cannot attach a database in the following cases:
1. Use Database Explorer to connect to the instance of the SQL Server database engine and then expand the instance.
2. Right-click the instance and then click Attach Database.
3. In the Attach Database dialog box, click the Add button to specify the database to be attached.
4. In the Browse For Folder dialog box, select the disk drive where the database resides and expand the directory tree to find and select the .mdf file of the database. Note, you can select several *.mdf files to attach.
5. Optionally, specify a different name for the database to attach as.
6. Optionally, you can select a different owner.
7. Optionally, you can remove the selected file from the databases to attach grid by clicking the Remove button.
8. Click OK.
Download dbForge Studio for SQL Server and try it absolutely free for 30 days!
If you want to learn how to detach and attach a database in SQL Server, feel free to watch this video.