views:

660

answers:

3

hi,

i have a file with .bak extension.

how can i import this date to a database in SQL Server.

is any one have an idea.please share it with me.

thanks

+2  A: 

.bak files are database backups. You can restore the backup with the method below:

How to: Restore a Database Backup (SQL Server Management Studio)

Jon Schoning
A: 

I am assuming your using mssql, here is a thread explaining a few ways you can restore.

Andrew Keith
+1  A: 
RESTORE FILELISTONLY 
FROM DISK = 'D:\3.0 Databases\DB.bak' 

RESTORE DATABASE YourDB
FROM DISK = 'D:\3.0 Databases\DB.bak'

and you have to move appropriate mdf,ndf & ldf files using

 With Move 'primarydatafilename' To 'D:\DB\data.mdf', 
 Move 'secondarydatafile'To 'D:\DB\data1.ndf', 
 Move 'logfilename' To 'D:\DB\log.ldf'

Cheers

Ramesh vel

Ramesh Vel