* SET_DB_O.TXT HARASAWA (Oracle)
=IF{_DB!='O'}JUMP{O_SKIP};
************( ALTER DATABASE ARCHIVELOG 化 )***********************
=IF{$ARCHIVE='NO'}JUMP{ARCHIVE_SKIP};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.TXT,OT,/};
=WRITE{1,'SHUTDOWN IMMEDIATE'};
=WRITE{1,'STARTUP MOUNT'};
=IF{$ARCHIVE='YES'}WRITE{1,'ALTER SYSTEM SET LOG_ARCHIVE_DEST_1=''LOCATION=?WC.BLOG1?''  SCOPE=BOTH;'};
=IF{$ARCHIVE='YES'}WRITE{1,'ALTER DATABASE ARCHIVELOG;'};
=WRITE{1,'ALTER DATABASE OPEN;'};
=IF{_DB_SOFT<'O12'}JUMP{J};
=WRITE{1,'ALTER PLUGGABLE DATABASE ALL OPEN;'};
=J:IF_NOT{_DB_SOFT/'O26'}JUMP{J};
=WRITE{1,'alter session set container=?WC.INSTANCE?;'};
=WRITE{1,'grant select on ALL_ALL_TABLES to public;'};
=WRITE{1,'grant select on ALL_OBJECTS to public;'};
=WRITE{1,'grant select on ALL_VIEWS to public;'};
=WRITE{1,'grant select on ALL_SOURCE to public;'};
=WRITE{1,'grant select on ALL_TAB_COLUMNS to public;'};
=WRITE{1,'grant select on ALL_INDEXES to public;'};
=WRITE{1,'grant select on ALL_IND_COLUMNS to public;'};
=WRITE{1,'grant select on ALL_TAB_PRIVS to public;'};
=J:
=WRITE{1,'EXIT'};
=WRITE_CLOSE{1};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.BAT,OT,SHIFT_JIS};
W+=WRITE{1,'@ECHO OFF'};
W+=WRITE{1,'?$WC.ECHO? ★注意★この処理は時間がかかります、そのままお待ちください。'};
W+=WRITE{1,'sqlplus -l / as sysdba @?_TMP?SETUP_?_SYSTEM?.TXT'};
W-=WRITE{1,'. ?$INSTALL_PATH?/bin/oracle_env.sh'};
W-=WRITE{1,'?$INSTALL_PATH??_P?bin?_P?sqlplus -l / as sysdba @?_TMP?SETUP_?_SYSTEM?.TXT > ?_TMP?SETUP_?_SYSTEM?.LOG'};
=WRITE_CLOSE{1};
W-=COMMAND{chmod 777 ?_TMP?SETUP_?_SYSTEM?.BAT};
W+=COMMAND{?_TMP?SETUP_?_SYSTEM?.BAT};
W-=COMMAND{su - oracle -c ?_TMP?SETUP_?_SYSTEM?.BAT};
=ERASE_FILE{SETUP_?_SYSTEM?.BAT};
=ERASE_FILE{SETUP_?_SYSTEM?.TXT};
=ARCHIVE_SKIP:
*****( CREATE TABLE SPACE )**********************************
*(PERMISSION_BEGIN)*
=IF{_DB!='O'}JUMP{O_SKIP};
=MESSAGE{CREATE TABLESPACE};
REPEAT0=$W0.PERMISSION
REPEAT=4
=IF_ERROR_LOGIN_SQL{CREATE TABLESPACE
= ?WC.IS??WC.##?_?WC.PER$$?
= DATAFILE '?WC.DDAT##??_P??WC.IS??WC.##?_?WC.PER$$?.ORA'
= SIZE 7M AUTOEXTEND ON NEXT 1M DEFAULT STORAGE
= (INITIAL 7M NEXT 1M PCTINCREASE 0) ONLINE}
=   IF{_DB_I_ERROR!='EXIST'}ERROR{?_DB_ERROR??_ERROR?};
REPEAT0=
**********( CREATE USER )*****************
=MESSAGE{CREATE USER};
REPEAT0=$W0.PERMISSION
REPEAT=2 (WC.REAL_TEST##)
***=SET{WC.PAS=WC.PASSWORD_?WC.REAL_TEST##?};
=SET{WC.LTR=WC.REAL_TEST##};
=SET{WC.M_W='M'};
=SET{W0.REPEAT2CNT=0};
REPEAT2=4 (WC.DIOL--)
=COMPUTE{W0.REPEAT2CNT+=1};
=MESSAGE{CREATE USER (?WC.PER$$?)}; 
=SET{WC.DIOL=WC.DIOL?W0.REPEAT2CNT?};
***=IF{W0.REPEAT2CNT=4}SET{WC.PAS=WC.PASSWORD_LINK};
=IF{W0.REPEAT2CNT=4}SET{WC.LTR='LINK'};
=SET{WC.USER='?WC.IS??WC.R_T##?_?WC.DIOL?_?WC.PER$$?'};
***=IF_ERROR_LOGIN_SQL{CREATE USER ?WC.USER? IDENTIFIED BY
***= ?WC.PAS? DEFAULT TABLESPACE
***= ?WC.IS??WC.R_T##?_?WC.M_W?_?WC.PER$$?}
=IF_ERROR_LOGIN_ZZ_ADDLOGIN{?WC.LTR?}{?WC.USER?}
=  {?WC.IS??WC.R_T##?_?WC.M_W?_?WC.PER$$?}
=  IF{_DB_I_ERROR!='EXIST'}ERROR{?_DB_ERROR??_ERROR?};
=IF_ERROR_LOGIN_SQL{GRANT CONNECT,RESOURCE,UNLIMITED
= TABLESPACE TO ?WC.USER?}ERROR{?_DB_ERROR??_ERROR?};
=IF_ERROR_LOGIN_SQL{GRANT CREATE VIEW TO ?WC.USER?}
=  ERROR{?_DB_ERROR??_ERROR?};
=SET{WC.M_W='W'};
REPEAT0=
*****( GRANT USER )******************************************
=MESSAGE{GRANT DBA};
=IF_ERROR_LOGIN_SQL{GRANT DBA TO ?WC.IS?R_D_ZZZZ}
=  ERROR{?_DB_ERROR??_ERROR?};
=JUMP{O_SKIP};
*******( CREATE VIEW )***************************************
*****( OBJECT_VIEW )*****************************************
NAME=O_OBJECT_VIEW
=SET{WC.I=WC.INSERT+'''O'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_KIND,SYSTEM_REAL,SYSTEM_WORK')};
COPY=ADD10
=SQL{?WC?',SYSTEM_USER_X,SYSTEM_NAME,SYSTEM_TEXT')};
COPY=ADD10
=SQL{?WC?',SYSTEM_ADD_DATE17,SYSTEM_CHANGE_DATE17)')};
COPY=ADD10
=SQL{?WC?' AS SELECT CAST(''TABLE'' AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(T.OWNER,LENGTH(T.OWNER)-5,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(T.TABLE_NAME AS NCHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(NULL AS NVARCHAR2(2000))')};
COPY=ADD10
=SQL{?WC?',CAST(TO_CHAR(CREATED,''YYYYMMDDHH24MISS'')')};
COPY=ADD10
=SQL{?WC?'||''000''  AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?' FROM ALL_ALL_TABLES T,ALL_OBJECTS O')};
COPY=ADD10
=SQL{?WC?' WHERE T.OWNER IN')};
COPY=ADD10
=SQL{?WC?'(?WC.O_OWNER?)')};
COPY=ADD10
=SQL{?WC?' AND T.OWNER=O.OWNER')};
COPY=ADD10
=SQL{?WC?' AND T.TABLE_NAME=OBJECT_NAME')};
COPY=ADD10
=SQL{?WC?' AND T.TABLE_NAME NOT LIKE ''BIN$%''')};
COPY=ADD10
=SQL{?WC?' UNION SELECT CAST(''VIEW'' AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(O.OWNER,LENGTH(O.OWNER)-5,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(VIEW_NAME AS NCHAR(30))')};
COPY=ADD10
=IF{_DB_SOFT>='O12'}
=   SQL{?WC?',CAST(TEXT_VC AS NVARCHAR2(2000))')}JUMP{};
=SQL{   ?WC?',CAST(NULL    AS NVARCHAR2(2000))')};
COPY=ADD10
=SQL{?WC?',CAST(TO_CHAR(O.CREATED,''YYYYMMDDHH24MISS'')')};
COPY=ADD10
=SQL{?WC?'||''000'' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17)) FROM ALL_VIEWS V')};
COPY=ADD10
=SQL{?WC?',ALL_OBJECTS O WHERE V.OWNER IN')};
COPY=ADD10
=SQL{?WC?'(?WC.O_OWNER?)')};
COPY=ADD10
=SQL{?WC?' AND V.OWNER=O.OWNER')};
COPY=ADD10
=SQL{?WC?' AND V.VIEW_NAME=O.OBJECT_NAME')};
COPY=ADD10
=SQL{?WC?' UNION SELECT CAST(SUBSTR(S.TYPE,1,4)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(S.OWNER,LENGTH(S.OWNER)-5,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(S.NAME  AS NCHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(S.TEXT AS NVARCHAR2(2000))')};
COPY=ADD10
=SQL{?WC?',CAST(TO_CHAR(O.CREATED,''YYYYMMDDHH24MISS'')')};
COPY=ADD10
=SQL{?WC?'||''000'' AS CHAR(17))')};
COPY=ADD10
=SQL{?WC?',CAST('' '' AS CHAR(17)) FROM')};
COPY=ADD10
=SQL{?WC?' ALL_SOURCE S,ALL_OBJECTS O')};
COPY=ADD10
=SQL{?WC?' WHERE S.OWNER IN')};
COPY=ADD10
=SQL{?WC?'(?WC.O_OWNER?)')};
COPY=ADD10
=SQL{?WC?' AND S.OWNER=O.OWNER')};
COPY=ADD10
=SQL{?WC?' AND S.NAME=O.OBJECT_NAME')};
COPY=ADD10
=SQL{?WC?' AND S.TYPE IN(''PROCEDURE'',''FUNCTION''')};
COPY=ADD10
=SQL{?WC?',''TRIGGER'')')};
*****( COLUMN_VIEW )*****************************************
NAME=O_COLUMN_VIEW
=SET{WC.I=WC.INSERT+'''O'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_KIND,SYSTEM_REAL,SYSTEM_WORK')};
COPY=ADD10
=SQL{?WC?',SYSTEM_USER_X,SYSTEM_NAME,SYSTEM_SEQ')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DATA_NAME,SYSTEM_DEFAULT_TYPE')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DEFAULT_LENGTH1')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DEFAULT_LENGTH2,SYSTEM_DEFAULT')};
COPY=ADD10
=SQL{?WC?',SYSTEM_NULL)AS SELECT')};
COPY=ADD10
=SQL{?WC?' CAST(CASE G.OBJECT_TYPE')};
COPY=ADD10
=SQL{?WC?' WHEN ''TABLE'' THEN ''TABLE''')};
COPY=ADD10
=SQL{?WC?' ELSE SUBSTR(G.OBJECT_TYPE,1,4)END')};
COPY=ADD10
=SQL{?WC?' AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(C.OWNER,LENGTH(C.OWNER)-5,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(C.TABLE_NAME AS NCHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(C.COLUMN_ID AS INT)')};
COPY=ADD10
=SQL{?WC?',CAST(C.COLUMN_NAME AS NCHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE C.DATA_TYPE WHEN ''NUMBER''')};
COPY=ADD10
=SQL{?WC?' THEN CASE WHEN C.DATA_PRECISION IS NULL')};
COPY=ADD10
=SQL{?WC?' THEN ''INT'' ELSE ''DECIMAL'' END')};
COPY=ADD10
=SQL{?WC?' WHEN ''VARCHAR2''  THEN ''VARCHAR''')};
COPY=ADD10
=SQL{?WC?' WHEN ''NVARCHAR2'' THEN ''NVARCHAR''')};
COPY=ADD10
=SQL{?WC?' ELSE CASE WHEN C.DATA_TYPE LIKE')};
COPY=ADD10
=SQL{?WC?' ''TIMESTAMP%'' THEN ''DATETIME''')};
COPY=ADD10
=SQL{?WC?' ELSE SUBSTR(C.DATA_TYPE,1,9) END END')};
COPY=ADD10
=SQL{?WC?' AS CHAR(9))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE WHEN C.DATA_TYPE=''NUMBER''')};
COPY=ADD10
=SQL{?WC?' AND C.DATA_PRECISION IS NOT NULL')};
COPY=ADD10
=SQL{?WC?' OR C.DATA_TYPE IN(''CHAR'',''VARCHAR2''')};
COPY=ADD10
=SQL{?WC?',''NCHAR'',''NVARCHAR2'')')};
COPY=ADD10
=SQL{?WC?' THEN CASE WHEN C.DATA_PRECISION IS NULL')};
COPY=ADD10
=SQL{?WC?' THEN CASE WHEN C.DATA_TYPE')};
COPY=ADD10
=SQL{?WC?' IN(''NCHAR'',''NVARCHAR2'')')};
COPY=ADD10
=SQL{?WC?' THEN C.DATA_LENGTH/2')};
COPY=ADD10
=SQL{?WC?' ELSE C.DATA_LENGTH END')};
COPY=ADD10
=SQL{?WC?' ELSE C.DATA_PRECISION END')};
COPY=ADD10
=SQL{?WC?' WHEN C.DATA_TYPE LIKE ''TIMESTAMP%''')};
COPY=ADD10
=SQL{?WC?' THEN 17')};
COPY=ADD10
=SQL{?WC?' WHEN C.DATA_TYPE=''DATE'' THEN 8')};
COPY=ADD10
=SQL{?WC?' WHEN C.DATA_TYPE=''TEXT'' THEN 4000')};
COPY=ADD10
=SQL{?WC?' ELSE 9 END AS INT)')};
COPY=ADD10
=SQL{?WC?',CAST(CASE C.DATA_TYPE WHEN ''NUMBER''')};
COPY=ADD10
=SQL{?WC?' THEN CASE WHEN C.DATA_SCALE IS NULL')};
COPY=ADD10
=SQL{?WC?' THEN 0 ELSE C.DATA_SCALE END')};
COPY=ADD10
=SQL{?WC?' ELSE 0 END AS INT),DATA_DEFAULT')};
COPY=ADD10
=SQL{?WC?',CAST(CASE NULLABLE WHEN ''N''')};
COPY=ADD10
=SQL{?WC?' THEN ''0'' ELSE ''1'' END')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?' FROM ALL_TAB_COLUMNS C')};
COPY=ADD10
=SQL{?WC?',ALL_OBJECTS G WHERE')};
COPY=ADD10
=SQL{?WC?' C.OWNER IN')};
COPY=ADD10
=SQL{?WC?'(?WC.O_OWNER?)')};
COPY=ADD10
=SQL{?WC?' AND C.OWNER=G.OWNER')};
COPY=ADD10
=SQL{?WC?' AND C.TABLE_NAME=G.OBJECT_NAME')};
COPY=ADD10
=SQL{?WC?' AND C.TABLE_NAME NOT LIKE ''BIN$%''')};
COPY=ADD10
*****( INDEX_VIEW )******************************************
NAME=O_INDEX_VIEW
=SET{WC.I=WC.INSERT+'''O'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_REAL,SYSTEM_WORK')};
COPY=ADD10
=SQL{?WC?',SYSTEM_USER_X,SYSTEM_NAME')};
COPY=ADD10
=SQL{?WC?',SYSTEM_DATA_NAME,SYSTEM_IX')};
COPY=ADD10
=SQL{?WC?',SYSTEM_NO)AS SELECT')};
COPY=ADD10
=SQL{?WC?' CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(K.TABLE_OWNER')};
COPY=ADD10
=SQL{?WC?',LENGTH(K.TABLE_OWNER)-5,1)')};
COPY=ADD10
=SQL{?WC?'   AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(K.TABLE_NAME AS NCHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(K.COLUMN_NAME AS NCHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(I.INDEX_NAME')};
COPY=ADD10
=SQL{?WC?',LENGTH(RTRIM(I.TABLE_NAME))+1,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(TO_CHAR(K.COLUMN_POSITION-CASE')};
COPY=ADD10
=SQL{?WC?' I.UNIQUENESS WHEN')};
COPY=ADD10
=SQL{?WC?' ''UNIQUE'' THEN 1 ELSE 0 END) AS INT)')};
COPY=ADD10
=SQL{?WC?' FROM ALL_INDEXES I,ALL_IND_COLUMNS K')};
COPY=ADD10
=SQL{?WC?' WHERE I.TABLE_NAME=K.TABLE_NAME')};
COPY=ADD10
=SQL{?WC?' AND I.INDEX_NAME=K.INDEX_NAME ')};
COPY=ADD10
=SQL{?WC?' AND I.INDEX_NAME IN(I.TABLE_NAME||''0''')};
COPY=ADD10
=SQL{?WC?',I.TABLE_NAME||''1'',I.TABLE_NAME||''2''')};
COPY=ADD10
=SQL{?WC?',I.TABLE_NAME||''3'',I.TABLE_NAME||''4''')};
COPY=ADD10
=SQL{?WC?',I.TABLE_NAME||''5'',I.TABLE_NAME||''6''')};
COPY=ADD10
=SQL{?WC?',I.TABLE_NAME||''7'',I.TABLE_NAME||''8''')};
COPY=ADD10
=SQL{?WC?',I.TABLE_NAME||''9'') AND K.TABLE_OWNER IN')};
COPY=ADD10
=SQL{?WC?'(?WC.O_OWNER?)')};
COPY=ADD10
=SQL{?WC?' AND K.TABLE_OWNER=I.TABLE_OWNER')};
*****( GRANT_VIEW )******************************************
NAME=O_GRANT_VIEW
=SET{WC.I=WC.INSERT+'''O'','};
COPY=ADD10
=SQL{?WC?'(SYSTEM_KIND,SYSTEM_REAL,SYSTEM_WORK')};
COPY=ADD10
=SQL{?WC?',SYSTEM_USER_X,SYSTEM_NAME,SYSTEM_GRANT')};
COPY=ADD10
=SQL{?WC?',SYSTEM_SELECT,SYSTEM_INSERT')};
COPY=ADD10
=SQL{?WC?',SYSTEM_UPDATE,SYSTEM_DELETE')};
COPY=ADD10
=SQL{?WC?',SYSTEM_EXECUTE)AS SELECT')};
COPY=ADD10
=SQL{?WC?' CAST(CASE G.OBJECT_TYPE')};
COPY=ADD10
=SQL{?WC?' WHEN ''TABLE'' THEN ''TABLE''')};
COPY=ADD10
=SQL{?WC?' ELSE SUBSTR(G.OBJECT_TYPE,1,4) END')};
COPY=ADD10
=SQL{?WC?' AS CHAR(5))')};
COPY=ADD10
=SQL{?WC?',CAST(''?_Q?_REAL_TEST?_Q?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(''?WC.MAST_WORK?'' AS CHAR(4))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(G.OWNER,LENGTH(G.OWNER)-5,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(G.OBJECT_NAME  AS NCHAR(30))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE WHEN LENGTH(RTRIM(G0.GRANTEE))')};
COPY=ADD10
=SQL{?WC?'>6 THEN SUBSTR(G0.GRANTEE')};
COPY=ADD10
=SQL{?WC?',LENGTH(RTRIM(G0.GRANTEE))-5)')};
COPY=ADD10
=SQL{?WC?' ELSE G0.GRANTEE END AS CHAR(6))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE G0.PRIVILEGE')};
COPY=ADD10
=SQL{?WC?' WHEN ''SELECT''')};
COPY=ADD10
=SQL{?WC?' THEN ''S'' ELSE '' '' END AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(G1.PRIVILEGE,1,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(G2.PRIVILEGE,1,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(SUBSTR(G3.PRIVILEGE,1,1)')};
COPY=ADD10
=SQL{?WC?' AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?',CAST(CASE G0.PRIVILEGE')};
COPY=ADD10
=SQL{?WC?' WHEN ''EXECUTE'' THEN ''E''')};
COPY=ADD10
=SQL{?WC?' ELSE '' '' END AS CHAR(1))')};
COPY=ADD10
=SQL{?WC?' FROM ALL_OBJECTS G')};
COPY=ADD10
=SQL{?WC?' INNER JOIN ALL_TAB_PRIVS G0')};
COPY=ADD10
=SQL{?WC?' ON G0.PRIVILEGE')};
COPY=ADD10
=SQL{?WC?' IN(''SELECT'',''EXECUTE'')')};
COPY=ADD10
=SQL{?WC?' AND G0.GRANTOR=G.OWNER')};
COPY=ADD10
=SQL{?WC?' AND G0.TABLE_NAME=G.OBJECT_NAME')};
COPY=ADD10
=SQL{?WC?' LEFT JOIN ALL_TAB_PRIVS G1')};
COPY=ADD10
=SQL{?WC?' ON G1.PRIVILEGE=''INSERT''')};
COPY=ADD10
=SQL{?WC?' AND G1.GRANTOR=G.OWNER')};
COPY=ADD10
=SQL{?WC?' AND G1.TABLE_NAME=G.OBJECT_NAME')};
COPY=ADD10
=SQL{?WC?' AND G1.GRANTEE=G0.GRANTEE')};
COPY=ADD10
=SQL{?WC?' LEFT JOIN ALL_TAB_PRIVS G2')};
COPY=ADD10
=SQL{?WC?' ON G2.PRIVILEGE=''UPDATE''')};
COPY=ADD10
=SQL{?WC?' AND G2.GRANTOR=G.OWNER')};
COPY=ADD10
=SQL{?WC?' AND G2.TABLE_NAME=G.OBJECT_NAME ')};
COPY=ADD10
=SQL{?WC?' AND G2.GRANTEE=G0.GRANTEE')};
COPY=ADD10
=SQL{?WC?' LEFT JOIN ALL_TAB_PRIVS G3')};
COPY=ADD10
=SQL{?WC?' ON G3.PRIVILEGE=''DELETE''')};
COPY=ADD10
=SQL{?WC?' AND G3.GRANTOR=G.OWNER')};
COPY=ADD10
=SQL{?WC?' AND G3.TABLE_NAME=G.OBJECT_NAME')};
COPY=ADD10
=SQL{?WC?' AND G3.GRANTEE=G0.GRANTEE')};
COPY=ADD10
=SQL{?WC?' WHERE G.OWNER IN')};
COPY=ADD10
=SQL{?WC?'(?WC.O_OWNER?)')};
COPY=ADD10
=SQL{?WC?' AND (OBJECT_TYPE')};
COPY=ADD10
=SQL{?WC?' IN(''TABLE'',''VIEW'')')};
COPY=ADD10
=SQL{?WC?' AND G0.PRIVILEGE=''SELECT''')};
COPY=ADD10
=SQL{?WC?' OR OBJECT_TYPE')};
COPY=ADD10
=SQL{?WC?' IN(''PROCEDURE'',''TRIGGER'')')};
COPY=ADD10
=SQL{?WC?' AND G0.PRIVILEGE=''EXECUTE'')')};
COPY=ADD10
=SQL{?WC?' AND (G0.GRANTEE LIKE')};
COPY=ADD10
=SQL{?WC?' ''?_Q?_DB_HEADER?_Q?%''')};
COPY=ADD10
=SQL{?WC?' OR G0.GRANTEE =''PUBLIC'')')};
COPY=ADD10
=SQL{?WC?' AND G.OBJECT_NAME NOT LIKE ''BIN$%'' ')};
NAME=
*************************************************************
=O_SKIP:
=SET{_REAL_TEST='REAL'};
*(PERMISSION_END)*
=IF_NOT{_DB_SOFT/'O18',/'O23'}JUMP{NOT_O18};
=SPLIT_CHAR{WC.SYS_ALL_}{'ALL_TABLES,OBJECTS,VIEWS,TAB_COLUMNS,INDEXES,IND_COLUMNS,SOURCE,TAB_PRIVS'}{','};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.TXT,OT};
REPEAT=8
=WRITE{1,'GRANT SELECT ON SYS.ALL_?WC.SYS_ALL_##? TO I_?SYSTEM?_R_D_ZZZZ WITH GRANT OPTION;'};
=WRITE{1,'GRANT SELECT ON SYS.ALL_?WC.SYS_ALL_##? TO I_?SYSTEM?_T_D_ZZZZ WITH GRANT OPTION;'};
REPEAT=
=WRITE{1,'EXIT'};
=WRITE_CLOSE{1};
=WRITE_OPEN{1,?_TMP?SETUP_?_SYSTEM?.BAT,OT,SHIFT_JIS};
W+=WRITE{1,'@ECHO OFF'};
W+=WRITE{1,'sqlplus -l sys/?PASSWORD_ADMIN?@localhost:1521/?INSTANCE? as sysdba @?_TMP?SETUP_?_SYSTEM?.TXT'};
**W+=WRITE{1,'PAUSE'};
W-=WRITE{1,'?$INSTALL_PATH??_P?bin?_P?sqlplus -l sys/?PASSWORD_ADMIN?@localhost:1521/?INSTANCE? as sysdba @?_TMP?SETUP_?_SYSTEM?.TXT > ?_TMP?SETUP_?_SYSTEM?.LOG'};
=WRITE_CLOSE{1};
W-=COMMAND{chmod 777 ?_TMP?SETUP_?_SYSTEM?.BAT};
W+=COMMAND{?_TMP?SETUP_?_SYSTEM?.BAT};
W-=COMMAND{su - oracle -c ?_TMP?SETUP_?_SYSTEM?.BAT};
=ERASE_FILE{SETUP_?_SYSTEM?.BAT};
=ERASE_FILE{SETUP_?_SYSTEM?.TXT};
=NOT_O18: