Breaking News

Microsoft SQL Server 2016 : Attach a database by using SQL Server Management Studio

Attach a database in SQL Server Management Studio 2016.  


























Before attaching the database

1 . Copy (two file e.g. the ‘database.MDF‘ file which contains the primary data, and the ‘database.LDF‘ file which logs) and 
2. Paste "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA" -according to your Microsoft SQL Server folder. 

Now we are ready to attach them.

3. Open SQL Server Management Studio....Click on connect button and then expand that instance.
4. Right-click Databases and click Attach. 



























5. Click ADD button ..

















6. Select your database for attach ...and click Ok button





















7. and click Ok button 


























Database is now attached to the SQL instance. ......




No comments