home *** CD-ROM | disk | FTP | other *** search
/ PC Treasures, Inc. / pctreasures.mdf / WINDOWS / adabas / f_0001 / env / dbs.ins < prev    next >
Text File  |  1999-11-01  |  4KB  |  150 lines

  1. /**
  2. /  ==================================================================
  3. /* @(#)DBS.ins 10.01.00  1998-01-30
  4. /  ==================================================================
  5. /  Description
  6. /  ===========
  7. /  This file is necessary to install the conversational components
  8. /  of this database. It serves in the following cases:
  9. /
  10. /  1. A new SERVERDB has been defined
  11. /     INIT CONFIG and ACTIVATE SERVERDB have been executed
  12. /
  13. /     This LOAD file will install the complete system table environment
  14. /     in order to use the complete set of conversational components
  15. /     of this database (i.e.: LOAD, QUERY, EASY, SQLPL, DOMAIN).
  16. /
  17. /  2. A newly delivered version of the conversational components shall
  18. /     be installed by updating the message and help infos
  19. /
  20. /  The installation is done by creating tables only if they don't yet
  21. /  exist. Further during installation the running user is changed
  22. /  so that some parts of the installation run under the special
  23. /  user SYSDBA and other under the special user DOMAIN.
  24. /
  25. /  Calling Syntax
  26. /  ==============
  27. /  This LOAD file has to be started as SYSDBA user (see the definition
  28. /  in the XPARAM file).
  29. /
  30. /  Example: Execution of the DBS.ins file in batch mode
  31.  
  32. /           xload -u <sysdba>,<syspwd> -b DBS.ins
  33. /
  34. /  Example: Execution of the DBS.ins file in interactiv mode
  35. /
  36. /           xload -u <sysdba>,<syspwd>
  37. /           run 'DBS.ins'
  38. /
  39. /  In order to install a small test system the LOAD file DBSMIN.ins
  40. /  is provided.
  41. /
  42. /  Calling Hierarchy
  43. /  =================
  44. /  DBS ----------+---- SYSDBA
  45. /                |---- INFO
  46. /                |---- SYSSET
  47. /                |---- QUERY
  48. /                |---- EASY
  49. /                |---- CONTROL
  50. /                |---- SQLPL
  51. /                |---- WBAPP
  52. /                |---- QP
  53. /                |---- PRECOM
  54. /                |---- ODBC
  55. /                +---- ORADD
  56. /
  57. / (call from x_dbinst for complete installation)
  58. /  DOMAIN -------+---- XDD
  59. /                |---- SPROC
  60. /                +---- SFUNC
  61. /  ==================================================================
  62. /
  63. SQLMODE ADABAS
  64. /
  65. INIT SERVERDB
  66. /
  67. AUTOCOMMIT OFF
  68. /
  69. IF $RC (SHOW (thisuser) USER CURRENT) <> 0
  70. THEN
  71. /
  72.     RETURNCODE 0
  73. /
  74. IF $RC (SHOW (sysdba_loc) USER LOCALSYSDBA) <> 0
  75. THEN
  76. /
  77.     RETURNCODE 0
  78. /
  79. IF $RC (SELECT thisuser.username from thisuser, sysdba_loc
  80.         where thisuser.username = sysdba_loc.username) <> 0
  81. THEN
  82.     BEGIN
  83. /
  84.     SAY *** User is not SYSDBA ***
  85. /
  86.     END INIT SERVERDB
  87. /
  88.     STOP 7
  89. /
  90.     END
  91. /
  92. /
  93. IF  $RC (SHOW USER DOMAIN) <> 0
  94. THEN
  95. /
  96.     CREATE USER DOMAIN PASSWORD &1 DBA
  97. /
  98. END INIT SERVERDB
  99. /
  100. /
  101. INCLUDE '%DBROOT%\env\SYSDBA.ins'
  102. /
  103. INCLUDE '%DBROOT%\env\INFO.ins'
  104. /
  105. INCLUDE '%DBROOT%\env\SYSSET.ins'
  106. /
  107. INCLUDE '%DBROOT%\env\QUERY.ins'
  108. /
  109. INCLUDE '%DBROOT%\env\EASY.ins'
  110. /
  111. INCLUDE '%DBROOT%\env\CONTROL.ins'
  112. /
  113. INCLUDE '%DBROOT%\env\SQLPL.ins'
  114. /
  115. INCLUDE '%DBROOT%\env\WBAPP.ins'
  116. /
  117. /INCLUDE '%DBROOT%\env\QP.ins'
  118. /
  119. INCLUDE '%DBROOT%\env\PRECOM.ins'
  120. /
  121. INCLUDE '%DBROOT%\env\ODBC.ins'
  122. /
  123. /
  124. INIT SERVERDB
  125. /
  126. IF $RC (SHOW (domdba_loc) SYSDBA OF "DOMAIN") <> 0
  127. THEN
  128. /
  129.     RETURNCODE 0
  130. /
  131. IF $RC (SELECT domdba_loc.username from domdba_loc, sysdba_loc
  132.         where domdba_loc.username = sysdba_loc.username) <> 0
  133. THEN
  134. /
  135.     RETURNCODE 0
  136. /
  137. ELSE
  138.     BEGIN
  139. /
  140.     END INIT SERVERDB
  141. /
  142.     INCLUDE '%DBROOT%\env\ORADD.ins'
  143. /
  144.     END
  145. /
  146. END INIT SERVERDB
  147. /
  148. SQLMODE ADABAS
  149. /
  150.