Saturday, November 27, 2010

PRE INSTALLATION STEPS FOR ORACLE R12

This series of posts will cover a Vision install of Oracle Applications 12.1.1 on Linux. In this installment, I'll discuss requirements and acquiring the software. Subsequent posts will cover the installation of the software and actually using your shiny new E-Business Suite system.

Requirements
  1. A Linux machine (physical or virtual).
  2. At least 2GB of memory. 3GB would be better. If your machine is on the low end of this list, don't expect to use it for anything else while EBS is running.
  3. Lots of disk space. At least 290GB. set aside 400GB for other propose(like backup )
.
Recommendations
  1. Install on a version of Linux that is supported/certified for use with EBS. I'm going to be using Redhat Enterprise linux 4 or Oracle Enterprise Linux 5, Update 4 (64-bit) or (32-bit) for this install, but there are other options, listed in My Oracle Support Doc ID 761566.1: Oracle Applications Installation and Upgrade Notes Release 12 (12.1.1) for Linux x86-64 (32-bit Linux users can check out My Oracle Support Note 761564.1) It may be possible to install EBS on your favorite flavor of Linux, but that's not what this particular adventure is all about.
  2. Consider installing EBS in a virtual machine, using VMware or Virtualbox. There are serious advantages to doing this, in my opinion, particularly if, like me, you'll be installing on your primary workstation.
  3. Get familiar with some of the documentation while you're downloading the massive software distribution and building and/or patching your Linux environment to get up to spec. You'll find a reference list at the end of this post.
Preparing the OS
When laying out the disk space for your Linux server, allocate your preferred amount of space for swap and the operating system (I usually set aside about 10GB), 260-275GB for the /u01 partition (where we'll be installing the EBS software and database), and 50GB for the stage directory for the installer (I usually mount this to /mnt/R12stage). Needless to say, a production system's layout would be more refined/detailed, but if you're reading this guide as a roadmap to a production deployment, you need to stop immediately and have your head examined.

Install packages and set kernel parameters according to the appropriate section in the Release Notes referenced above. If you don't have access to My Oracle Support, you're in a bit of a tough spot, but here are some thoughts:
  • Version R12.1 of EBS comprises Oracle RDBMS 11.1.0.7, Oracle Developer 10g, and two versions of Oracle Application Server 10g (ahem, excuse me, Fusion Middleware): 10.1.2.3 and 10.1.3.4. Presumably, combining the installation requirements for those products will get you most of the way to a full set of required packages and kernel parameters.
  • Similarly, installing all the packages that come with your OS distribution should get you almost all of the installation requirements.
  • The oracle-validated RPM seems to cover many, but not all, of the software and kernel parameter requirements for Oracle Enterprise Linux.
  • One point that bears mentioning (and has been discussed pretty openly in the OTN forums, so it's not like I'm giving away any deep My Oracle Support secrets) is that an old version of openmotif libraries is required for this install. The name of the package varies by OS distribution, but the version number is what's important: it has to be version 2.1. If you go with the install-everything route, be sure to remove any competing openmotif packages.
Create two OS users, one to own the Oracle RDBMS software, and one to own the Apps software. Oracle recommends oraSID and applSID, respectively, where SID is all or part of the database SID that you designate during installation. For example, since we'll be doing a Vision install, it would be appropriate to create users oravis and applvis. It's a good idea to make sure that both users share the same primary group, usually the oinstall group. Also, create a dba group and assign it to the Oracle RDBMS software owner as an additional (not primary) group.

Acquiring and staging the software
E-Business Suite software can't be found on Oracle Technet (OTN). You can either purchase the media from the Oracle Store, or download it from Oracle's E-Delivery site. I'll assume you'll be downloading from E-Delivery. Two things worth noting here:

After logging in to E-Delivery, select "E-Business Suite" in the Product Pack dropdown, and select your desired installation platform (Linux x86 or Linux x86-64). Click Go to search, and click the "Oracle E-Business Suite Release 12.1.1 Media Pack" link to get to the downloads page. Don't pick the "Upgrade Media" link, unless you really intend to upgrade, in which case you really shouldn't be reading this.



You don't need to download all of the files listed on the page, but you're still going to be grabbing about 45GB. You might want to fix yourself a snack while you wait. The media is separated as if to be burned to DVD. For this exercise, however, we won't be burning DVDs. Be sure to grab all of the parts labelled:
  • "Oracle E-Business Suite Release 12.1.1 for Linux x86-64 Rapid Install Start Here"
  • "Rapid Install RDBMS - Disk 1" "Rapid Install Databases - Disk 1" through "Rapid Install Databases - Disk 9," inclusive
  • "Oracle E-Business Suite Release 12.1.1 for Linux x86-64 Rapid Install Tools - Disk 1"
  • "Oracle E-Business Suite Release 12.1.1 for Linux x86-64 Rapid Install APPL_TOP - Disk 1"
  • "Oracle E-Business Suite Release 12.1.1 for Linux x86-64 Rapid Install APPL_TOP - Disk 2"
When I sent these instructions to Chet, he did the smart thing and created a spreadsheet to track his downloads. He's been kind enough to share it on Google Docs. Note that your part numbers may be different if you decide to go with 64-bit Linux instead of 32-bit.

Once you have all of the media, unzip the files into the stage directory on your Linux server. When the unzip utility asks if you want to replace dvd.label or component.label files, answer yes. If you get any other errors from unzip, you may have a corrupt download, and should re-download that zip file. Don't assume you can work around it. Once you've unpacked all of the files, your stage directory should look like this:
[root@londo R12stage]# ls

oraAppDB  oraApps  oraAS  oraDB  startCD
  • At this point, you'll be ready to start the installation (finally!). Hopefully, by the time you're done building your Linux server and downloading and staging the EBS software, the next installment in this series will be up.

Thursday, November 25, 2010

Enable/Disable Archive Log Mode 10g/11g


Enable Archive Log Mode
The following are the steps required to enable archive log mode on an Oracle 10g or 11g database.
Verify the database log mode.
[oracle@ora1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 8 12:02:52 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> archive log list
Database log mode No Archive Mode
Automatic archival
Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 25
Current log sequence 27
SQL>

The log mode is No Archive Mode. Note that Archive destination is USE_DB_RECOVERY_FILE_DEST. You can determine the path by looking at the parameter RECOVERY_FILE_DEST.

SQL> show parameter recovery_file_dest
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle/flash_recovery_area
db_recovery_file_dest_size big integer 3852M
SQL>


By default, archive logs will be written to the flash recovery area. If you do not want to write archive logs to the flash recovery area you can set the parameter LOG_ARCHIVE_DEST_n to the location in which you wish to write archive logs.

SQL> alter system set log_archive_dest_1='LOCATION=/u02/app/oracle/oradata/orcl/arch' scope = both;
System altered.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u02/app/oracle/oradata/orcl/arch
Oldest online log sequence 25
Current log sequence 27
SQL>


Now we shutdown the database and bring it backup in mount mode.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
 Total System Global Area  849530880 bytes
Fixed Size                  1339824 bytes
Variable Size             511708752 bytes
Database Buffers          331350016 bytes
Redo Buffers                5132288 bytes
Database mounted.
SQL>
Lastly all that is needed it set archive log mode and open the database.
SQL> alter database archivelog;
 Database altered.
 SQL> alter database open;
 Database altered.
 SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u02/app/oracle/oradata/orcl/arch
Oldest online log sequence     25
Next log sequence to archive   27
Current log sequence           27
SQL>


We can now see that archive log mode is enabled. Notice that Automatic archive is enabled as well. In Oracle 9i an earlier another parameter needed to be set in order to enable automatic archiving. This in no longer the case in 10g and 11g as automatic archiving is enabled when the database is placed in archive log mode.
You can switch to the log file to see that an archive is written to archive log location.
SQL> alter system switch logfile;
 System altered.
 SQL> host
[oracle@ora1 ~]$ ls /u02/app/oracle/oradata/orcl/arch
1_27_711369564.dbf
[oracle@ora1 ~]$ exit
exit
 SQL> 

Disable Archive Log Mode
Note: It is recommended to perform a backup of the database (after a shutdown normal or immediate) prior to changing the archive status of a database.
The following are the steps required to disable archive log mode on an Oracle 10g or 11g database.
Verify the database log mode.
[oracle@ora1 ~]$ sqlplus / as sys<span class="searchterm2">db</span>a
 SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 8 12:54:05 2010
 Copyright (c) 1982, 2009, Oracle.  All rights reserved.
 Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u02/app/oracle/oradata/orcl/arch
Oldest online log sequence     26
Next log sequence to archive   28
Current log sequence           28
SQL>
The Database log mode is Archive mode. Next we shut down the database and bring up back up in mount mode.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
 Total System Global Area  849530880 bytes
Fixed Size                  1339824 bytes
Variable Size             511708752 bytes
Database Buffers          331350016 bytes
Redo Buffers                5132288 bytes
Database mounted.
SQL>

All that is left is to disable archive log mode and open the database.
SQL> alter database noarchivelog;
 Database altered.
 SQL> alter database open;
 Database altered.
 SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u02/app/oracle/oradata/orcl/arch
Oldest online log sequence     26
Current log sequence           28
SQL>

for 9i database
SQL>shutdown immediate;

Edit below parameters in pfile(init.ora) file.


1. LOG_ARCHIVE_START=TRUE


As you can see, ARCHIVELOG mode has been disabled.

Wednesday, November 24, 2010

Installation of oracle apps 11.5.10.2


Installing Oracle Applications 11.5.10.2 on Oracle Enterprise Linux 5.3

Description :
This Documentations covers the details about the patches which we need to download and the process of applying patches and also step by step installation process for Oracle Apps 11.5.10.2 on OEL5.3d

  • Install the following non-standard packages:

    The following packages are not part of the OEL 5 or RHEL 5 distribution media and must be installed manually:

    * compat-libstdc++-egcs-1.1.2-11
    * compat-libcwait-2.1-11
    * compat-oracle-el5-1.0-51
    * openmotif21-2.1.30-11.EL51
    * binutils-2.152

    The following packages must be installed from the OEL 5 or RHEL 5 distribution media:

    * libXp-1.0.0-8.1.el5
    * compat-libgcc-296-2.96-138
    * compat-libstdc++-33-3.2.3-61
    * compat-db-4.2.52-5.1

    → Comment out the 
    /lib/libcwait.so line from /etc/ld.so.preload

    For Oracle Enterprise Linux 5, Red Hat Enterprise Linux 5 and SUSE Linux Enterprise Server 10 customers, the LD_ASSUME_KERNEL environment variable should be unset before starting the installation. The installation fails when the LD_ASSUME_KERNEL variable is set by the adgetlnxver.sh file during the course of the installation. Patch 6365595 contains the fix for adgetlnxver.sh file. The procedure below is a guideline for replacing the adgetlnxver.sh file in the Oracle Applications 11i shiphome.
  • 1. Download the patch 6365595 from OracleMetalink.

    2. Follow the Oracle Applications Installation guide and set up the stage area.

    3. Set the STAGE_TOP environment variable to the top level directory of the stage area that contains the subdirectories startCD, oraApps, oraDB, oraiAS and oraAppDB. Make sure that the stage area is read writable.

    # export STAGE_TOP=/stage/software/stage11i10.2
    # export PATCH_TOP=/stage/software/stage11i10.2/oel5rpms/6365595

    4. Create the following directories in the stage area.
    # mkdir -p $STAGE_TOP/oraDB/Disk3/db/stage/appsutil/bin
    # mkdir -p $STAGE_TOP/oraApps/Disk5/appl/stage/bin
    5. Copy the adgetlnxver.sh file in the patch 6365595 to the following directories created in earlier step.
    # cp -p $PATCH_TOP/ad/bin/adgetlnxver.sh $STAGE_TOP/oraDB/Disk3/db/stage/appsutil/bin
    # cp -p $PATCH_TOP/ad/bin/adgetlnxver.sh $STAGE_TOP/oraApps/Disk5/appl/stage/bin

    6. Update the zip archive with the fix (adgetlnxver.sh file).
    # cd $STAGE_TOP/oraDB/Disk3/db/stage
    # zip -u dboh0_appsutil appsutil/bin/adgetlnxver.sh
    # cd $STAGE_TOP/oraApps/Disk5/appl/stage
    # zip -u ad_CORE bin/adgetlnxver.sh
  • Download and apply the OS library patch 6078836 from OracleMetaLink and create the following symbolic link:
    # ln -s /usr/lib/libdb.so.2 /usr/lib/libdb.so.3

    # Verify that the host name setting is correct. The command should return a fully qualified host name. For example: <host_name>.<domain_name>.

    # hostname -f

  • add the following to .bash_profile for oracle and applmgr users and execute in the root session doing the install:

    export LD_PRELOAD32=/lib/libcwait.so
    export KSH_VERSION='PD KSH'
    export LDEMULATION='elf_i386'
  • For Oracle Enteprise Linux and Red Hat Enteprise Linux 5 Update 3 (5.3), users will see a failure when running Rapid Install. Users must edit the file $STAGE_TOP/startCD/Disk1/rapidwiz/bin/runWizard.sh and comment out lines 122-125, as in:

    # if test "$exit_code" == "0" ; then
    # LD_ASSUME_KERNEL=2.4.19
    # export LD_ASSUME_KERNEL
    # fi
  • If we get the Error RW-50004: Error code received when running external process

Create Softlink for a library file shown as below
# cd /usr/lib
# ln -sf libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2

  • Reboot the system and start the rapid installation process
  • Reference link
    Documentation for installing Oracle Applications 11.5.10.2 on Oracle Enterprise Linux 5.3

    Description :
    This Documentations covers the details about the patches which we need to download and the process of applying patches and also step by step installation process for Oracle Apps 11.5.10.2 on OEL5.3d

  • Install the following non-standard packages:

    The following packages are not part of the OEL 5 or RHEL 5 distribution media and must be installed manually:

    * compat-libstdc++-egcs-1.1.2-11
    * compat-libcwait-2.1-11
    * compat-oracle-el5-1.0-51
    * openmotif21-2.1.30-11.EL51
    * binutils-2.152

    The following packages must be installed from the OEL 5 or RHEL 5 distribution media:

    * libXp-1.0.0-8.1.el5
    * compat-libgcc-296-2.96-138
    * compat-libstdc++-33-3.2.3-61
    * compat-db-4.2.52-5.1

    → Comment out the 
    /lib/libcwait.so line from /etc/ld.so.preload

    For Oracle Enterprise Linux 5, Red Hat Enterprise Linux 5 and SUSE Linux Enterprise Server 10 customers, the LD_ASSUME_KERNEL environment variable should be unset before starting the installation. The installation fails when the LD_ASSUME_KERNEL variable is set by the adgetlnxver.sh file during the course of the installation. Patch 6365595 contains the fix for adgetlnxver.sh file. The procedure below is a guideline for replacing the adgetlnxver.sh file in the Oracle Applications 11i shiphome.
  • 1. Download the patch 6365595 from OracleMetalink.

    2. Follow the Oracle Applications Installation guide and set up the stage area.

    3. Set the STAGE_TOP environment variable to the top level directory of the stage area that contains the subdirectories startCD, oraApps, oraDB, oraiAS and oraAppDB. Make sure that the stage area is read writable.

    # export STAGE_TOP=/stage/software/stage11i10.2
    # export PATCH_TOP=/stage/software/stage11i10.2/oel5rpms/6365595

    4. Create the following directories in the stage area.
    # mkdir -p $STAGE_TOP/oraDB/Disk3/db/stage/appsutil/bin
    # mkdir -p $STAGE_TOP/oraApps/Disk5/appl/stage/bin
    5. Copy the adgetlnxver.sh file in the patch 6365595 to the following directories created in earlier step.
    # cp -p $PATCH_TOP/ad/bin/adgetlnxver.sh $STAGE_TOP/oraDB/Disk3/db/stage/appsutil/bin
    # cp -p $PATCH_TOP/ad/bin/adgetlnxver.sh $STAGE_TOP/oraApps/Disk5/appl/stage/bin

    6. Update the zip archive with the fix (adgetlnxver.sh file).
    # cd $STAGE_TOP/oraDB/Disk3/db/stage
    # zip -u dboh0_appsutil appsutil/bin/adgetlnxver.sh
    # cd $STAGE_TOP/oraApps/Disk5/appl/stage
    # zip -u ad_CORE bin/adgetlnxver.sh
  • Download and apply the OS library patch 6078836 from OracleMetaLink and create the following symbolic link:
    # ln -s /usr/lib/libdb.so.2 /usr/lib/libdb.so.3

    # Verify that the host name setting is correct. The command should return a fully qualified host name. For example: <host_name>.<domain_name>.

    # hostname -f

  • add the following to .bash_profile for oracle and applmgr users and execute in the root session doing the install:

    export LD_PRELOAD32=/lib/libcwait.so
    export KSH_VERSION='PD KSH'
    export LDEMULATION='elf_i386'
  • For Oracle Enteprise Linux and Red Hat Enteprise Linux 5 Update 3 (5.3), users will see a failure when running Rapid Install. Users must edit the file $STAGE_TOP/startCD/Disk1/rapidwiz/bin/runWizard.sh and comment out lines 122-125, as in:

    # if test "$exit_code" == "0" ; then
    # LD_ASSUME_KERNEL=2.4.19
    # export LD_ASSUME_KERNEL
    # fi
  • If we get the Error RW-50004: Error code received when running external process

Create Softlink for a library file shown as below
# cd /usr/lib
# ln -sf libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2

  • Reboot the system and start the rapid installation process

  •                                         

Monday, November 22, 2010

Upgrading 9i Database to 10g for Oracle Applications11i


For Oracle Applications 11i installation, the database version that comes is 9.2.0
This post is to give a brief and clear steps for upgrading your database to 10.2.0
Instance Details
Here are the details for the Oracle Application I am trying on
Oracle Application Version: 11.5.10 CU2
Oracle Database Version: 9.2.0
Since its a 11.5.10 CU2, its autoconfig enabled. So we have to make sure that we need to make new Oracle Home also autoconfig enabled. For more information on autoconfig, please refer to metalink note ID 165195.1
The below steps are summarized from metalink note ID 423056.1.
To begin with I will briefly explain the procedure in 3 major steps.
1) Pre-Upgrade
2) Upgrade
3) Post-Upgrade
Pre-Upgrade Step:
1) Check the current database version:
For upgrading the database, you need to check the exact version of the current database and based on that check the upgrade path.
Below is the brief compatibility matrix. Reference Metalink note ID 316889.1.
COMPATIBILITY MATRIX
====================
+ Minimum Version of the database that can be directly upgraded to Oracle 10g Release 2
8.1.7.4 -> 10.2.X.X.X
9.0.1.4 or 9.0.1.5 -> 10.2.X.X.X
9.2.0.4 or higher -> 10.2.X.X.X
10.1.0.2 or higher -> 10.2.X.X.X
+ The following database version will require an indirect upgrade path.
7.3.3 (or lower) -> 7.3.4 -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X
7.3.4 -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X
8.0.n -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X
8.1.n -> 8.1.7 -> 8.1.7.4 -> 10.2.X.X.X
SQL> select banner from v$version;
BANNER
—————————————————————-
Oracle9i Enterprise Edition Release 9.2.0.5.0 – Production
PL/SQL Release 9.2.0.5.0 – Production
CORE 9.2.0.6.0 Production
TNS for Linux: Version 9.2.0.5.0 – Production
NLSRTL Version 9.2.0.5.0 – Production

