-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Author       : Sameer S Choudhari
-- Description  : Oracle Text Installation
-- Call Syntax  : @oracle_text_install.sql
-- Last Modified: 17/03/2015
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SET ECHO ON
SPOOL oracle_text_install.LOG
CONNECT / AS   SYSDBA
@?/ctx/ADMIN/catctx.SQL ctxsys SYSAUX temp nolock
CONNECT ctxsys/ctxsys
@?/ctx/ADMIN/DEFAULTS/dr0defin.SQL "ENGLISH";
CONNECT       /AS   SYSDBA 
ALTER USER ctxsys ACCOUNT LOCK PASSWORD EXPIRE;
SET LINES 220 PAGES 49999 ECHO ON 

COLUMN host_name 	FORMAT a30
COLUMN status	 	FORMAT a15
SELECT D.dbid,
    D.NAME,
    D.created,
    D.log_mode,
    D.open_mode,
    D.database_role,
    I.instance_name,
    I.host_name,
    I.VERSION,
    I.startup_time,
    I.status,
    I.instance_role
FROM gv$database D,
    gv$instance I
WHERE D.NAME=I.instance_name ;

COLUMN comp_name 	FORMAT a50
COLUMN comp_id 		FORMAT a20
COLUMN status	 	FORMAT a20
COLUMN SCHEMA	 	FORMAT a30
SELECT comp_id,
    comp_name,
    VERSION,
    status,
    NAMESPACE,
    SCHEMA
FROM dba_registry;
  SPOOL OFF