Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Showing posts with label DBUA. Show all posts
Showing posts with label DBUA. Show all posts

Tuesday, April 12, 2011

DBUA unable to recognize oracle user as unix owner when unix uid is 9 digits

While upgrading an Oracle instance from 11.2.0.1 to 11.2.0.2, through DBUA I discovered a bug. If the unix uid of the oracle user is 9 digit, DBUA refuses to recognize oracle as the unix owner of the software. This issue doesn't occur with older oracle ids which were 5 digit. We got a similar issue in past with runInstaller for which an SR was logged and Oracle opened bug 10205927. For the current issue with DBUA, I have logged a new SR

Till this bug is fixed by Oracle, DBUA will fail for any instance whose oracle user has unix uid of 9 digit. All upgrades to 11.2.0.2 on such instances will have to use the manual upgrade process.

I'll update this post with more details, after Oracle responds on the SR.

Wednesday, May 26, 2010

What code is called by DBUA

We have standardized on DBUA for all our upgrades and do not use the manual upgrade process. Manual upgrade process is preferred by DBAs for the amount of control it gives them. However, manual is prone to more human errors. As per My Oracle Support Article ID 870814.1, when you start an upgrade through DBUA it performs the following checks:

=> Invalid user accounts or roles
=> Invalid data types or invalid objects
=> De-supported character sets
=> Adequate resources, including rollback segments, tablespaces, and free disk space
=> Missing SQL scripts needed for the upgrade
=> Listener running (if Oracle Enterprise Manager Database Control upgrade or configuration is requested)
=> Oracle Database software linked with Database Vault option. If Database Vault is enabled, then DBUA will return an error asking you to disable Database Vault prior to upgrade. See "Disable Oracle Database Vault"
=> Stale optimizer statistics
=> Time zone file versions
=> Enterprise Manager Database control Repository exists in the database or not

However, when DBUA gets stuck or reports errors in its pretty face GUI, we do not know what has gone wrong. If you upgrade to 11g the DBUA logs are present in $ORACLE_BASE/cfgtoollogs/dbua. But the logs do not really tell you what scripts were called. So I decided to check what's in dbua.

cd $ORACLE_HOME/bin
file dbua
dbua: executable shell script

I opened dbua in vi and towards the end it has:

CLASSPATH=$DBMA_CLASSPATH:$JRE_CLASSPATH:$EWT_CLASSPATH:$SWING_CLASSPATH:$SHARE_
CLASSPATH:$GDK_CLASSPATH:$ASSISTANTS_COMMON_CLASSPATH:$HELP_CLASSPATH:$ICE_BROWS
ER_CLASSPATH:$NETCFG_CLASSPATH:$I18_CLASSPATH:$XMLPARSER_CLASSPATH:$JDBC_CLASSPA
TH:$SRVM_CLASSPATH:$EM_CLASSPATH:$INSTALLER_CLASSPATH

#run dbma
$JRE_DIR/bin/java $JRE_OPTION $IBM_STREAM_NIO -Dsun.java2d.font.DisableAlgorithm
icStyles=true $INSTALL_LIB_LOCATION -DORACLE_HOME=$OH -mx128m -classpath $CLASS
PATH oracle.sysman.assistants.dbma.Dbma $*

So it calls a java class oracle.sysman.assistants.dbma.Dbma

All the code that is being called seems to be inside $ORACLE_HOME/assistants/dbua

There's a file called mep.cfg in this directory, which has the minimum values for init.ora parameters, obsolete parameter list, changed parameter list etc.

There is a file called dbma.jar in /gpsatc10/oracle/11.2.0/assistants/dbua/jlib

This jar file has all the code which is called by DBUA. These are java classes. I downloaded the jar file and unzipped it on my PC. However class files are binary in nature and you can't really see all the code. I'll try to map the information in the log file with the java classes and update this article in future.

Saturday, June 21, 2008

Prevent ORA-4030 during DBUA

We got ORA-4030 error during DBUA again. I thought we had solved it in previous runs by setting these parameters in 9i init.ora which is used to create 10g init.ora by DBUA:

