Last active
August 29, 2015 14:06
-
-
Save niisar/c38944e742e8f761a844 to your computer and use it in GitHub Desktop.
db backup restore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------sqlserver | |
--detach db | |
EXEC master.dbo.sp_detach_db @dbname = N'nopCommerce' | |
--restore db | |
RESTORE DATABASE [nopCommerce] FROM | |
DISK = N'F:\NISAR WORKSPACE\E-Logistics\DB-E-Logistics\eLogistics.bak' | |
WITH REPLACE | |
GO | |
--backup db | |
BACKUP DATABASE [eLogistics] TO | |
DISK = N'F:\NISAR WORKSPACE\E-Logistics\DB-E-Logistics\eLogistics.bak' | |
WITH NOFORMAT | |
go | |
-- format / noformat ► If you use FORMAT any existing contents get erased. / If you use NOFORMAT (the default) you can write multiple backups to the same file. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment