Wednesday, December 29, 2010

Oracle Trainings in support.oracle.com

Hi Viewers,

Oracle is maintaining all the recorded Webcast recorded sessions in the form of Oracle Documents in http://support.oracle.com .

The document id is 740964.1 [Advisor Webcast Archived Recordings ]

You can get all useful and valuable trainings from this document.

Thanks,
Sasikumar.M

"Synchronize WF LOCAL tables" request is failing with "ORA-20002: 4006:" error

Whenever we submit the "Synchronize WF LOCAL tables" request, it is failing with following error message,


FNDWFLSC module: Synchronize WF LOCAL tables
+---------------------------------------------------------------------------+

Current system time is 01-JUN-2010 01:41:09

+---------------------------------------------------------------------------+

**Starts**01-JUN-2010 01:41:09
**Ends**01-JUN-2010 01:41:43
ORA-20002: 4006: While creating necessary indexes, duplicate values were found preventing the creation of a unique index. This is caused by an improper view definition or data corruption that requires the attention of the Product Development Team handling 'PER_ROLE'.
ORA-20002: 4006: While creating necessary indexes, duplicate values were found preventing the creation of a unique index. This is caused by an improper view definition or data corruption that requires the attention of the Product Development Team handlin
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+

After further troubleshooting, We used the following SQL statement and Identified the duplicate rows in APPS.PER_ROLE_ROLES_V view,

SELECT NAME, ORIG_SYSTEM, ORIG_SYSTEM_ID,PARTITION_ID, COUNT(*) FROM
APPS.PER_ROLE_ROLES_V GROUP BY NAME, ORIG_SYSTEM, ORIG_SYSTEM_ID,PARTITION_ID
HAVING COUNT(*) > 1;


Finally we did the following DML for removing the duplication row,

update per_all_people_f
set effective_end_date = to_date ('23-oct-2009','dd-mon-yyyy')
where person_id= (Person_Id_Return_by_Select_Query)
and effective_start_date= to_date('23-Oct-2009','dd-mon-yyyy')
and effective_end_date= to_date('14-Jan-2010','dd-mon-yyyy');


delete from per_all_people_f
where person_id= (Person_Id_Return_by_Select_Query)
and effective_start_date= to_date('15-Jan-2010','dd-mon-yyyy');

commit;

Reran the "Synchronize WF LOCAL tables" request and it is completing normal.

Thanks,
Sasikumar.M

APEX 4.0.2 installation with E-Business Suite R12

Recently I installed the APEX 4.0.2 in R12 ( 12.0.4 ) instances. Here are the steps which I followed.

1. Download the Apex software from http://download.oracle.com/otn/java/appexpress/apex_4.0.2.zip
2. Unzip the apex_4.0.2.zip file.
3. Take the invalid object counts.
4. Create the new table space APEX402 with 1 GB size

SQL> create tablespace APEX402 datafile '/oracle/VIS/oradata/apex402_01.dbf' size 1G autoextend on;

5. Login as SYSDBA user and execute the following SQL from the unzipped folder

SQL> @apexins.sql APEX402 APEX402 TEMP /i/

6. After 20-30 min, You will get following confirmation message,

Thank you for installing Oracle Application Express.

Oracle Application Express is installed in the APEX_040000 schema.

The structure of the link to the Application Express administration services is as follows:
http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql)
http://host:port/apex/apex_admin (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)

The structure of the link to the Application Express development interface is as follows:
http://host:port/pls/apex (Oracle HTTP Server with mod_plsql)
http://host:port/apex (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)

JOB_QUEUE_PROCESSES: 5

Performing Application Express component validation - please wait...

Completing registration process. 13:35:57
Validating installation. 13:35:57
...Database user "SYS", database schema "APEX_040000", user# "587" 13:35:57

7. Once you see this message, the Apex installation to the Oracle EBS database is completed.
8. Unlock the APEX_PUBLIC_USER account from the apex directory.

$ sqlplus "/as sysdba"
SQL> @apxchpwd.sql

9. Copy all the images files under apex/images directory to $COMMON_TOP/imagess (New folder) on the Front End Application server
10.Update the following entires in $IAS_ORACLE_HOME/Apache/modplsql/conf/dads.conf file

Alias /i/ "/apps/vis/apps/apps_st/comn/images/"
AddType text/xml xbl
AddType text/x-component htc