Since in my case its 9.2.0.5, I can directly upgrade to 10.2.0
2) Check the application version:
Oracle Application version should be above 11.5.9 (11.5.10 CU2 in my case).
SQL> SELECT product_group_id GroupID, product_group_name GroupName,
release_name Release, product_group_type GroupType, argument1
FROM fnd_product_groups;

GROUPID GROUPNAME
———- ————————————————————
RELEASE
————————————————–
GROUPTYPE ARGUMENT1
—————————— ——————————
1 Default product group
11.5.10
Standard

Check the developer 6i Patch set.
refer metalink no:[ID 125767.1]
3) Check the latest autoconfig patch:
Check if the autoconfig latest patch is applied to your environment or not. Metalink note ID 165195.1
The latest patch mention in this note is 5985992. So if this patch is not applied then please apply this patch on application system.

SQL> select count(*) from ad_bugs
2 where bug_number = ’5985992′;


COUNT(*)
———-
1

4) Apply either
or
1If you are using Oracle Demand Planning, your Applications version must be 11.5.10 in order to use Oracle Database 10g Release 2. The 11.5.9 version of Oracle Demand Planning is not certified against Oracle Database 10g Release 2.Upgrade Step:
1) Install Oracle Database 10g. (Software Only).
2) Since you are upgrading the 9i database to 10g database, you have to install 10g software to some different Oracle Home. So create a new Oracle Home 10.2.0 and install the software in that location.
Example if the currect 9i Oracle home location is
9i Oracle Home: /u01/app/oracle/apps11idb/9.2.0
10g Oracle Home: /u01/app/oracle/apps11idb/10.2.0
3) Create nls/data/9idata directory:
This can be done using $ORACLE_HOME/nls/data/old/cr9idata.pl script
Here ORACLE_HOME refers to 10g ORACLE_HOME.
[oracle@ocvmrh2064 old]$ export ORACLE_HOME=/u01/app/oracle/apps11idb/10.2.0
[oracle@ocvmrh2064 old]$ perl cr9idata.pl
Creating directory //u01/app/oracle/apps11idb/10.2.0/nls/data/9idata …
Copying files to //u01/app/oracle/apps11idb/10.2.0/nls/data/9idata…
Copy finished.
Please reset environment variable ORA_NLS10 to //u01/app/oracle/apps11idb/10.2.0/nls/data/9idata!
[oracle@ocvmrh2064 old]$ export ORA_NLS10=/u01/app/oracle/apps11idb/10.2.0/nls/data/9idata

