Add restoration script for bst backup dbs

master
prathabanKavin 11 months ago
parent ca00b087bb
commit b966943ce3

@ -0,0 +1,44 @@
/*
-- Enable contained database authentication
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
*/
PRINT '======Starting to restore bst prod databases';
RESTORE DATABASE bst_mdmdm_db
FROM DISK = '/home/kavin/BSTnew/BSTPROD/bst_mdmdm_db_Full_20231129193000.BAK'
WITH
MOVE 'bst_mdmdm_db' TO '/home/kavin/dbdump/bst_mdmdm_db.mdf',
MOVE 'bst_mdmdm_db_log' TO '/home/kavin/dbdump/bst_mdmdm_db_log.ldf',
NOUNLOAD,
STATS = 5;
GO
PRINT '======Completed restoring bst_mdmdm_db';
RESTORE DATABASE bst_mdmapim
FROM DISK = '/home/kavin/BSTnew/BSTPROD/bst_mdmapim_Full_20231129193000.BAK'
WITH
MOVE 'bst_mdmapim' TO '/home/kavin/dbdump/bst_mdmapim.mdf',
MOVE 'bst_mdmapim_log' TO '/home/kavin/dbdump/bst_mdmapim_log.ldf',
NOUNLOAD,
STATS = 5;
GO
PRINT '======Completed restoring bst_mdmapim';
RESTORE DATABASE bst_mdmum_reg
FROM DISK = '/home/kavin/BSTnew/BSTPROD/bst_mdmum_reg_Full_20231129193000.BAK'
WITH
MOVE 'bst_mdmum_reg' TO '/home/kavin/dbdump/bst_mdmum_reg.mdf',
MOVE 'bst_mdmum_reg_log' TO '/home/kavin/dbdump/bst_mdmum_reg_log.ldf',
REPLACE,
RECOVERY,
STATS = 5;
GO
PRINT '======Completed restoring bst_mdmum_reg';
GO
Loading…
Cancel
Save