Results 1 to 7 of 7

Thread: copy db

  1. #1
    Join Date
    Jun 2006
    Posts
    66

    Unanswered: 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.

  2. #2
    Join Date
    May 2003
    Location
    Rochester, NY
    Posts
    135
    What error are you getting on the restore?

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    If you are restoring to the same server, then you need to rename all of the physical files.

  4. #4
    Join Date
    Jun 2006
    Posts
    66
    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

    Code:
     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

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What's with the commas at the end of each line?
    George
    Home | Blog

  6. #6
    Join Date
    Jun 2006
    Posts
    66
    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

  7. #7
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    post the output of this:
    Code:
    RESTORE headeronly FROM DISK = 'c:\backups\traffic.bak'
    you may have more than one backup in the file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •