Friday, March 9, 2012

How to use import/export utility in Sql Server 2000

Hi,

I've a data back up of sql server 2000 database in .bak form. I want to import data from this .bak file using the import/export utility. But there is no .bak option available in datasource select button of import/export utility. Then, what is the way to import data from .bak file?

you can not use import/export wizard in this scenario. You should restore database. Use Restore Command. Read about Restore with Move option in BOL(books online)

copied from BOL :

RESTORE FILELISTONLY
FROM DISK = 'c:\Northwind.bak'
RESTORE DATABASE TestDB
FROM DISK = 'c:\Northwind.bak'
WITH MOVE 'Northwind' TO 'c:\test\testdb.mdf',
MOVE 'Northwind_log' TO 'c:\test\testdb.ldf'

Madhu

|||I have marked Madhu's response as it stands, further do not attempt to open this .bak file as it is a database backup file and only by using RESTORE statement you would be able to restore on the other SQL server to extract the data using import/export wizard.|||

Hi

Madhu's suggestion worked well. I am able to restore.

No comments:

Post a Comment