Tuesday, July 29, 2014

OID 11.1.1.7.0 Add Instance

In this post, I will cover how to add an instance of OID to an existing installation of OID home

Instance addition is slightly different from OVD instance addition as you would notice from my previous post here.

My existing OID setup was 11.1.1.7.0.

ORACLE_HOME=C:\Oracle\Middleware\Oracle_IDM2
ORACLE_INSTANCE=C:\Oracle\Middleware\asinst_2

C:\Oracle\Middleware\asinst_2\bin>opmnctl.bat createcomponent  -componentName oi
d2 -componentType OID -adminPort 7002 -Db_info "localhost:1521:orcl.mydomain.com
"

Command requires login to weblogic admin server (Deepak-PC.mydomain.com):
  Username: weblogic
  Password:

Creating empty component directories...Done
Provisioning OID files for oid2
  OID onCreate....

Enter ODS password:
  Validating OID input parameters
Enter ODSSM password:
Enter OID admin password:
  Creating wallet and tnsnames.ora for OID
  Adding configuration entry for OID
  Updating opmn.xml with OID snippet
  Updating component-logs.xml with OID name
  Setting proxy mbean properties
Registering oid2 component
Command succeeded.




                                                                                                                                                             Start all the servers and check the status














                                                                                                                                                                                                                  
                                                                                                                                                           

























                                                                                                                                                           
Login to ODSM



















                                                                                                                                                         



















                                                                                                                                                          
i ran into below issue while doing the same on some other environment.

Mar 28, 2014 12:40:30 PM oracle.as.config.provisioner.InstallerCmdLine handleRunFailure
SEVERE: Command failed:
oracle.as.config.ProvisionException: Exception in onCreate()
at oracle.iam.management.oid.install.wls.OIDComponent.onCreate(OIDComponent.java:235)
at oracle.as.config.impl.OracleASComponentBaseImpl.createComponent(OracleASComponentBaseImpl.java:596)
at oracle.as.config.impl.OracleASComponentBaseImpl.create(OracleASComponentBaseImpl.java:105)
at oracle.as.config.provisioner.commands.CreateComponentCommand.execute(CreateComponentCommand.java:31)
at oracle.as.config.provisioner.InstallerCmdLine.run(InstallerCmdLine.java:146)
at oracle.as.config.provisioner.InstallerCmdLine.main(InstallerCmdLine.java:46)
Caused by: oracle.as.config.ProvisionException: Error checking schema Version :
at oracle.iam.management.oid.install.wls.OIDComponentHelper.isUpgrade(OIDComponentHelper.java:2522)
at oracle.iam.management.oid.install.wls.OIDComponent.onCreate(OIDComponent.java:128)
... 5 more
Caused by: oracle.as.config.ProvisionException: Missing Schema_Version_Registry or App_Registry table in DB
at oracle.iam.management.oid.install.wls.OIDComponentHelper.isUpgrade(OIDComponentHelper.java:2517)
... 6 more







Oracle Internet Directory (OID) schema checking in the metadata repository database failed.


Solution

Ensure that the OID schema is properly loaded in the database either using the FMW 11g Repository Creation Utility (RCU) or the FMW 11g Identity Management (IM) installer.
Run the following SQL queries in the database and ensure that only one row is returned in both the SQL queries.  Log into the Database as Schema ODS.


SELECT rowid, comp_id FROM schema_version_registry WHERE comp_Id = 'OID';

SELECT * FROM all_objects WHERE object_name='SCHEMA_VERSION_REGISTRY' AND object_type='VIEW';


If the results are not the expected results, then there are two alternate ways to fix the issue:
Option 1
1. Drop the OID schema using the RCU and recreate it. See the following documentation:

Reference:
Oracle Fusion Middleware Repository Creation Utility User's Guide 11g Release 1 (11.1.1)
2.4 Dropping Schemas
2. Retry the OID installation using the FMW 11g IM installer.
Option 2
Check permissions for ODS schema.
select  GRANTEE, PRIVILEGE, table_name  from dba_tab_privs  where grantee ='ODS';

GRANTEE   PRIVILEGE TABLE_NAME
----------- -------------- ------------------
ODS          SELECT       SCHEMA_VERSION_REGISTRY
ODS          EXECUTE     DBMS_JOB

If this query returns no rows, grant the following permissions and retry

connect as sys
grant select on schema_version_registry to ods;
grant execute on dbms_job to ods;
-----------------------------------------------------------------------------------------------------------------------------------------------

Update 2:-

I had to change the port number of OID port after createcomponent.

This can be done through /em console but the console was loading was very slow.

so used some other alternative



$ ./opmnctl updatecomponentregistration -componentType OID -componentName oid4 -Port 17390 -Sport 17637

 restarted the OID 2


that did not work

change the port number directly in OID ldap instance data.

port numbers are saved in orclsslPort and orclnonsslport attributes of OID instance. You can change here directly and restart the component

opmnctl stopproc ias-component=oid2
opmnctl startproc ias-component=oid2








Friday, July 25, 2014

OIM, OAM performance monitroing and matrics Java Flight Recorder

In this post I will cover the steps that are required to monitor and record a running jvm process using java flight recorder.

The flight recorder can be used to monitor the running jvm processes and giving us the statistics on cpu utilization, ram usage etc for the its running duration.


here are the commands

step 1 list java processes



ps -ef | grep java



user 23639 23615   3   Jul 24 ?        12083:48 /app/oracle/fusionV11gR2/jdk1.7.0_40/bin/sparcv9/java -server -Xms256m -Xmx512m
user 23614 23590   3   Jul 24 ?        9422:12 /app/oracle/fusionV11gR2/jdk1.7.0_40/bin/sparcv9/java -server -Xms256m -Xmx512m
user 23664 23640   4   Jul 24 ?        4463:27 /app/oracle/fusionV11gR2/jdk1.7.0_40/bin/sparcv9/java -server -Xms256m -Xmx512m

step 2 confirm the java processes with jcmd command



cd /app/oracle/fusionV11gR2/jdk1.7.0_40/bin/sparcv9
./jcmd

23614 weblogic.Server
23664 weblogic.Server
23639 weblogic.Server


Step 3 record the running process performance for time duration that you wish to analyze later


./jcmd 23614 JFR.start name=23614 duration=900s filename=/tmp/23614.jfr settings=default




So above command will monitor the existing java processes with PID=23614 for 15 minutes and then stop.

.jfr can be opened with out-of-the-box java mission control tool to analyze the process statistics during that process run.