Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load data

Status
Not open for further replies.

mkey

Programmer
Oct 3, 2001
288
CA
Hi all,

I have never loaded data into SQL Server 2000.
I have a dumpfile with a .bak extension. I need
to load the data into a database.
What is the process?

Thanks!
 
If you want to load data from CD.
First you need to run "restore filelistonly"
restore filelistonly from disk = "backup file physical path"

ex.restore filelistonly from disk='B:\Backups\dd_2000.bak'

Because sometimes the dumpfile will located in a drive where your computer doesnt have (say B:\drive)

After you got the logical name for data and log file.You need to run this query

here is an example you want to restore in xyz database with new location for .mdf file and .ldf file(make sure that folder exist)

restore database xyz from disk = 'B:\Backups\dd_2000.bak' with replace,
move 'xyz_data' to 'd:\datafile\xyz_data.mdf',
move 'xyz_log' to 'd:\datafile\xyz_log.ldf'

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top