Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 restore db

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-08-30 : 14:08:11
I am trying to restore a database to another by 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



but i get an error:

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.

what could be the problem?

Kristen
Test

22859 Posts

Posted - 2007-08-30 : 14:49:08
Looks like the backup was made to two files, not one. You need to have available, and specify, both files.

Kristen
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-08-31 : 02:00:25
I did the backup by right clicking in management studio - -
how do i redo the backup so it is in one file?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-08-31 : 03:30:51
To be honest I would have expected a point-and-click backup to be in a single file.

I think that RESTORE HEADERONLY will tell you, from the headers, whether the backup file is part of a "multi file set"

Kristen
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-08-31 : 06:36:45
To be honest I would have expected a point-and-click backup to be in a single file.

Please tell me how to do this -- i am doing using management studio but would be happy to do using sql syntax if i knew how -- can you help
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-08-31 : 15:13:00
backup database db_name to disk = '...', check detailed syntax in books online.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-01 : 05:11:35
"would be happy to do using sql syntax if i knew how"

Might be worth having a look here then:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=How%20Backup%20works,What%20type%20of%20backup%20should%20I%20use,Automating%20Backups,Backup

and

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Tara%20Blog%20Houskeeping%20Routines

Kristen
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-09-02 : 03:08:40
thanks..

i'm still having trouble -- why if I overwrite a backup and do a full backup do I still get the error

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.


How can I make it use only 1 media family?
Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-09-02 : 09:46:49
Sounds like you have two destinations configured for the backup in SSMS, check the configuration. I don't have access to SSMS right now to look at it, but I know you can configure it that way as your default set.

------------------------
Future guru in the making.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-02 : 17:46:22
How did you do backup?
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-09-03 : 01:22:32
yes there were 2 different backup files -- i thought I was just choosing which one but after I deleted -- it worked.
Go to Top of Page
   

- Advertisement -