Google it ....

Showing posts with label custom characterset. Show all posts
Showing posts with label custom characterset. Show all posts

Wednesday, August 2, 2017

How to add oracle database with custom character set into OEM12c

If you have custom characterset database and you want to add this database into Oracle Enterprise Manager(OEM), during addition it definitely fails and here I''ll try to help you.
Our environment:
Operating System is CentOS release 6.6 (Final) x86_64 and installed Oracle Enterprise Manager 12c Release 4 (12.1.0.4.0), Repository Database - Oracle Database 12c (12.1.0.2.0) exist on same host which character set is AL32UTF8.
We have Oracle Database 11g (11.2.0.3) with custom character set on another host, also we have installed agent and our goal is to monitor that database with OEM12c, hence we want to add this database into OEM.
Our custom character set nlt file is: lx22900.nlt, you also need its nlb file.
1)
Copy lx0boot.nlb, lx1boot.nlb, lx22900.nlb files into :
$ORACLE_HOME/nls/data/

/u1/app/oracle/oem12c/Oracle_WT/nls/data/

$OMS_HOME/nls/data/

2)
Add custom locale definitions to java components with Ginstall utility
java -cp /u1/app/oracle/oem12c/oms/jlib/orai18n-tools.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-utility.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-collation.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-lcsd.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-mapping.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-net.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-servlet.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n-translation.jar:

/u1/app/oracle/oem12c/oms/jlib/orai18n.jar:

/u1/app/oracle/oem12c/oms/lib/xmlparserv2.jar

Ginstall -a lx22900.nlt

output must be :
oracle/i18n/data/lx22900.glb has been successfully stored in gdk_custom.jar CharConv1ByteBuilder lx22900.nlt

3)
create a custom character set file custom_orai18n-mapping.jar, that includes our custom characterset which for example is GEO8:
java -jar $OMS_HOME/jlib/orai18n.jar -custom-charsets-jar custom_orai18n-mapping.jar -charset GEO8

Added Character set : GEO8

Check it:
java -jar custom_orai18n-mapping.jar

Oracle Globalization Development Kit - 11.1.0.7.0 - Production
This custom character set jar/zip file was created with the following command: 

java -jar orai18n.jar -custom-charsets-jar custom_orai18n-mapping.jar -charset GEO8

4)
Copy generated files into these directories:
cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/Oracle_WT/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/Oracle_WT/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oracle_common/modules/oracle.nlsrtl_11.1.0/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oracle_common/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oms/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/oms/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/oem12c/wlserver_10.3/server/ext/jdbc/oracle/11g/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/agent/core/12.1.0.4.0/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/agent/core/12.1.0.4.0/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/owb/lib/patches/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/inventory/Scripts/ext/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/sqldeveloper/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/oui/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/oc4j/jdbc/lib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/oracle/product/11.2.0/jlib/

cp gsstemp.zip gdk_custom.jar custom_orai18n-mapping.jar /u1/app/database/stage/ext/jlib/

5)
Add CLASSPATH and LD_LIBRARY_PATH environment variables into .bash_profile file
Load .bash_profile parameters with command :
source .bash_profile
 
Check.bash_profile parameters with command
Cat .bash_profile
ORACLE_SID=OEM12C
 
ORACLE_BASE=/u1/app/oracle
 
ORACLE_HOME=$ORACLE_BASE/product/11.2.0
 
OMS_HOME=/u1/app/oracle/oem12c/oms
 
AGENT_HOME=/u1/app/oracle/agent/core/12.1.0.4.0
 
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
 
CLASSPATH=/u1/app/oracle/oem12c/oms/jlib/custom_orai18n-mapping.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-tools.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-utility.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-collation.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-lcsd.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-mapping.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-net.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-servlet.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n-translation.jar:/u1/app/oracle/oem12c/oms/jlib/orai18n.jar:/u1/app/oracle/oem12c/oms/jlib/:gdk_custom.jar:/u1/app/oracle/oem12c/oms/jlib/:gsstemp.zip
 
LD_LIBRARY_PATH=$OMS_HOME/jlib
 
export ORACLE_BASE ORACLE_HOME ORACLE_SID OMS_HOME AGENT_HOME PATH CLASSPATH LD_LIBRARY_PATH
 
6)
Restart OMS, AGENT and repository database
$OMS_HOME/bin/emctl stop oms –all
 
$AGENT_HOME/bin/emctl stop agent
 
sqlplus / as sysdba
 
SQL> shutdown immediate;
 
SQL> startup;

$OMS_HOME/bin/emctl start oms

$AGENT_HOME/bin/emctl start agent

7)
Copy gsstemp.zip and gdk_custom.jar into client's agent jlib directory where resides database with custom character set, for example:
cp gsstemp.zip gdk_custom.jar oracle@testhost:/u1/agent12c/core/12.1.0.4.0/jlib

and restart client's agent.
That's all now you can add custom character set database into oem12c.