pooja
pooja

Reputation: 107

How to import .MDF.SQL file into SQL Server Management Studio?

I have database.mdf.sql file I want to import into Microsoft SQL Server Management Studio. I don't know how to import that file and add tables of that file into new database file.

Upvotes: 0

Views: 7755

Answers (2)

Jithin John
Jithin John

Reputation: 17

USE [master] GO CREATE DATABASE [database_name] ON ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Data\.mdf' ), ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Data\.ldf' ) FOR ATTACH ; GO

Upvotes: 0

Colin Pickard
Colin Pickard

Reputation: 46643

Right click Databases and click Attach.

More here

Upvotes: 1

Related Questions