11 August 2012

Import Bulk SSO Users


Please note that I have used this approach to import users from a different OID environment. You will have to replace the exact server details for your export/import commands below

1. Export the users from a different environment:

ldapsearch -h SOURCEHOST -p PORT -D cn=orcladmin -w PASSWORD -L -b "ou=production,cn=users,dc=org" -s sub "objectclass=*" >exp_OU.ldif

2. Get the count of users is Source environment

grep "cn=users" exp_OU.ldif
wc -l


3. Remove the authentication rows from the file

grep -v "authpassword" exp_OU.ldif > PROD_OU.ldif

4. SCP the final export file to the destination

Use SCP or SFTP

5. Import the users using bulk approach

ldapadd -h TARGETHOST -p PORT -D "cn=orcladmin" -w PASSWORD -c -v -f PROD_OU.ldif

You may schedule this in background if numbers of users are high.

Put the above command in a shell script and run it:

nohup "bulkadd.sh" > oidadd.log &

6. Verify the count of Users imported.

grep "cn=users" exp_OU.ldif
wc –l

7. Login as a specific OID user and confirm you can login through OIDDAS

15 July 2012

Agent 's Target Host unavailable

Symptoms:

After the agent install, Agent's target host is not listed in the OEM Console

Reason: Agent is out-of-sync with OMS and several trials of uploading doesn't help/ Agent was reinstalled/moved

Re-synchronization of the agent fails with the error below:

Agent Operation completed with errors. For those targets that could not be saved, please go to the target's monitoring configuration page to save them. All other targets have been saved successfully. Agent has not been unblocked.


Internal Repository Error Message: SQL Exception occured while syncing pdp settings
Exception: java.sql.SQLException: ORA-20206: Target does not exist: agentmachine.domain:host ORA-06512: at "SYSMAN.MGMT_TARGET", line 571 ORA-06512: at "SYSMAN.MGMT_CREDENTIALS_UI", line 303 ORA-06512: at line 1

 
 
Solution:
 
1. Shutdown the agent from the terminal: AGENT_HOME/bin emctl stop agent
 
2. Logon the OEM Console as SYSMAN or the user with Super User privileges.
 
3. Delete the Agent from OEM Console, ( Make sure all the targets monitored by this agent is deleted before-hand)
 
    Home Page --> Targets --> All Targets --> Select Agent from search box --> Agent --> GO
 
     Click the radio button next to the Agent you wish to delete and then select Remove
 
 
4. Confirm that the agent is deleted:
 
   Home Page --> setup --> Management Services and Repository
 
  Scroll down and select Deleted Targets
 
 
5. Re-create the targets.xml
 
  cd $AGENT_HOME/sysman/emd/
 
  cp -p targets.xml targets_old.xml
 
  touch targets.xml
 
 
6. Copy the AgenSeed and WMD_URL from emd.properties file:
 
   cd $AGENT_HOME/emd/config
 
   cat emd.properties | grep agentSeed
 
   agentSeed=207388776
 
  cat emd.properties | grep EMD_URL
 
  EMD_URL=http://pracdbadb033:3872/emd/main/
 
 
7. Fill the targets.xml with the values obtained from emd.props file
 
Targets AGENT_SEED="207388776"


Target TYPE="oracle_emd" NAME="pracdbadb033:3872"/

Target TYPE="host" NAME="pracdbadb033"/>/Targets 







8. Run Agentca from AGENT_HOME/bin

   cd $AGENT_HOME/bin

   agentca -d

  ###################################################


The action configuration is performing

------------------------------------------------------

The plug-in Agent Configuration Assistant is running


9. Secure and start the agent

   cd $AGENT_HOME/bin
    emctl secure agent
 
     emctl start agent

    emctl upload agent


10. Now you should see the Host displayed in the Console.
Performing free port detection on host=pracdbadb033
Performing targets discovery and agent configuration

Starting the agent

AgentPlugIn:agent configuration finished with status = true



The plug-in Agent Configuration Assistant has successfully been performed

------------------------------------------------------

The action configuration has successfully completed

###################################################

 
 

20 March 2012

User unable to login in SSO

OID to FND Sync Issue

If the user is successfully created in OID (Oracle Internet Directory) and is not getting updated in FND(E-business suite) ...

It may be one of the following:

1. Check if the user is not end dated in E-Business suite.

2. Make sure the user information is correct in OID

3. Identify the issue with the link between OID and FND

  A.  On the SSO middle tier, run the ldap command to identify the users GUID:

ldapsearch -v -h -p -D "cn=" -w "" -b "DC" -s sub "uid= *"  uid  orclguid orclactivestartdate orclactiveenddate orclisenabled
You will get the ORCL GUID

B. Get onto the Middle tier of Oracle E-business suite as applmgr(OWNER)
sqlplus apps/
SELECT USER_GUID FROM FND_USER WHERE USER_NAME = '';

C. Compare the GUID from step A and B, if they are different then run the link script below which resets the GUID of the user in FND to NULL
sqlplus apps/

@$FND_TOP/patch/115/sql/fndssouu.sql

PL/SQL procedure successfully completed.


Commit complete.


D. Make sure that the following profile option (in E-Business Suite) is set to Enabled:  Application_SSO_AUTO_LINK_USER

E. Ask the user to relogin and this time the same GUID will be populated.








 

16 March 2012

Trace user(concurrent req) session in oracle(one of the ways)



1. Identify the SID from gv$session and fnd_concurrent req:

SELECT sid,serial# FROM gv$session WHERE paddr LIKE (SELECT addr FROM gv$process WHERE spid=(SELECT oracle_process_id FROM apps.fnd_concurrent_requests WHERE request_id = TO_NUMBER()));