4) Next Step is to perform database upgrade.
Reference used is the upgrade docs
a) copy the script utlu102i.sql provided in new Oracle Home 10g to some temporary location and run the same in your existing 9i database.
[oracle@ocvmrh2064 admin]$ pwd
/u01/app/oracle/apps11idb/10.2.0/rdbms/admin
[oracle@ocvmrh2064 admin]$ cp utlu102i.sql /tmp/
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
WARNING: –> “streams_pool_size” is not currently defined and needs a value of
at least 50331648
WARNING: –> “large_pool_size” needs to be increased to at least 8388608
WARNING: –> “session_max_open_files” needs to be increased to at least 20
copy the init.ora parameter file from old ORACLE_HOME to new ORACLE_HOME
Set the above parameters in the new init.ora parameter file you copied to 10g ORACLE_HOME
**********************************************************************
SYSAUX Tablespace:
[Create tablespace in the Oracle Database 10.2 environment]
**********************************************************************
–> New “SYSAUX” tablespace
…. minimum required size for database upgrade: 500 MB

SQL> create tablespace sysaux datafile ‘/u01/app/oracle/apps11idata/sysaux01.dbf’ size 1000M
2 extent management local segment space management auto;
Tablespace created.
TIMESTAMP WITH TIMEZONE Datatype:
The time zone files that are supplied with Oracle Database 10g have been updated from version 1 to version 2 to reflect changes in transition rules for some time zone regions. The changes may affect existing data of TIMESTAMP WITH TIME ZONE datatype. To preserve this TIMESTAMP data for updating according to the new time zone transition rules, you must run the utltzuv2.sql script on the database before upgrading. This script is located in the new 10.2 ORACLE_HOME/rdbms/admin directory. This script analyzes your database for TIMESTAMP WITH TIME ZONE columns that are affected by the updated time zone transition rules.
If the utltzuv2.sql script identifies columns with time zone data affected by a database upgrade, then back up the data in character format before you upgrade the database. After the upgrade, you must update the tables to ensure that the data is stored based on the new rules. If you export the tables before upgrading and import them after the upgrade, the conversion will happen automatically during the import.
SQL> @?/../10.2.0/rdbms/admin/utltzuv2.sql
DROP TABLE sys.sys_tzuv2_temptab
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.
Query sys.sys_tzuv2_temptab Table to see if any TIMEZONE data is affected by
version 2 transition rules
PL/SQL procedure successfully completed.
Commit complete.
SQL> select * from sys.sys_tzuv2_temptab;
no rows selected
b) Shutdown the database and start it again. Run the pre-upgrade utility again to check if every thing is alright before staring the upgrade.
c) Shutdown all the process on mid tier and database tier
d) Shutdown the listener process for 9i database.
e) connect to database using 10g Oracle Home.
[oracle@ocvmrh2064 9.2.0]$ export ORACLE_HOME=/u01/app/oracle/apps11idb/10.2.0
[oracle@ocvmrh2064 9.2.0]$ sqlplus “/as sysdba”
Message 133 not found; product=SQLPlus; facility=SP2
: Release 9.2.0.5.0 – Production on Sun Oct 14 04:30:52 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL>
You might face the issue mentioned above. This is becase the PATH variable is not having the new ORACLE_HOME/bin path.
[oracle@ocvmrh2064 9.2.0]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@ocvmrh2064 9.2.0]$ sqlplus “/as sysdba”
SQL*Plus: Release 10.2.0.1.0 – Production on Sun Oct 14 04:33:09 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
f) Start the upgrade process
SQL> startup upgrade
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.
Total System Global Area 591396864 bytes
Fixed Size 1220700 bytes
Variable Size 415240100 bytes
Database Buffers 163577856 bytes
Redo Buffers 11358208 bytes
Database mounted.
Database opened.
SQL> SPOOL upgrade.log
SQL> @catupgrd.sql
Oracle Database 10.2 Upgrade Status Utility 10-14-2007 06:32:36
.
Component Status Version HH:MM:SS
Oracle Database Server VALID 10.2.0.1.0 00:55:04
JServer JAVA Virtual Machine VALID 10.2.0.1.0 00:06:53
Oracle XDK VALID 10.2.0.1.0 00:08:38
Oracle Database Java Packages VALID 10.2.0.1.0 00:00:44
Oracle Text VALID 10.2.0.1.0 00:01:20
Oracle XML Database VALID 10.2.0.1.0 00:02:50
Oracle Real Application Clusters INVALID 10.2.0.1.0 00:00:01
Oracle Data Mining VALID 10.2.0.1.0 00:00:30
OLAP Analytic Workspace VALID 10.2.0.1.0 00:00:25
OLAP Catalog VALID 10.2.0.1.0 00:01:32
Oracle OLAP API VALID 10.2.0.1.0 00:01:01
Oracle interMedia INVALID 10.2.0.1.0 00:09:37
Spatial INVALID 10.2.0.1.0 00:09:24
.
Total Upgrade Time: 01:52:15
g) After the upgrade is over, there will be many invalid objects, which we have to compile. Please use utlrp.sql to compile the invalids.
Once the invalids are compiled, the next step is to make the database autoconfig enabled. This are brifly explaind in post upgrade section.
Post Upgrade Steps:
1) Copy the .env file present in 9i Oracle Home to 10g oracle home.
2) Change all the 9.2.0 reference to 10.2.0 reference.
Source the .env file.
3) Restart the database again.
4) On the application tier run the below command to generate appsutil.zip file.
perl <AD_TOP>/bin/admkappsutil.pl
5) Copy the appsutil.zip file generated on application tier to the database tier inside 10g Oracle Home.
unzip the appsutil.zip file.
6) Next step is to create a context file on database tier. Run the below commands with appropriate values. This will generate context file on database tier.
cd $ORACLE_HOME/appsutil
perl adbldxml.pl tier=db appsuser=<APPSuser> appspasswd=<APPSpwd>
Please note that above oracle home we are selecting is 10g Oracle home.
==========================================================
While running adbldxml.pl you might encounter following issue.
[oracle@ocvmrh2081 bin]$ perl adbldxml.pl tier=db appsuser=apps appspasswd=apps
Starting context file generation for db tier..
Using JVM from /u01/app/oracle/proddb/10.2.0/jdk/bin/java to execute java programs..
The log file for this adbldxml session is located at:
/u01/app/oracle/proddb/10.2.0/appsutil/log/adbldxml_02172131.log
UnsatisfiedLinkError exception loading native library: njni10
Could not Connect to the Database with the above parameters, Please answer the Questions below
Enter Hostname of Database server: OCVMRH2081.us.oracle.com
Enter Port of Database server: 1521
Enter SID of Database server: PROD
Could not Connect to the Database : ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Could not Connect to the Database with the above parameters, Please answer the Questions below
Enter Hostname of Database server[OCVMRH2081.us.oracle.com]:
Enter Port of Database server[1521]:
and it will keep on asking the same questions.
The reason for such error is becasue adbldxml.pl is not able to make connection to your database. This is because of listener issue.
- If you do “echo $TNS_ADMIN”, it will point to your 9i ORACLE_HOME.
- Now what you have to do is to copy the <SID_hostname> directory present under 9i ORACLE_HOME/network/admin to new 10g ORACLE_HOME/netwrok/admin
- Make all the references to 9i ORACLE_HOME to 10g ORACLE_HOME in listener.ora
- make sure that listener started from 9i ORALCE_HOME is stopped from 9i ORACLE_HOME only
- Start the listner from 10g ORACLE_HOME. Then try running adbldxml.pl. This should work.
==========================================================
7) Once the context file is created on db tier, run autoconfig.
cd $ORACLE_HOME/appsutils/bin
adconfig.sh contextfile=<CONTEXT> appspass=<APPSpwd>
This completes the migeration to 10g database
plz refer weblink: