Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 bat file for differential backup

Author  Topic 

YogeshDesai
Posting Yak Master

136 Posts

Posted - 2007-11-13 : 08:13:46
Hi Guys I need a samll help to create bat file for differential backup



SQL IN Minds

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2007-11-13 : 08:18:41
(Moved to the Administration forum.)

-graz

=================================================
Creating tomorrow's legacy systems today. One crisis at a time.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-13 : 18:33:35
quote:
Originally posted by YogeshDesai

Hi Guys I need a samll help to create bat file for differential backup




What part are you having a problem with?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-13 : 22:23:20
You can run 'backup database' with sqlcmd or osql, and put that whole thing in .bat file.
Go to Top of Page

YogeshDesai
Posting Yak Master

136 Posts

Posted - 2007-11-20 : 09:48:29
Hi For more details i will show you an exmple this is .bat file for user database backups, it's takes full backup, and I want to create same script for differential backup could you help me ?
example:
@echo off
rem *********************************************************************
rem Script: SQL Server - Application DB Backup
rem
rem Purpose: To run the application db checks and backup and check for errors
rem
rem
rem Parameters: None
rem *********************************************************************

echo %DATE% %TIME% %0 *********************************************************************
echo %DATE% %TIME% %0 Running the Application db checks and backup for %SQL_SERVER%
echo %DATE% %TIME% %0 *********************************************************************

%SQLMAINT_PGM% -S %SQL_SERVER% -PlanName %APP_PLAN_1% -Rpt "%LOG_DIR%\Application db backup.txt" -DelTxtRpt %RPT_PURGE% -WriteHistory -VrfyBackup -BkUpOnlyIfClean -CkDB -BkUpMedia DISK -BkUpDB %BACKUP_DIR% -DelBkUps %BKP_PURGE% -CrBkSubDir -BkExt "BAK"

if not %errorlevel% == 0 goto end_osqlerr

:end_success
echo %DATE% %TIME% %0 Completed successfully
goto EOF

:end_osqlerr
echo %DATE% %TIME% %0 Job failure
exit 1
goto EOF

:EOF
echo %DATE% %TIME% %0 *********************************************************************
echo %DATE% %TIME% %0 End of processing
echo %DATE% %TIME% %0 *********************************************************************


SQL IN Minds
Go to Top of Page
   

- Advertisement -