Sunday, March 25, 2012

copy db

in sql 2005 -- what's the best way for me to make a complete copy of my database - including indexes and keys and everything??
i tried backup but when restoring to the second i get an error with multiple media sets.What error are you getting on the restore?|||If you are restoring to the same server, then you need to rename all of the physical files.|||Msg 3132, Level 16, State 1, Line 1
The media set has 2 media families but only 1 are provided. All members must be provided.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

I am doing

RESTORE DATABASE trafficr
FROM DISK = 'c:\backups\traffic.bak'
WITH MOVE 'traffic' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\trafficr.mdf',
MOVE 'traffic_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\trafficr_log.ldf',

REPLACE|||What's with the commas at the end of each line?|||this is the syntax i'm using for sql server - -is it wrong?

i think it once worked but not working now - maybe with the way i did the backup? how should i do the backup so one media|||post the output of this:

RESTORE headeronly FROM DISK = 'c:\backups\traffic.bak'

you may have more than one backup in the file.sqlsql

No comments:

Post a Comment