Wednesday, December 10, 2008
Oracle 11gR2 Installation on RHEL 4
Oracle released 11g Release 2 and I was just waiting to get my fingers on it…!!! So downloaded the software from OTN and installed it on Linux. As of now, the software is available only on Linux.[...]
Continue Reading...
Wednesday, December 10, 2008
Dataguard Adventures - Part I...!!!!!
So, I started working on Phase-I of DR implementation....!!!! [...]
Continue Reading...
Wednesday, December 10, 2008
Dataguard Adventures - Part II...!!!!!…
In my last post,we eneded up with primary shipping archivelogs to standby that are being applied to standby.The next steps would be to setup DG BROKER for this setup to automate switchover and failover.[...]
Continue Reading...
Wednesday, December 10, 2008
When ASM rebalancing stops...!!!!
Was adding disks to ASM diskgroups few days back as a part of weekly space addition. Added one disk to each of the ASM diskgorup (CDBP and CDBP2). The disk space got reflected in both the diskgroups, but lot of interesting things were waiting for me. I was able to use space the space in CDBP2 diskgroup for tablespaces but CDBP diskgroup space got jammed…., [...]
Continue Reading...
Monday, December 8, 2008
Reducing Downtime during database movement and migrations
There are lot of strategies possible for moving a database from one server to another. The things are to be planned in a much better way when we have to do multiple things in a single window. This is what I did some time back for a database and server migration with a minimum downtime and pretty good backout plan. [...]
Continue Reading...
PLS-00201: identifier 'DBMS_LOB' must be declared error while installing Oracle Text
Repeatedly i get tasks to install Oracle Text manually in 10g databases. Metalink note 280713.1 is something that is intended for this task. Everytime after installation, i get my Oracle Text component as invalid in database.
SQL> select comp_name, status, substr(version,1,10) as version from dba_registry where comp_id = 'CONTEXT';
COMP_NAME STATUS VERSION
-------------------------------------------------------------- ----------
Oracle Text INVALID 10.2.0.4.0
Reason being,
SQL> select object_name, object_type, status from dba_objects
where owner='CTXSYS' and status != 'VALID'
order by object_name;
2 3
OBJECT_NAME OBJECT_TYPE STATUS
--------------------------------------------------------------------------------
CTX_DOC PACKAGE BODY INVALID
CTX_REPORT PACKAGE BODY INVALID
DRIDOC PACKAGE BODY INVALID
DRIREP PACKAGE BODY INVALID
DRVDOC PACKAGE BODY INVALID
DRVIMR PACKAGE BODY INVALID
Tried this to fix,
SQL> show user
USER is "SYS"
QL> alter package ctxsys.CTX_DOC compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
No errors.
SQL> connect ctxsys/*****
Connected.
SQL> alter package CTX_DOC compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY CTX_DOC:
LINE/COL ERROR
-------- -----------------------------------------------------------------
389/7 PL/SQL: Statement ignored
389/7 PLS-00201: identifier 'DBMS_LOB' must be declared
SQL> connect / as sysdba
Connected.
SQL> grant execute on sys.DBMS_LOB to ctxsys;
Grant succeeded.
SQL> connect ctxsys/winter08
Connected.
SQL> alter package CTX_DOC compile body;
Package body altered.
SQL> show err
No errors.
SQL> select object_name, object_type, status from dba_objects
where owner='CTXSYS' and status != 'VALID'
order by object_name;
no rows selected
Compiled all the invalid objects but still...
SQL> select comp_name, status, substr(version,1,10) as version from dba_registry where comp_id = 'CONTEXT'; 2
COMP_NAME STATUS VERSION
-------------------------------------------------------------- ----------
Oracle Text INVALID 10.2.0.4.0
Fix
1) De-install Oracle Text using the same metalink note (280713.1).
2) Execute the following statement from another session immediately after firing the Oracle text installation script (
SQL> grant execute on sys.DBMS_LOB to ctxsys;
Grant succeeded.
This would assign the required privilege to CTXSYS user immediately after oracle text creation script and by the time script finishes, it already has the privilege and objects won't get invalidated.
Another method to fix it is
The instalalltion script (
SQL> grant execute on sys.DBMS_LOB to ctxsys;
Once done,install Oracle Text. This installation will not invalidate the package bodies and the instalallation would be valid.
SQL> select comp_name, status, substr(version,1,10) as version from dba_registry where comp_id = 'CONTEXT'; 2
COMP_NAME STATUS VERSION
-------------------------------------------------------------- ----------
Oracle Text VALID 10.2.0.4.0
Cheers...!!!
--Rishi
SQL> select comp_name, status, substr(version,1,10) as version from dba_registry where comp_id = 'CONTEXT';
COMP_NAME STATUS VERSION
-------------------------------------------------------------- ----------
Oracle Text INVALID 10.2.0.4.0
Reason being,
SQL> select object_name, object_type, status from dba_objects
where owner='CTXSYS' and status != 'VALID'
order by object_name;
2 3
OBJECT_NAME OBJECT_TYPE STATUS
--------------------------------------------------------------------------------
CTX_DOC PACKAGE BODY INVALID
CTX_REPORT PACKAGE BODY INVALID
DRIDOC PACKAGE BODY INVALID
DRIREP PACKAGE BODY INVALID
DRVDOC PACKAGE BODY INVALID
DRVIMR PACKAGE BODY INVALID
Tried this to fix,
SQL> show user
USER is "SYS"
QL> alter package ctxsys.CTX_DOC compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
No errors.
SQL> connect ctxsys/*****
Connected.
SQL> alter package CTX_DOC compile body;
Warning: Package Body altered with compilation errors.
SQL> show err
Errors for PACKAGE BODY CTX_DOC:
LINE/COL ERROR
-------- -----------------------------------------------------------------
389/7 PL/SQL: Statement ignored
389/7 PLS-00201: identifier 'DBMS_LOB' must be declared
SQL> connect / as sysdba
Connected.
SQL> grant execute on sys.DBMS_LOB to ctxsys;
Grant succeeded.
SQL> connect ctxsys/winter08
Connected.
SQL> alter package CTX_DOC compile body;
Package body altered.
SQL> show err
No errors.
SQL> select object_name, object_type, status from dba_objects
where owner='CTXSYS' and status != 'VALID'
order by object_name;
no rows selected
Compiled all the invalid objects but still...
SQL> select comp_name, status, substr(version,1,10) as version from dba_registry where comp_id = 'CONTEXT'; 2
COMP_NAME STATUS VERSION
-------------------------------------------------------------- ----------
Oracle Text INVALID 10.2.0.4.0
Fix
1) De-install Oracle Text using the same metalink note (280713.1).
2) Execute the following statement from another session immediately after firing the Oracle text installation script (
@?/ctx/admin/catctx.sql CTXSYS SYSAUX TEMP NOLOCK)
SQL> grant execute on sys.DBMS_LOB to ctxsys;
Grant succeeded.
This would assign the required privilege to CTXSYS user immediately after oracle text creation script and by the time script finishes, it already has the privilege and objects won't get invalidated.
Another method to fix it is
The instalalltion script (
@?/ctx/admin/catctx.sql)
calls another script (@?/ctx/admin/ctxsys.sql)
to create CTXSYS user for Oracle Text installation. This (ctxsys.sql) script creates CTXSYS user and assign the required privileges for installation. Just at the start of script where this script assigns privileges to CTXSYS user, add the following line (to ctxsys.sql script)SQL> grant execute on sys.DBMS_LOB to ctxsys;
Once done,install Oracle Text. This installation will not invalidate the package bodies and the instalallation would be valid.
SQL> select comp_name, status, substr(version,1,10) as version from dba_registry where comp_id = 'CONTEXT'; 2
COMP_NAME STATUS VERSION
-------------------------------------------------------------- ----------
Oracle Text VALID 10.2.0.4.0
Cheers...!!!
--Rishi
Subscribe to:
Post Comments (Atom)
Thanks! This did exactly what I was hoping it would! Kristin - Minneapolis, MN (US)
ReplyDeleteThx very much
ReplyDeleteYou saved my day....
ReplyDeleteRishi..Thank You for the detail explanation.
ReplyDelete