sga_max_size = 2G
shared_pool_size = 1G
java_pool_size = 500M

DBUA uses the parameters in the old 9i home to automatically create spfile for Oracle 10g. Unless the above parameters are set to the given values, ORA-04031: unable to allocate n bytes of shared memory error may occur.

ORA-4030 is related to the PGA and not SGA. But our pga_aggregate_target was also set to 1G. So why did the issue occur in the first place ?

The DBAs ran a manual upgrade and faced the very same error again. Suspecting resource issues on the OS, two instances not in use on the shared box were brought down. After this the upgrade went smooth without any errors. It looks like swap was the culprit here. I think it would be wise if we check if the swap available is 2.5 * (sga_max_size+pga_aggregate_target) before begining DBUA on a shared box.

Friday, April 25, 2008

DBUA vs manual upgrade

While upgrading an Oracle Database, which is better DBUA or manual upgrade ?

Arguments for DBUA:
1. DBUA takes care of all the pre-install checks like kernel parameters, memory, space etc.
2. DBUA gives the option of automatic RMAN backup of the existing DB
3. DBUA upgrade is faster than manual upgrade.(As DBUA automatically sets job_queue_processes)
4. Easier to use.

Arguments against DBUA:
1. If there are errors during the upgrade, there is usually no way to resume. In many cases, where a single or multiple components of the upgrade have failed, you can restart DBUA and it takes care of the missed steps without issues.
2. Manual upgrade gives you absolute control. You know exactly where you are in the upgrade process. Tracking this in DBUA involves watching DBUA logs, Alert log at the time DBUA is running. I never liked the progress bar. It doesn't convey anything. Along with progress bar, DBUA should also show DB alert log and what script is being executed. That helps in debugging and keeps you in touch with the upgrade instead of insulating you from it.
3. DBUA takes the value of sga and other memory settings from your 9i database and creates 10g/11g init.ora based on those. Unless you pre-size your 9i init.ora, you may get ORA-4031 errors during the actual upgrade with DBUA.

Most of the time, when DBUA screws up, you have to continue your upgrade by abandoning DBUA and take a detour to manual upgrade. E-Business Suite Databases are not small, and do not provide you the luxury of restoring backup and starting with DBUA again.

Wednesday, December 5, 2007

Adventures with DBUA

In a 9.2.0.8 to 10.2.0.3 upgrade we used DBUA (Database Upgrade Assistant). Unfortunately after running smoothly till the progress bar reached 50%, we got the following errors which we ignored:

Error ignored: ORA-04045: errors during recompilation/revalidation of SYS.KU$_FHTABLE_VIEW ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","select
Error ignored: ORA-00604: error occurred at recursive SQL level 1 ORA-04031: unable to allocate 4120 bytes of shared memory ("shared
Error ignored: ORA-04031: unable to allocate 216 bytes of shared memory ("shared
Error ignored: ORA-04031: unable to allocate 768 bytes of shared memory ("shared
Error ignored: ORA-04031: unable to allocate 64 bytes of shared memory ("shared pool","declare
Error ignored: ORA-00900: invalid SQL statement
Error ignored: ORA-04031: unable to allocate 64 bytes of shared memory ("shared pool","declare
Error ignored: ORA-00900: invalid SQL statement
Error ignored: ORA-04031: unable to allocate 64 bytes of shared memory ("shared pool","declare
Error ignored: ORA-00900: invalid SQL statement
Error ignored: ORA-29532: Java call terminated by uncaught Java exception:

DBUA completed with errors in CATPROC and Spatial. We ran the statements which failed due to low shared pool after increasing shared pool manually. We also ran @?/rdbms/admin/catproc.sql. After this even CATALOG became INVALID. We re-ran DBUA and it corrected the catalog, catproc and spatial components. This is the first time, we experienced that DBUA could actually be run twice in case of errors and it correctly fixes those errors in the second time.

The shared pool size should be 900M in case you are using 24 as degree of parallelism and 600M if you are using 12 as degree of parallelism.