home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Treasures, Inc.
/
pctreasures.mdf
/
WINDOWS
/
adabas
/
f_0001
/
env
/
dbs.ins
< prev
next >
Wrap
Text File
|
1999-11-01
|
4KB
|
150 lines
/**
/ ==================================================================
/* @(#)DBS.ins 10.01.00 1998-01-30
/ ==================================================================
/ Description
/ ===========
/ This file is necessary to install the conversational components
/ of this database. It serves in the following cases:
/
/ 1. A new SERVERDB has been defined
/ INIT CONFIG and ACTIVATE SERVERDB have been executed
/
/ This LOAD file will install the complete system table environment
/ in order to use the complete set of conversational components
/ of this database (i.e.: LOAD, QUERY, EASY, SQLPL, DOMAIN).
/
/ 2. A newly delivered version of the conversational components shall
/ be installed by updating the message and help infos
/
/ The installation is done by creating tables only if they don't yet
/ exist. Further during installation the running user is changed
/ so that some parts of the installation run under the special
/ user SYSDBA and other under the special user DOMAIN.
/
/ Calling Syntax
/ ==============
/ This LOAD file has to be started as SYSDBA user (see the definition
/ in the XPARAM file).
/
/ Example: Execution of the DBS.ins file in batch mode
/ xload -u <sysdba>,<syspwd> -b DBS.ins
/
/ Example: Execution of the DBS.ins file in interactiv mode
/
/ xload -u <sysdba>,<syspwd>
/ run 'DBS.ins'
/
/ In order to install a small test system the LOAD file DBSMIN.ins
/ is provided.
/
/ Calling Hierarchy
/ =================
/ DBS ----------+---- SYSDBA
/ |---- INFO
/ |---- SYSSET
/ |---- QUERY
/ |---- EASY
/ |---- CONTROL
/ |---- SQLPL
/ |---- WBAPP
/ |---- QP
/ |---- PRECOM
/ |---- ODBC
/ +---- ORADD
/
/ (call from x_dbinst for complete installation)
/ DOMAIN -------+---- XDD
/ |---- SPROC
/ +---- SFUNC
/ ==================================================================
/
SQLMODE ADABAS
/
INIT SERVERDB
/
AUTOCOMMIT OFF
/
IF $RC (SHOW (thisuser) USER CURRENT) <> 0
THEN
/
RETURNCODE 0
/
IF $RC (SHOW (sysdba_loc) USER LOCALSYSDBA) <> 0
THEN
/
RETURNCODE 0
/
IF $RC (SELECT thisuser.username from thisuser, sysdba_loc
where thisuser.username = sysdba_loc.username) <> 0
THEN
BEGIN
/
SAY *** User is not SYSDBA ***
/
END INIT SERVERDB
/
STOP 7
/
END
/
/
IF $RC (SHOW USER DOMAIN) <> 0
THEN
/
CREATE USER DOMAIN PASSWORD &1 DBA
/
END INIT SERVERDB
/
/
INCLUDE '%DBROOT%\env\SYSDBA.ins'
/
INCLUDE '%DBROOT%\env\INFO.ins'
/
INCLUDE '%DBROOT%\env\SYSSET.ins'
/
INCLUDE '%DBROOT%\env\QUERY.ins'
/
INCLUDE '%DBROOT%\env\EASY.ins'
/
INCLUDE '%DBROOT%\env\CONTROL.ins'
/
INCLUDE '%DBROOT%\env\SQLPL.ins'
/
INCLUDE '%DBROOT%\env\WBAPP.ins'
/
/INCLUDE '%DBROOT%\env\QP.ins'
/
INCLUDE '%DBROOT%\env\PRECOM.ins'
/
INCLUDE '%DBROOT%\env\ODBC.ins'
/
/
INIT SERVERDB
/
IF $RC (SHOW (domdba_loc) SYSDBA OF "DOMAIN") <> 0
THEN
/
RETURNCODE 0
/
IF $RC (SELECT domdba_loc.username from domdba_loc, sysdba_loc
where domdba_loc.username = sysdba_loc.username) <> 0
THEN
/
RETURNCODE 0
/
ELSE
BEGIN
/
END INIT SERVERDB
/
INCLUDE '%DBROOT%\env\ORADD.ins'
/
END
/
END INIT SERVERDB
/
SQLMODE ADABAS
/