RESTORE DATABASE ... WITH PARTIAL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Utahduck

    RESTORE DATABASE ... WITH PARTIAL

    I've been having some issues so forgive me if this double-posts.

    Because I have some large but static Filegroups within a database I
    prefer to backup my filegroups instead of everything at once. This is
    SQL Server 2000.

    The other day I backed up a file with this command:

    BACKUP DATABASE Thomasville
    FILEGROUP = 'PRIMARY'
    TO DISK = 'D:\SQLBackups\ 2 - Monday\Full-Thomasville-
    PRIMARY-070409-1528h.bak'
    WITH FORMAT

    The backup worked flawlessly. But when I try to restore it into
    another database:

    RESTORE DATABASE Thomas
    FILEGROUP = 'PRIMARY'
    FROM DISK = 'D:\SQLBackups\ 2 - Monday\Full-Thomasville-
    PRIMARY-070409-1528h.bak'
    WITH PARTIAL,
    MOVE 'Thomasville_Da ta' TO 'd:\SQLServerDa ta\MSSQL\data
    \Thomasville_Da ta_Thomas.MDF',
    MOVE 'Thomasville_Lo g' TO 'd:\SQLServerDa ta\MSSQL\data
    \Thomasville_Lo g_Thomas.LDF',
    NORECOVERY

    I get this:

    Server: Msg 3135, Level 16, State 2, Line 1
    The backup set in file 'D:\SQLBackups\ 2 - Monday\Full-Thomasville-
    PRIMARY-070409-1528h.bak' was created by BACKUP DATABASE...FILE =<name>
    and cannot be used for this restore operation.
    Server: Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.

    It works if I remove the PARTIAL clause but then I can't recover my
    database afterwards. I need the PARTIAL because I'm only restoring
    one filegroup and not the entire database.

    Please help.

    -Utahduck

  • Mohit

    #2
    Re: RESTORE DATABASE ... WITH PARTIAL

    On Apr 12, 3:21 am, "Utahduck" <Utahd...@hotma il.comwrote:
    I've been having some issues so forgive me if this double-posts.
    >
    Because I have some large but static Filegroups within a database I
    prefer to backup my filegroups instead of everything at once. This is
    SQL Server 2000.
    >
    The other day I backed up a file with this command:
    >
    BACKUP DATABASE Thomasville
    FILEGROUP = 'PRIMARY'
    TO DISK = 'D:\SQLBackups\ 2 - Monday\Full-Thomasville-
    PRIMARY-070409-1528h.bak'
    WITH FORMAT
    >
    The backup worked flawlessly. But when I try to restore it into
    another database:
    >
    RESTORE DATABASE Thomas
    FILEGROUP = 'PRIMARY'
    FROM DISK = 'D:\SQLBackups\ 2 - Monday\Full-Thomasville-
    PRIMARY-070409-1528h.bak'
    WITH PARTIAL,
    MOVE 'Thomasville_Da ta' TO 'd:\SQLServerDa ta\MSSQL\data
    \Thomasville_Da ta_Thomas.MDF',
    MOVE 'Thomasville_Lo g' TO 'd:\SQLServerDa ta\MSSQL\data
    \Thomasville_Lo g_Thomas.LDF',
    NORECOVERY
    >
    I get this:
    >
    Server: Msg 3135, Level 16, State 2, Line 1
    The backup set in file 'D:\SQLBackups\ 2 - Monday\Full-Thomasville-
    PRIMARY-070409-1528h.bak' was created by BACKUP DATABASE...FILE =<name>
    and cannot be used for this restore operation.
    Server: Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.
    >
    It works if I remove the PARTIAL clause but then I can't recover my
    database afterwards. I need the PARTIAL because I'm only restoring
    one filegroup and not the entire database.
    >
    Please help.
    >
    -Utahduck

    tnnx

    Comment

    Working...