Restore SmartPlant Foundation databases using SQL Server - SmartPlant Foundation - Update 22 - Administration & Configuration

Backing Up and Restoring Databases for SmartPlant Foundation

PPMProduct
SmartPlant Foundation
PPMCategory_custom
Administration & Configuration
SPFVersion_custom
10

Locate the backup file on the database server and copy it to the server that will host the new database.

If you have problems getting the required exclusive access to the database required for the restore, stop the application pools. Once the restore is complete, look in Enterprise Manager to ensure the database, tables, and so on appear to have been restored correctly.

  1. Launch SQL Server Management Studio.

  2. In a Query window, execute the following command, substituting your actual backup file name and location if it differs with what is shown below.

    USE [master]

    go

    restore filelistonly from disk='d:\temp\SPFbackup.bak'

  3. In a Query Window execute the following command to restore the backup to a new database.

    USE [master]

    go

    RESTORE DATABASE [#DATA_DB#] from disk=N'#DUMP_FILE#' WITH

    MOVE '#FROM_USER#' TO '#MDF_PATH#',

    MOVE '#FROM_USER#_Log' TO '#LDF_PATH#',

    REPLACE

    GO

    use #DATA_DB#

    go

    sp_changedbowner #USER_ID#

    go

If you are restoring to a new location, you must install SmartPlant Foundation and perform a restoration procedure. See Restore a SmartPlant Foundation site to a new server for more information.