home *** CD-ROM | disk | FTP | other *** search
/ com!online 2002 April / comcd0402.iso / vollver / adabas / f_0001 / bin / x_dbinst.bat < prev    next >
Encoding:
DOS Batch File  |  1999-11-01  |  2.7 KB  |  105 lines

  1. @echo off
  2. rem
  3. rem Batch-Program to install systemtables in ADABAS D
  4. rem Software AG        Rel. 11.00    1998-11-28
  5. rem
  6.  
  7.  
  8.  
  9. set _DBNAME=%1
  10. set _CONTROL_USER=%2
  11. set _CONTROL_PWD=%3
  12. set _SYSDBA_USER=%4
  13. set _SYSDBA_PWD=%5
  14. set _DOMAINPWD=%6
  15.  
  16. if "%_DBNAME%"=="" goto usage
  17. if "%_CONTROL_USER%"=="" goto usage
  18. if "%_CONTROL_PWD%"=="" goto usage
  19. if "%_SYSDBA_USER%"=="" goto usage
  20. if "%_SYSDBA_PWD%"=="" goto usage
  21. if "%_DOMAINPWD%"=="" goto usage
  22.  
  23. if "%DBROOT%"=="" goto missing_env
  24.  
  25. echo Start installing system tables...
  26.  
  27. xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% -b %DBROOT%\env\TERMCHAR.ind
  28. if not errorlevel 1 goto cont1
  29. echo *** Utility error when processing %DBROOT%\env\TERMCHAR.ind ***
  30. goto error
  31.  
  32. :cont1
  33. xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% DIAGNOSE TRIGGER OFF
  34. if not errorlevel 1 goto cont2
  35. echo *** Utility error when processing DIAGNOSE TRIGGER OFF ***
  36. goto error
  37.  
  38. :cont2
  39. xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S adabas -b %DBROOT%\env\DBS.ins %_DOMAINPWD%
  40. if not errorlevel 1 goto cont3
  41. echo *** Load error when processing  %DBROOT%\env\DBS.ins ***
  42. goto error
  43.  
  44. :cont3
  45. xload -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S adabas -b %DBROOT%\env\XDD.ins
  46. if not errorlevel 1 goto cont4
  47. echo *** Load error when processing %DBROOT%\env\XDD.ins ***
  48. goto error
  49.  
  50. :cont4
  51. xload -d %_DBNAME% -u %_SYSDBA_USER%,%_SYSDBA_PWD% -S adabas -b %DBROOT%\env\QP.ins
  52. if not errorlevel 1 goto cont5
  53. echo *** Load error when processing %DBROOT%\env\QP.ins ***
  54. goto error
  55.  
  56. :cont5
  57. xload  -d %_DBNAME% -u DOMAIN,%_DOMAINPWD% -S adabas -b %DBROOT%\env\SPROC.ins
  58. if not errorlevel 1 goto cont6
  59. echo *** Load error when processing %DBROOT%\env\SPROC.ins ***
  60. goto error
  61.  
  62. :cont6
  63. xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD%  DIAGNOSE TRIGGER ON
  64. if not errorlevel 1 goto cont7
  65. echo *** Utility error when processing DIAGNOSE TRIGGER ON ***
  66. goto error
  67.  
  68. :cont7
  69. xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD%  SET NOLOG OFF
  70. if not errorlevel 1 goto cont8
  71. echo *** Utility error when processing SET NOLOG OFF ***
  72. goto error
  73.  
  74. :cont8
  75. xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD%  SHUTDOWN QUICK
  76. if not errorlevel 1 goto cont9
  77. echo *** Utility error when processing SHUTDOWN QUICK ***
  78. goto error
  79.  
  80. :cont9
  81. xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD%  RESTART
  82. if not errorlevel 1 goto cont10
  83. echo *** Utility error when processing RESTART***
  84. goto error
  85.  
  86.  
  87. :cont10
  88. echo .
  89. echo Installation of system tables successfully finished!
  90. echo .
  91. goto end
  92.  
  93. :missing_env
  94. echo "Error: DBROOT not set!"
  95.  
  96. :error
  97. echo *** Error during installation of system tables! ***
  98. goto end
  99.  
  100. :usage
  101. echo usage: x_dbinst dbname control_user,control_pwd sysdba_user,sysdba_pwd domain_pwd
  102. echo .
  103.  
  104. :end
  105.