Skip to content

Instantly share code, notes, and snippets.

@febridev
Created March 29, 2022 14:26
Show Gist options
  • Save febridev/c7fc56487fde4d5dabd05bf7c47cc963 to your computer and use it in GitHub Desktop.
Save febridev/c7fc56487fde4d5dabd05bf7c47cc963 to your computer and use it in GitHub Desktop.
use master
restore filelistonly from disk = 'E:\Backup\restore\dbSF_BizNet_NEC_20220321_094054.bak'
-- restore database
RESTORE DATABASE dbSF_BizNet_NEC FROM DISK = 'E:\Backup\restore\dbSF_BizNet_NEC_20220321_094054.bak'
WITH MOVE 'SunFish_Data' TO 'D:\sql2016\SFNEC_DEMO_Data.mdf',
MOVE 'SunFish_Log' TO 'L:\Logfiles\SFNEC_Log.ldf',
RECOVERY,REPLACE
backup database dbSaaS_HOST
to disk = 'E:\Backup\dbSaaS_HOST_20220329.bak'
with compression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment