12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- @echo off
- REM ###########################################################################
- REM #
- REM # INFORMIX SOFTWARE, INC.
- REM #
- REM # PROPRIETARY DATA
- REM #
- REM # THIS DOCUMENT CONTAINS TRADE SECRET DATA WHICH IS THE PROPERTY OF
- REM # INFORMIX SOFTWARE, INC. THIS DOCUMENT IS SUBMITTED TO RECIPIENT IN
- REM # CONFIDENCE. INFORMATION CONTAINED HEREIN MAY NOT BE USED, COPIED OR
- REM # DISCLOSED IN WHOLE OR IN PART EXCEPT AS PERMITTED BY WRITTEN AGREEMENT
- REM # SIGNED BY AN OFFICER OF INFORMIX SOFTWARE, INC.
- REM #
- REM # THIS MATERIAL IS ALSO COPYRIGHTED AS AN UNPUBLISHED WORK UNDER
- REM # SECTIONS 104 AND 408 OF TITLE 17 OF THE UNITED STATES CODE.
- REM # UNAUTHORIZED USE, COPYING OR OTHER REPRODUCTION IS PROHIBITED BY LAW.
- REM #
- REM # Description Automates logical log backup using event alarms from the
- REM # database server. To install this script, add the following
- REM # line to the ONCONFIG file -
- REM # ALARMPROGRAM <informixdir>/etc/log_full.bat
- REM # where <informixdir> is replaced by the full value of
- REM # %INFORMIXDIR%
- REM #
- REM##########################################################################
- REM ###
- REM # setup the WINROOT path
- REM ###
- set WINROOT=%SystemRoot%
- if "x%WINROOT%" == "x" set WINROOT=C:\WINNT
- set BACKUP_CMD=onbar -b -l
- set EXIT_STATUS=0
- set EVENT_SEVERITY=%1%
- set EVENT_CLASS=%2%
- set EVENT_MSG="%3%"
- set EVENT_ADD_TEXT="%4%"
- set EVENT_FILE="%5%"
- if %EVENT_CLASS% == 23 goto CONT_LOG
- REM # One program is shared by all event alarms. If this ever gets expanded to
- REM # handle more than just archive events, uncomment the following:EXIT_STATUS=1
- REM # set EXIT_STATUS=1
- goto DONE
- :CONT_LOG
- REM # onbar assumes no operator is present,
- REM # so all messages are written to the activity
- REM # log and there shouldn't be any output, but
- REM # send everything to nul just in case
- %BACKUP_CMD% 2>&1 >> NUL
- REM # 0 means BACKUP_CMD was successful
- if ERRORLEVEL 1 goto ERROR
- if ERRORLEVEL 0 goto SUCCESS
- goto DONE
- :ERROR
- set EXIT_STATUS=1
- goto DONE
- :SUCCESS
- set EXIT_STATUS=0
- :DONE
- exit %EXIT_STATUS%
|