Sunday 17 February 2013

Restore MS_SQL Database



I want to restore an MSSQL  .bak file which has multiple chunks inside it.

Below is the query to do that:

RESTORE DATABASE AMP

FROM DISK = 'C:\AMP2013\TMP_DB.bak'

WITH

MOVE 'TMP_DB' TO 'E:\TMP_DB_1.mdf',

MOVE 'FG_DM' TO 'E:\FG_DM_1.ndf',

MOVE 'FG_FNMP_Document_Content' TO 'E:\FG_FNMP_Document_Content_1.ndf',

MOVE 'FG_FNMP_History' TO 'E:\FG_FNMP_History_1.ndf',

MOVE 'FG_FNMP_Imported_Data' TO 'E:\FG_FNMP_Imported_Data_1.ndf',

MOVE 'ManageSoft_Log' TO 'E:\ManageSoft_log_1.ldf',

REPLACE,

STATS = 10

No comments:

Post a Comment

Tweets by @sriramperumalla