Tag Archives: mssql

Windows MSSQL backup

set DIR_BACKUP=c:\backup
set NAME_PC=dbname

md %DIR_BACKUP%

set db_name=master
osql -S %NAME_PC% -E -Q “BACKUP DATABASE %db_name% TO DISK = ‘%DIR_BACKUP%\%db_name%.bak’ with init”