Tuesday, April 6, 2010

postclone task (2) fix dba_libraries

If you run adcfgclone.pl with dbTier component, following script will be called to update libraries: ctxsys.DR$LIBX, SYS.DBMS_SUMADV_LIB, and ORDSYS.ORDIMLIBS.

$ORACLE_HOME/appsutil/install//adupdlib.sql

If you manually created the database and only run adcfgclone.pl dbTechStack before cloning database, you need to run above script manually.

cd $ORACLE_HOME/appsutil/install//

sqlplus “/ as sysdba” @adupdlib.sql so

so is the library extension on linux and solaris. Check your system to see which extension you need to you.

SQL> col owner format a10
SQL> col file_spec format a60
SQL> set linesize 200
SQL> select OWNER,LIBRARY_NAME,FILE_SPEC
from dba_libraries where FILE_SPEC is not null;

OWNER LIBRARY_NAME FILE_SPEC
---------- ------------------------------ -----------------------------------------------------------
SYS DBMS_SUMADV_LIB /opt/oracle/product/10.2.0/DEV/lib/libqsmashr.so
SYSTEM NMUC_UTILS /opt/oracle/product/10.1.0/db_1/lib/libnmuc.so
SYSTEM EPS_LIB eps.so
ORDSYS ORDIMLIBS /opt/oracle/product/10.2.0/DEV/lib/libordim10.so
MDSYS SDO_GEOR_LIZARDTECH_LIB /opt/oracle/product/10.2.0/db_2/md/dll/liblt_dbmrsid_oci.so

Above is from my DEV environment. I am missing ctxsys.DR$LIBX (it is fine as only required for version before database 10g) and system.NUMUC_UTILS and MDSYS.SDO_GEOR_LIZARDTECH_LIB are wrong.

However, liblt_dbmrsid_oci.so does not exist on the system. Nevertheless, just create or replace it with correct path:

Create or replace library system.NMUC_UTILS as ‘/opt/oracle/product/10.2.0/DEV/lib/libnumuc.so’;
/

Create or replace library mdsys.SDO_GEOR_LIZARDTECH_LIB as
‘/opt/oracle/product/10.2.0/DEV/md/dll/liblt_dbmrsid_oci.so’;
/

Check following to see if grant execute on library to the intended users are correct:

Select * from dba_tab_priv where table_name in (select library_name from dba_libraries);

No comments:

Post a Comment