2. Identify the PID of the SID(s) from previous step:

select p.spid from gv$session s, gv$process p where s.sid= and s.paddr=p.addr;


3. Enable Trace using Oradebug.

sqlplus / as sysdba
SQL> oradebug setospid

SQL> oradebug event 10046 trace name context forever, level 12
SQL> oradebug tracefile_name


Leave it for 15-20 (Depends on DBAs decision) mins to fill the trace file.

SQL> oradebug event 10046 trace name context off

4. Take the TKPROF of the trace file genereated in Step 3

tkprof TRACE_FILE_NAME OUTPUT_FILE explain=apps/pass
 
5. Analyze trace file

Gather Stats in Oracle 10g/11g

STATISTICS GATHERING ON DATABASE(ORACLE)

---------------------------------------

Gather statistics on table:
---------------------------

exec fnd_stats.gather_table_stats('SCHEMA',’TABLE’,estimate_percent => 15);


Gather Statistics on the Schema:
-------------------------------
EXEC DBMS_STATS.gather_schema_stats('SCHEMA', estimate_percent => 15);


Gather Statistics on the Index:
-------------------------------
EXEC DBMS_STATS.gather_index_stats('SCOTT', 'EMPLOYEES_PK', estimate_percent => 15);


Gather Statistics on Dictionary:
--------------------------------
EXEC DBMS_STATS.gather_dictionary_stats;


GATHER STATS FOR E-BUSINESS SUITE:
----------------------------------
exec fnd_stats.gather_schema_statistics('SCHEMA') --- For a specific schema

exec fnd_stats.gather_schema_statistics('ALL') --- For all schemas



Verify Stats:
-------------
exec fnd_stats.verify_stats('SCHEMA', 'OBJECT');

Concurrent manager issues - 11i / R12

Inactive/No manager

A concurrent request has a life cycle consisting of the following phases: Pending, Running, and Completed. During each phase, a request has a specific status. Listed below are the possible statuses for each phase:




•Pending Phase - Normal, Standby, Scheduled, Waiting

•Running Phase - Normal, Paused, Resuming, Terminating

•Completed Phase - Normal, Error, Warning, Cancelled, Terminated

•Inactive Phase - Disabled, On Hold, No Manager

If a concurrent request is on hold or unable to run when there are no active manager processes that can run the request, the request is placed in an Inactive phase.



Review the following points when the concurrent request is in Inactive phase with No Manager status.



1. Verify that Internal Concurrent Manager(ICM) is up and running. Use any one navigation mentioned below to check the status details of Internal Manager.

i. Oracle Applications Manager(OAM) > Site Map > Monitoring > Availability > Internal Concurrent Manager > View Status.

OR


ii. System Administrator Responsibility > Concurrent > Manager > Administer

2. Verify that there is at least one active concurrent manager with/without specialization rules that allow the concurrent program to run.



i. Run the following query to check whether any specialization rule defined for any concurrent manager that includes/excludes the concurrent program in question. Query returns 'no rows selected' when there are no Include/Exclude specialization rules of Program type for the given concurrent program.

select 'Concurrent program '

fcp.concurrent_program_name

' is '

decode(fcqc.include_flag,'I','included in ','E','excluded from ')

fcqv.user_concurrent_queue_name specialization_rule_details from fnd_concurrent_queues_vl fcqv,fnd_concurrent_queue_content fcqc,fnd_concurrent_programs fcp where fcqv.concurrent_queue_id=fcqc.concurrent_queue_id and fcqc.type_id=fcp.concurrent_program_id and fcp.concurrent_program_name='';

Note: Program Short Name is visible when the program is queried in concurrent program definition form.

Example:

SQL> select 'Concurrent program '

fcp.concurrent_program_name

' is '

decode(fcqc.include_flag,'I','included in ','E','excluded from ')

fcqv.user_concurrent_queue_name specialization_rule_details from fnd_concurrent_queues_vl fcqv,fnd_concurrent_queue_content fcqc,fnd_concurrent_programs fcp where fcqv.concurrent_queue_id=fcqc.concurrent_queue_id and fcqc.type_id=fcp.concurrent_program_id and fcp.concurrent_program_name='XXRFG3041A';



SPECIALIZATION_RULE_DETAILS

-----------------------------------------------------------------------------

Concurrent program OKCRAQE is included in Contracts Core Concurrent Manager

Concurrent program OKCRAQE is excluded from Standard Manager

From the sample output above, it shows that the OKCRAQE(Listener for Events Queue) concurrent program has been excluded from the Standard Manager and included in Contracts Core Concurrent Manager. That means the concurrent request OKCRAQE can be run only by the Contracts Core Concurrent Manager which should be up and running to run and complete the OKCRAQE concurrent request.
Make sure that Concurrent Manager whose specialization rule includes the concurrent program is up and running.

ii. Ensure that standard concurrent manager is up and running.


Follow the below step only when you have confirmed the previous points and the issue is still remaining as there may be an issue with concurrent request queue view.

3. Manually re-create the concurrent request queue view for concurrent managers by entering the following command as an applmgr user at operating system prompt.

FNDLIBR FND FNDCPBWV apps/pass SYSADMIN 'System Administrator' SYSADMIN
 
 
------------------------------------------------------------------------------------------------------------
 
Pending Standby
 
Check CRM queue,
 
Click on Application developer Responsibility --> Concurrent --> Program
 
Check for incompatibilities by clicking on Incompatibilities button.
 
If scheduled program has a conflict with other program then CRM will make sure to run the pending requests once the conflicting requests are completed