Loading...

Back Up a Database without EBMSDocs

Comments

4 comments

  • 邑明

    how to restore database from the backup without EBMSDocs? thanks

  • Sara Noonan

    Hi 邑明 ,

    In order to restore a database without the EBMSDocs filegroup, you will need to restore via WITH MOVE statements. First, you will need to identify the logical names of your existing filegroups. Here's the statement we use for this:

    RESTORE FILELISTONLY FROM DISK = N'LOCATION OF .BAK FILE.bak'

    Once you have the logical names, you can use a statement like this one (below) in order to load the database. You just need to match up the filegroup to the logical name listed with the original statement.

    RESTORE DATABASE NEWDATABASENAME
    FROM DISK = 'LOCATION OF BAK FILE.bak'
    WITH
    MOVE 'USIprdDB_Data' TO 'RESTORE FILE LOCATION.mdf',
    MOVE 'EBMS_DOCS' TO 'RESTORE FILE LOCATION.ndf',
    MOVE 'ftrow_FullTextCatalog' TO 'RESTORE FILE LOCATIONgovexpo_1.ndf',
    MOVE 'ftrow_FullTextCatalog_CC810_COMM_DIR' TO 'RESTORE FILE LOCATION.ndf',
    MOVE 'USIprdDB_Log' TO 'RESTORE FILE LOCATION.ldf'

    Hopefully this makes sense.

    To sum up, you'll first find out the logical filegroup names on the .bak file. From there, you will run the above Restore with Move statement, matching up the .bak file's logical names with the corresponding .bak file. You'll tell SQL the restore file location within that statement as well.

    You can find out more information about this at the following links:

    https://msdn.microsoft.com/en-us/library/ms190372.aspx
    https://msdn.microsoft.com/en-us/library/ms186858.aspx
    http://blog.sqlauthority.com/2007/02/25/sql-server-restore-database-backup-using-sql-script-t-sql/

    Thanks, and have a great day!

    Sara Noonan

  • 邑明

    Hi,Sara
    Following your directions, I successfully restored the database. thank you very much.

  • Sara Noonan

    You're welcome!

Please sign in to leave a comment.