:: *******************************************************************:: * Change [ C: or C:\ ] if you are going to change the Directory * >> Defult Directory is : "C:\TestDB_Data_Backup\":: *******************************************************************GOTO AuthorComment This Script file is used to backup the database Written by Black Shield - DrDother @Dother-Dev 05/01/2016:AuthorComment:: Get the Current Directory SET FirstDir=%~d0:: Check whether the current directory is C:\ or not:: %~d0 is used to get the current root directory name eg:- C:IF "%~d0"=="C:" SET "curr_dir=%~d0" IF NOT "%~d0"=="C:" SET curr_dir=%cd%:: In here set absolute path to C:\ driveCD /D C:\
:: ****************************************************************************:: * Change [ TestDB_Data_Backup ] if you are going to change the Directory * >> Defult Directory is : "C:\TestDB_Data_Backup\":: ****************************************************************************IF EXIST TestDB_Data_Backup ( cd TestDB_Data_Backup) ELSE ( mkdir TestDB_Data_Backupcd TestDB_Data_Backup)
:: ************************:: * Your Settings Here *:: ************************:: Set your server nameSET server=DRDOTHER\SQLEXPRESS:: Set your backup database name - in this code my backup database nameSET dataBase=SRO_VT_ACCOUNT:: Set server authentication username & password of the database server:: Write your database server user nameSET user=sa:: Write your database server passwordSET password=123:: Set path name to save the backup file.SET pathName=C:\TestDB_Data_Backup\:: Set full name of the backup.SET fullName=SRO_VT_ACCOUNT-Full Database Backup
Password : BlackShield