<Location /pls/apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString testdb.cisco.com:1531:VIS <-- Enter the DB connection Details
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword welcome <-- Enter the Admin Password
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
Allow from all
</Location>

11. Make sure $IAS_ORACLE_HOME/Apache/modplsql/conf/dads.conf file included in $IAS_ORACLE_HOME/Apache/modplsql/conf/plsql.conf.
12. Ensure $IAS_ORACLE_HOME/Apache/modplsql/conf/plsql.conf is included in $INST_TOP/ora/10.1.3/Apache/Apache/conf/oracle_apache.conf
13. By default, httpd.conf file should included the file $INST_TOP/ora/10.1.3/Apache/Apache/conf/oracle_apache.conf.
14. Bounce Apache services.
15. Access the APEX URL http://host:port/pls/apex/apex_admin and http://host:port/pls/apex

Comments are Welcome!!!

Thanks,
Sasikumar.M

Friday, December 17, 2010

Story of a Failed Grid Control Agent

Unfortunately one of the Grid Control Agent on a Development System was down for a longer time.(2 months)
So wanted to get it up.



oracle@devdb[AGENT]$ emctl start agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Starting agent ............................................... failed.
EMAgent is Thrashing. Exiting watchdog
Consult the log files in: /oracle/product/10.2.0/agent10g/sysman/log
oracle@devdb[AGENT]$


On the first look I thought,  what happened !!! , it runs fine on all the other nodes and only on this it is thrashing.
So looked into the logfiles and found that the agent when starting was trying to discover the targets.


At some point it could not do it and so it failed.
So had a quick look into the mysupport.oracle.com for relevant materials. Read about 20 articles and came across 365252.1


