home *** CD-ROM | disk | FTP | other *** search
- @echo off
- rem
- rem Batch-Program to install systemtables in ADABAS D
- rem Software AG Rel. 11.00 1998-11-28
- rem
-
-
-
- set _DBNAME=%1
- set _CONTROL_USER=%2
- set _CONTROL_PWD=%3
- set _SYSDBA_USER=%4
- set _SYSDBA_PWD=%5
- set _DOMAINPWD=%6
-
- if "%_DBNAME%"=="" goto usage
- if "%_CONTROL_USER%"=="" goto usage
- if "%_CONTROL_PWD%"=="" goto usage
- if "%_SYSDBA_USER%"=="" goto usage
- if "%_SYSDBA_PWD%"=="" goto usage
- if "%_DOMAINPWD%"=="" goto usage
-
- if "%DBROOT%"=="" goto missing_env
-
- echo Start installing system tables...
-
- xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% -b %DBROOT%\env\TERMCHAR.ind
- if not errorlevel 1 goto cont1
- echo *** Utility error when processing %DBROOT%\env\TERMCHAR.ind ***
- goto error
-
- :cont1
- xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% DIAGNOSE TRIGGER OFF
- if not errorlevel 1 goto cont2
- echo *** Utility error when processing DIAGNOSE TRIGGER OFF ***
- goto error
-
- :cont2
- xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S adabas -b %DBROOT%\env\DBS.ins %_DOMAINPWD%
- if not errorlevel 1 goto cont3
- echo *** Load error when processing %DBROOT%\env\DBS.ins ***
- goto error
-
- :cont3
- xload -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S adabas -b %DBROOT%\env\XDD.ins
- if not errorlevel 1 goto cont4
- echo *** Load error when processing %DBROOT%\env\XDD.ins ***
- goto error
-
- :cont4
- xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S adabas -b %DBROOT%\env\QP.ins
- if not errorlevel 1 goto cont5
- echo *** Load error when processing %DBROOT%\env\QP.ins ***
- goto error
-
- :cont5
- xload -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S adabas -b %DBROOT%\env\SPROC.ins
- if not errorlevel 1 goto cont6
- echo *** Load error when processing %DBROOT%\env\SPROC.ins ***
- goto error
-
- :cont6
- xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% DIAGNOSE TRIGGER ON
- if not errorlevel 1 goto cont7
- echo *** Utility error when processing DIAGNOSE TRIGGER ON ***
- goto error
-
- :cont7
- xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% SET NOLOG OFF
- if not errorlevel 1 goto cont8
- echo *** Utility error when processing SET NOLOG OFF ***
- goto error
-
- :cont8
- xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% SHUTDOWN QUICK
- if not errorlevel 1 goto cont9
- echo *** Utility error when processing SHUTDOWN QUICK ***
- goto error
-
- :cont9
- xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% RESTART
- if not errorlevel 1 goto cont10
- echo *** Utility error when processing RESTART***
- goto error
-
-
- :cont10
- echo .
- echo Installation of system tables successfully finished!
- echo .
- goto end
-
- :missing_env
- echo "Error: DBROOT not set!"
-
- :error
- echo *** Error during installation of system tables! ***
- goto end
-
- :usage
- echo usage: x_dbinst dbname control_user,control_pwd sysdba_user,sysdba_pwd domain_pwd
- echo .
-
- :end
-