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

Wednesday, May 26, 2010

vi line too long error

Most of the times while viewing big log files in vi editor, you would get "Line too Long" error. A simple solution to this problem is to use the fold command:

fold -80 yourfile.log > folded.log

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.