Please send Automated DB2 Backup Script on Windows machine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ManojNaidu
    New Member
    • Nov 2012
    • 1

    Please send Automated DB2 Backup Script on Windows machine

    Hi,

    Please send Automated DB2 Backup Script on Windows machine to me.

    Full backup, Incremental backup and Delta backup scripts.

    OS : Windows 2003
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    It looks like there is a lot of information and examples on how to accomplish this in this article: An Introduction to DB2 UDB Scripting on Windows.

    This is the code posted in the example "Listing 6" in the article:
    Code:
    @echo off:
    :------------------------------------------------::
    :: This is a Windows Shell Script that must be run
    inside a DB2 Command:: Window (db2cmd).
    :------------------------------------------------::
    set SCRIPT_NAME=%~n0 set SCRIPT_VER=1.0 set
    DB2INSTANCE=DB2 set DB2DATABASE=SAMPLE
    
    title %SCRIPT_NAME% v%SCRIPT_VER%
    
    echo Starting database backup of %DB2DATABASE% on
    %date% at %time%... DB2 BACKUP DATABASE SAMPLE if not
    %errorlevel% == 0 ( 
    echo Database backup of
    %DB2DATABASE% failed, RC=%errorlevel% 
    ) 
    else 
    ( 
    echo
    Database backup of %DB2DATABASE% completed on %date% at
    %time%. 
    )
    I suggest you read the article to fully understand this topic.


    -Frinny
    Last edited by Frinavale; Nov 20 '12, 02:46 PM.

    Comment

    Working...