As per the note I did the following.
cd $ORACLE_HOME/sysman/emd   (where $ORACLE_HOME is the Agent's home)
- backed up targets.xml
- Removed all the targets information except the one for agent
- Ran agentca -d to force a new discovery of the targets on the host



oracle@devdb[AGENT]$ agentca -d


Stopping the agent using /oracle/product/10.2.0/agent10g/bin/emctl  stop agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Stopping agent ... stopped.
Running agentca using /oracle/product/10.2.0/agent10g/oui/bin/runConfig.sh ORACLE_HOME=/oracle/product/10.2.0/agent10g ACTION=Configure MODE=Perform RESPONSE_FILE=/oracle/product/10.2.0/agent10g/response_file RERUN=TRUE INV_PTR_LOC=/oracle/product/10.2.0/agent10g/oraInst.loc COMPONENT_XML={oracle.sysman.top.agent.10_2_0_1_0.xml}
Perform - mode is starting for action: Configure
Perform - mode finished for action: Configure
You can see the log file: /oracle/product/10.2.0/agent10g/cfgtoollogs/oui/configActions2010-12-17_08-02-57-AM.log
oracle@devdb[AGENT]$


oracle@devdb[AGENT]$ cat /oracle/product/10.2.0/agent10g/cfgtoollogs/oui/configActions2010-12-17_08-02-57-AM.log
###################################################
The action configuration is performing
------------------------------------------------------
The plug-in Agent Configuration Assistant is running


Performing free port detection on host=testserver.testdomain.com
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
###################################################
oracle@devdb[AGENT]$




Now I started the agent



oracle@devdb[AGENT]$ emctl start agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
Starting agent ....... started.
oracle@devdb[AGENT]$ 


Looks good the agent came up and the status was also good.

oracle@devdb[AGENT]$ emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.5.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.5.0
Agent Home        : /oracle/product/10.2.0/agent10g
Agent binaries    : /oracle/product/10.2.0/agent10g
Agent Process ID  : 27849
Parent Process ID : 27836
Agent URL         : https://testserver.testdomain.com:3872/emd/main/
Repository URL    : https://testserver.testdomain.com:4898/em/upload
Started at        : 2010-12-17 08:03:57
Started by user   : oracle
Last Reload       : 2010-12-17 08:03:57
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far :     0.00
Number of XML files pending upload           :     1124
Size of XML files pending upload(MB)         :    59.90
Available disk space on upload filesystem    :    23.16%
Collection Status                            : Disabled by Upload Manager
Last attempted heartbeat to OMS              : 2010-12-17 08:05:08
Last successful heartbeat to OMS             : unknown
---------------------------------------------------------------
Agent is Running and Ready
oracle@devdb[AGENT]$



But the collection status was disabled by upload manager. That means the xml files are not transported.
You can see that the number of XML files are 1124 which is too high for the agent to process them.

Came across 396238.1 , and did the following to recover from the issue.

- Stop the agent
Delete any pending upload files from the agent home
  rm -r /sysman/emd/upload/* 
  rm /sysman/emd/lastupld.xml 
- Start the agent.



oracle@devdb[AGENT]$ emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.5.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.5.0
Agent Home        : /oracle/product/10.2.0/agent10g
Agent binaries    : /oracle/product/10.2.0/agent10g
Agent Process ID  : 5953
Parent Process ID : 5943
Agent URL         : https://testserver.testdomain.com:3872/emd/main/
Repository URL    : https://testserver.testdomain.com:4898/em/upload
Started at        : 2010-12-17 08:26:20
Started by user   : oracle
Last Reload       : 2010-12-17 08:26:20
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far :     0.00
Number of XML files pending upload           :       16
Size of XML files pending upload(MB)         :     8.43
Available disk space on upload filesystem    :    23.21%
Last attempted heartbeat to OMS              : 2010-12-17 08:27:00
Last successful heartbeat to OMS             : unknown
---------------------------------------------------------------
Agent is Running and Ready
oracle@devdb[AGENT]$


Looks good but the agent is not actually uploading the xml files. You will see 16 files are not uploaded
Tried to manually force an upload.



oracle@devdb[AGENT]$ emctl upload
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..
oracle@devdb[AGENT]$


From the logfile found the following;
2010-12-17 08:28:01,116 Thread-71 ERROR pingManager: Did not receive valid response to ping "ERROR-Agent is blocked. Blocked reason is: Agent is out-of-sync with repository. This most likely means that the agent was reinstalled or recovered. Please contact an EM administrator to unblock the agent by performing an agent resync from the console. Please contact EM adminstrator to unblock the agent"




Then came across  799618.1 , and did the following as per the instructions;
- Login to 10.2.0.5 Grid Console as sysman user
- Navigate to Setup -> Agents -> Click on problematic Agent name
- In Agent home page click on "Resycnhronize" Button on right hand top of the page.
  Choose the 'Unblock Agent' option and click Continue
  Ensure that the Agent is up and running when attempting the Resynchronization.
Once the re-sycnchronization is completed successfully, the Agent should be able to communicate with the OMS




oracle@devdb[AGENT]$ emctl upload
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully
oracle@devdb[${ORACLE_SID}]$ emctl status agent
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.5.0
OMS Version       : 10.2.0.5.0
Protocol Version  : 10.2.0.5.0
Agent Home        : /oracle/product/10.2.0/agent10g
Agent binaries    : /oracle/product/10.2.0/agent10g
Agent Process ID  : 5953
Parent Process ID : 5943
Agent URL         : https://testserver.testdomain.com:3872/emd/main/
Repository URL    : https://testserver.testdomain.com:4898/em/upload
Started at        : 2010-12-17 08:26:20
Started by user   : oracle
Last Reload       : 2010-12-17 08:26:20
Last successful upload                       : 2010-12-17 08:31:35
Total Megabytes of XML files uploaded so far :    10.42
Number of XML files pending upload           :        0
Size of XML files pending upload(MB)         :     0.00
Available disk space on upload filesystem    :    23.21%
Last successful heartbeat to OMS             : 2010-12-17 08:31:02
---------------------------------------------------------------
Agent is Running and Ready
oracle@devdb[AGENT]$


You will see that all the xml files are uploaded.


All done and the agent was up and running. 
Thanks to documents from mysupport.oracle.com


Tuesday, December 14, 2010

VirtualBox VMs for Developers and DBAs

Good news for those who work on Virtual Box.

Oracle has pre-build VM to support quicker access to its product.

Monday, December 13, 2010

The power of Amazon EC2

Why 'Anonymous' failed to take down Amazon over WikiLeaks - Dec. 9, 2010

Cloud Computing at its best. EC2 expanded and scaled as the traffic increased. Read the above article to know about why it is powerful.

Hosting Oracle Products would be more fun there.