locked
Tsql RRS feed

  • Question

  • i want to restore a database in sql server 2005 but i m getting an error as follows:

    the media set has 2 media families but only 1 are provided. all members must be provided.

    if anyone could reply, please.

    Wednesday, December 1, 2010 9:35 AM

Answers

  • You need both media on which backup are taken.
    Here is the repro of the scenerio

    Create database NAPSTER
    go
    BACKUP DATABASE [NAPSTER] TO DISK = N'd:\NAPSTER_1.bak', 
    DISK = N'd:\NAPSTER_2.bak' WITH NOFORMAT, NOINIT, 
    SKIP, NOREWIND, NOUNLOAD, STATS = 10
    GO
    
    drop database NAPSTER
    go
    
    RESTORE DATABASE NAPSTER FROM 
    DISK = N'd:\NAPSTER_1.bak'
    WITH FILE = 1, NOUNLOAD, STATS = 10
    GO
    

    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    • Proposed as answer by sql_server_geek Wednesday, December 1, 2010 10:20 AM
    • Marked as answer by Tom Li - MSFT Sunday, December 12, 2010 9:24 AM
    Wednesday, December 1, 2010 10:07 AM

All replies

  • Run the below

    restore

     

    headeronly from disk='U:\DataBackups\dbname.bak'

    It is possible  you need to specify FILEID to restore needed media family

     

    As alternative, run BACKUP DATABASE command WITH INIT option and then issue your RESTORE command


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Wednesday, December 1, 2010 9:42 AM
  • You need both media on which backup are taken.
    Here is the repro of the scenerio

    Create database NAPSTER
    go
    BACKUP DATABASE [NAPSTER] TO DISK = N'd:\NAPSTER_1.bak', 
    DISK = N'd:\NAPSTER_2.bak' WITH NOFORMAT, NOINIT, 
    SKIP, NOREWIND, NOUNLOAD, STATS = 10
    GO
    
    drop database NAPSTER
    go
    
    RESTORE DATABASE NAPSTER FROM 
    DISK = N'd:\NAPSTER_1.bak'
    WITH FILE = 1, NOUNLOAD, STATS = 10
    GO
    

    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    • Proposed as answer by sql_server_geek Wednesday, December 1, 2010 10:20 AM
    • Marked as answer by Tom Li - MSFT Sunday, December 12, 2010 9:24 AM
    Wednesday, December 1, 2010 10:07 AM