Amazon books

Tuesday, September 28, 2010

Using opatch brings error : OPatch detects your platform as 226 while this patch 8372118 supports platforms

I were trying to apply a patch and got the error show below:

########################################################
[appsoa@hom3 8372118]$ /app01/SOA/iassoa/OPatch/opatch apply

Oracle Interim Patch Installer version 1.0.0.0.56
Copyright (c) 2006 Oracle Corporation. All Rights Reserved..

We recommend you refer to the OPatch documentation under
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com

Oracle Home : /app01/SOA/iassoa
Oracle Home Inventory : /app01/SOA/iassoa/inventory
Central Inventory : /app01/SOA/iassoa/oraInventory
from : /etc/oraInst.loc
OUI location : /app01/SOA/iassoa/oui
OUI shared library : /app01/SOA/iassoa/oui/lib/linux/liboraInstaller.so
Java location : /app01/SOA/iassoa/jre/1.4.2/bin/java
Log file location : /app01/SOA/iassoa/.patch_storage//*.log

Creating log file "/app01/SOA/iassoa/.patch_storage/8372118/Apply_8372118_09-28-2010_12-55-17.log"

Invoking fuser to check for active processes.


OPatch detects your platform as 226 while this patch 8372118 supports platforms:
0 (Generic Platform 1)

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

The workaround is:

export OPATCH_PLATFORM_ID=0

And run the opatch again.

Best Regards,
Paulo Portugal

While trying to compile a form with frmcmp_batch.sh got ORA-12154

Example:

[appebs@hom3 PTB]$ frmcmp_batch.sh module=TACCOPH.fmb Userid=apps/appdesenv123 module_type=FORM compile_all=SPECIAL
Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)

Forms 10.1 (Form Compiler): Release - Production

Copyright (c) 1982, 2005, Oracle. All rights reserved.

PL/SQL Version 10.1.0.5.0 (Production)
Oracle Procedure Builder V10.1.2.0.2 - Production
Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle Tools Integration Version 10.1.2.0.2 (Production)
Oracle Tools Common Area Version 10.1.2.0.2
Oracle CORE 10.1.0.5.0 Production
ORA-12154: TNS:could not resolve the connect identifier specified


Workaround:
Change TNS_ADMIN on frmcmp_batch.sh like bellow:

--OLD VALUE
TNS_ADMIN=$ORACLE_HOME/network/admin
export TNS_ADMIN

--NEW VALUE
# TNS_ADMIN=$ORACLE_HOME/network/admin
# export TNS_ADMIN

TNS_ADMIN=${TNS_ADMIN:-$ORACLE_HOME/network/admin}
export TNS_ADMIN


OR Apply patch 5456500 as per NOTE 431324.1

Best Regards,
Paulo Portugal

Friday, September 17, 2010

Running RDA Diagnostics on E-Business R12

Sometimes, when you have a Service Request open with Oracle Support, they can ask you to run Oracle Diagnostics Tool for some products on your R12 Application.

Here is a simple example of running for AR and JL products:
########################################
cd cd $IZU_TOP/bin
./rda.sh -vdCRP -e APPL_SHORT='JL' ACT

./rda.sh -vdCRP -e APPL_SHORT='AR' ACT
########################################

Then just upload the zip file to Oracle Suppoort.

Best Regards,
Paulo Portugal

Sunday, September 12, 2010

Install iAS using non default ports - staticports.ini file

If you need to install iAS using non default ports.

Create a file using the custom ports (you can find an example in Disk1/stage/Response/statisticports.ini file)

Next step is to use the parameter on runInstaller as below:

./runInstaller oracle.ocs.onebox:s_staticPorts=/app01/XXX/Stage/Disk1/stage/Response/staticports.ini


Best Regards,
Paulo Portugal

Tuesday, September 7, 2010

ORA-26723: user "STR_TARGET" requires the role "DV_STREAMS_ADMIN"

If you face the error message below while configuring Oracle Streams:

ORA-26723: user "STR_TARGET" requires the role "DV_STREAMS_ADMIN"
ORA-06512: at "SYS.DBMS_STREAMS_ADM_UTL_INVOK", line 349
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 439
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 397
ORA-06512: at line 2


Just run the grant as follows and COMMIT after:
SQL> execute dbms_streams_auth.grant_admin_privilege('STR_SOURCE');

PL/SQL procedure successfully completed

SQL> commit;


Don't forget to COMMIT!

If it didn't work, then disable Database Vault before configuring Streams and enable it after. I use the following command to disable it in Oracle Binaries Files:

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk dv_off ioracle

ATTENTION: This should not be done if you don't know who and why Database Vault is enabled in this database.

Best regards,
Paulo Portugal

Saturday, September 4, 2010

How to cleanup .patch_storage directory

If you are experiencing space problems and found that your ORACLE_HOME have a .patch_storage directory that is too big here is a solution.

As you cannot delete this directory because it contains patches that maybe you need to rollback, Oracle provides a method to delete just unnecessary files by using Opatch utility (higher than 10.2.0.x).

This is very simple:

Example:

Size before running Opatch command:
[hostxxxx]/dbname/products/rdbms/.patch_storage> du -sg
2.45 .


--Running Opatch command:
[hostxxxx] opatch util cleanup
Invoking OPatch 10.2.0.4.3

Oracle Interim Patch Installer version 10.2.0.4.3
Copyright (c) 2007, Oracle Corporation. All rights reserved.

UTIL session

Oracle Home : /dbxxx/products/rdbms
Central Inventory : /opt/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.3
OUI version : 10.2.0.4.0
OUI location : /dbxxx/products/rdbms/oui
Log file location : /dbxxx/products/rdbms/cfgtoollogs/opatch/opatch2010-09-04_1 3-56-38PM.log

Invoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'rac,scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
Could not recognize input. Please re-enter.
y
User Responded with: Y
Size of directory "/dbxxx/products/rdbms/.patch_storage" before cleanup is 2618766807 bytes.
Size of directory "/dbxxx/products/rdbms/.patch_storage" after cleanup is 159049176 bytes.

UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.

OPatch succeeded.

--Size after clean up
[hostxxxx]/dbxxx/products/rdbms/.patch_storage> du -sg
0.15 .


Best Regards,
Paulo Portugal

The new Oracle XSTream

Oracle provides a new API called XSTream that is based on Oracle Streams and used to replicate data between Oracle Databases. It is also possible to replicate to other databases using Oracle Gateway, JMS, or directy with an third application consuming messages from a queue.

XSTream makes use of OCI or Java interface to capture and propagate data.

The configuration of XTream is done using DBMS_XSTREAM_ADM and it works with XSTream Outbound and XTream Inbound.

One simple example of how to configue an XTream Outbound for table HR.EMPLOYEES and HR.JOBS and also

DECLARE
tables DBMS_UTILITY.UNCL_ARRAY;
schemas DBMS_UTILITY.UNCL_ARRAY;
BEGIN
tabs(1) := 'HR.EMPLOYEES';
tabs(2) := 'HR.JOBS';
my_schemas(1) := 'HR';
DBMS_XSTREAM_ADM.CREATE_OUTBOUND(
server_name => 'MY_FIRST_OUT',
table_names => tabs,
schema_names => my_schemas);
END;
/

I will post more examples soon....

Best Regards,
Paulo Portugal