Upgrading Oracle 9.2.0.6 to 10.2.0.3 on AIX 5.2 Stephen Rea - 9/11/08; Updated 9/16/08 Notes on upgrading from Oracle 9.2.0.6 to 10.2.0.3 on AIX 5.2 (including checking the prerequisites, installing the RDBMS software, gathering the statistics for the cost-based optimizer, upgrading the databases, building the make files, and recompiling the programs). This is only the RDBMS upgrade for AIX. It does not include the RDBMS upgrade for Windows or the Application Server upgrade, which we haven't done yet; although, there are some notes and downloads relating to those that are included here. If you have a Data Guard standby database for PROD, the easiest thing to do is to shut it down before starting the PROD database upgrade, and recreate it after doing the PROD database upgrade. NOTE: These are mainly my raw notes from our upgrades. The directory names, databases, and other information given here (along with some of the scripts) are for example only and are specific to our site (although I've changed the SID's, passwords, user ID's, and some other site-specific information) - they will probably be different at your site. Also, in the instructions below, change the values in brackets to your values, such as to your Oracle SYSTEM password, and to your Oracle SID. You may want to do the "Step 7: Collect statistics and export them prior to the 10gR2 database upgrade", shown below, in the days prior to your actual 10gR2 database conversions to save some time during those conversions. Make sure you have the proper versions of the C and COBOL compilers installed first (SunGardHE FAQ CMS-2554 - Banner Oracle RDBMS Versions). Listed below are the targets for the upgrades that I am doing, including their patch files downloaded from Oracle's Metalink site): AIX: Oracle 10.2.0.3: Install 10.2.0.1 (B24442* and B24443*) Apply 10.2.0.3 upgrade (p5337014_10203_AIX64-5L.zip) Apply timezone files from patch 5632264 (p5632264_10203_AIX64-5L.zip - Version 4 TIMEZONE files. NOTE: These are version-specific, so, don't use 9.2.0.6 files in a 10.2.0.3 database! See Metalink Note 359145.1, Table 1, column 3, for 10.2.0.3 database.) Apply patch 5442919 (p5442919_10203_AIX64-5L.zip - Expired Extents Not Being Reused) Recompile Banner C and COBOL programs after Oracle RDBMS upgrade (FAQ 1-1ORYOA). (Banner Forms recompile not usually necessary after RDBMS upgrade, but, I did that anyway.) The following installations/upgrades aren't shown here (we haven't done them yet): Windows 2003: Oracle 10.2.0.3: Install 10.2.0.1 (B24558*) Apply 10.2.0.3 upgrade (p5337014_10203_WINNT.zip) Application Server 10.1.2.3 (includes Forms 10.1.2.3): (to be done) OPatch 10.1 needed for Windows (p2617419_10102_GENERIC.zip) Install 10.1.2.0.2 (B24465* and B24466*) Apply 10.1.2.3 upgrade (p5983622_10123_WINNT.zip) Apply patch ... Regenerate all Banner Forms after Oracle Forms upgrade to 10gR2 using the *r2.bat compile scripts from the 7.3 upgrades (genformr2.shl, etc.) (FAQ 1-E71G5). Changes from 9x to 10x (FAQ 1-J1XHU) include: ifgen90.exe changed to frmcmp.exe. FORMS90_PATH changed to FORMS_PATH. f90all_jinit.jar changed to frmall_jinit.jar. f90all.jar changed to frmall.jar https://ASserver.wherever.edu/forms90/f90servlet?config=prod changed to https://ASserver.wherever.edu/forms/frmservlet?config=prod Some SunGardHE FAQs and Oracle Metalink Notes to see: FAQ 1-1S08VF: Banner 7.X to Require 10gR2 in April 2008 - Oracle DB 10.2.0.2 - OAS 10.1.2.x FAQ 1-3FK8HL: Banner Requires Oracle 10g after April 30th 2008 FAQ 1-3NJFIT: The General 7.5 bundle b_0508_forms_gen70500 requires OAS 10.1.2.x FAQ CMS-2554: Banner Oracle RDBMS Versions FAQ 1-1ORYOA: Banner C, Cobol, and Forms Recompiling after an Oracle RDBMS Upgrade FAQ 1-95O8T: Banner Example Init.ora For Oracle RDBMS 10.2 (Oracle Database 10g) FAQ 1-E71G5: Added Questions - Banner and Oracle Application Server 10g Release2 FAQ - OAS10gR2 FAQ 1-J1XHU: Syntax changes between OAS10g (9.0.4.1) to OAS10gR2 (10.1.2.0.2) FAQ 1-DY3Q5: How to Bypass Oracle 10g Web Cache for Forms Applications Note 282036.1: Minimum Software Versions and Patches Required to Support Oracle Products on IBM pSeries Note 412271.1: ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While Upgrading Or Patching Databases To 10.2.0.3 Note 316889.1: Complete Checklist for Manual Upgrades to 10gR2 Note 314422.1: Remote Diagnostic Agent (RDA) 4 - Getting Started Note 250262.1: RDA 4 - Health Check / Validation Engine Guide Note 396387.1: Workarounds when Database time zone patches are not available for your patchset Note 359145.1: Impact of 2007 USA daylight saving changes on the Oracle database Note 365463.1: How To Install the precompilers on Oracle 10.2 Note 293658.1: 10.1 or 10.2 Patchset Install Getting ORA-29558 JAccelerator (NCOMP) And ORA-06512 Note 61707.1: How to Create a Database Link and Access It from Forms Note 238596.1: Making a 32-bit COBOL Program Fails With "cob32: bad magic number: cobsqlintf.o" Note 4516865.8: Bug 4516865 - Wrong permissions after install of 10gR2 (10.2.0.1) Note 438676.1: Where is the script changePerm.sh? Note 443638.1: Permission Denied Errors for users other than "oracle" Note 309769.1: How to determine JDK version on AIX Note 290738.1: Oracle Critical Patch Update Program General FAQ Note 360470.1: Security Alerts and Critical Patch Updates- Frequently Asked Questions Note 555681.1: Oracle Application Server Patch Set Notes Addendum 10g Release 2 (10.1.2) Patch Set 3 (10.1.2.3.0) Note 329361.1: Oracle Application Server 10g Release 2 (10.1.2) Support Status and Alerts Note 415222.1: Steps to Maintain Oracle Application Server 10g Release 2 (10.1.2) Web Cache CAN REMAIN DISABLED during the Application Server upgrade (see my SR #: 1-168070861), in contrast to the following note that I have: NOTE: Web Cache will need to be re-enabled before an Oracle upgrade is applied to Application Server, then disabled after the upgrade. See BORACLE e-mail "Re: Banner 7 INB Still Slow and Locking Up" from Bob Westcott at 3/9/2006 4:47 PM, "Re: Jinitiator vs Sun Java Plug in" from Dave Midgett at 3/21/2006 1:08 PM, and FAQ 1-DY3Q5). Other notes and BORACLE e-mails: "Re: UNDO Tablespace pct used on 10g" from Alison O'Connor at 2/25/2008 9:27 AM: On Metalink, searched for 5442919, from which I clicked on "Patch 5442919", and downloaded p5442919_10203_AIX64-5L.zip for AIX. (No Windows version was listed.) NOTE: After logging into Metalink, you can download a specific patch number by using the following link (substituting the patch number): http://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=5442919 You may also be able to see the note associated with it by using (with the .8): https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=5442919.8 or a bug note, such as: https://metalink.oracle.com/metalink/plsql/showdoc?db=Bug&id=5755471 FYI: Note: 412271.1 is NOT APPLICABLE here at our site, but may be applicable at your site. Our AIX server server is 64-bit ("bootinfo -y" from user root shows 64), the 10gR2 we are installing is 64-bit, and the database was created as 64-bit (in sqlplus, do: select decode(substr(metadata,109,4),'B047','64-bit', 'B023','32-bit', 'Unknown') from sys.kopm$;) and is being upgraded to 10.2.0.3 64-bit, so, we don't have to apply a patch for this. Our databases on the Windows systems are 32-bit. Our Windows 2003 servers are 32-bit (not AMD64/EM64T), the 10gR2 we are installing is 32-bit, and the database was created as 32-bit and is being upgraded to 10.2.0.3 32-bit, so, we don't have to apply a patch for this, either. Therefore, the following DOES NOT need to be applied: "Re: possible alternative to exp/imp for 10g rdbms upgrade" from Bob Rahe at 2/25/2008 11:38 AM: after you do the upgrade of the oracle software to 10.2.0.3 and BEFORE you do the database upgrade you need to apply 3 patches: 5755471, 5871314, and 5892355 FYI: Note: 316889.1 - Complete Checklist for Manual Upgrades to 10gR2 Prerequisites for manual upgrades to 10gR2: Install Oracle 10g Release 2 in a new Oracle Home. Install JAccelerator (NCOMP) into the home from the Companion media. Install the latest available patchset from Metalink. Install the latest available Critical Patch Update. Note 290738.1 Oracle Critical Patch Update Program General FAQ (not shown here). If you are upgrading to 10.2.0.3, review the following alert before performing the upgrade and apply any required patches: Note 412271.1 "ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported" - NOT APPLICABLE here at our site (see above) While Upgrading Or Patching Databases To 10.2.0.3 Either take a cold or hot backup for your database. Make sure to take a backup of Oracle Home and Central Inventory. Central inventory can be located by the contents of oraInst.loc files. "oraInst.loc" is available in the following locations on various platforms: /var/opt/oracle/oraInst.loc -- Solaris /etc/oraInst.loc -- other operating systems HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\inst_loc -- On windows Platform. Verify kernel parameters are set according to the 10gR2 Installation Guide (most shown below). Verify that all O/S packages and patches are installed as per the Installation Guide (most shown below). We did not order the following DVD's because of tax issues, but used the downloaded files from Metalink instead: DVD's (Media Packs purchased through http://oraclestore.oracle.com): Oracle Database 10g Release 2 (10.2.0.1.0) Media Pack (with Oracle Enterprise Manager 10g Release 3 Grid Control, Oracle Secure Backup and Oracle Warehouse Builder 10g Release 2) for AIX5L Based Systems (64-bit). Oracle Database 10g Release 2 (10.2.0.1.0) Media Pack (with Oracle Enterprise Manager 10g Release 3 Grid Control, Oracle Secure Backup Release 10.1.0.3.0 and Oracle Warehouse Builder 10g Release 2) for Microsoft Windows (32-bit). Oracle Application Server 10g Release 2 (10.1.2.0.2) Media Pack (with Oracle Enterprise Manager 10g Release 3 Grid Control (10.2.0.3.0)) for Microsoft Windows (32-bit). Create directory C:\oracle\10gR2 on your PC. Download the RDBMS 10.2.0.1 and 10.2.0.3 files from Metalink to C:\oracle\10gR2 on your PC (edelivery.oracle.com has the Media Pack with 10.2.0.1 and metalink.oracle.com has the patches to 10.2.0.3; these downloads took a full day of FTP'ing): AIX RDBMS: B24442* and B24443* (Oracle Database 10g Release 2 (10.2.0.1.0) for AIX5L Based Systems (64-bit)) p5337014_10203_AIX64-5L.zip (10.2.0.3 Patch Set For Oracle Database Server for AIX5L Based Systems (64-bit)) p5632264_10203_AIX64-5L.zip (10.2.0.3 RDBMS patch for AIX 5L - Version 4 TIMEZONE files) p5442919_10203_AIX64-5L.zip (10.2.0.3 RDBMS patch for AIX 5L - Expired Extents Not Being Reused) Download the Oracle Database 10g Companion CD Release 2 (10.2.0.1.0), which wasn't in the resulting dvd1 or dvd2 directories (B24442* or B24443*), from the following web site (see my SR Number 6925723.994; took over two hours to download): http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201aixsoft.html 10gr2_aix5l64_companion.cpio.gz (1,332,394,319 bytes) (cksum - 303439033) Other downloads: Windows RDBMS: B24558* (Oracle Database 10g Release 2 (10.2.0.1.0) for Microsoft Windows (32-bit)) B24559* (Oracle Database 10g Release 2 Client (10.2.0.1.0) for Microsoft Windows (32-bit)) p5337014_10203_WINNT.zip (10.2.0.3 Patch Set For Oracle Database Server for Microsoft Windows (32-bit)) Download the Application Server 10.1.2.0.2 and 10.1.2.3 files from Metalink edelivery: B24465* and B24466* (Oracle Application Server 10g (10.1.2.0.2) for Windows (32-bit)) p2617419_10102_GENERIC.zip (OPatch 10.1 needed for Application Server upgrades) p5983622_10123_WINNT.zip (Application Server 10.1.2.3 upgrade) Create directory C:\oracle\10gR2\p5632264 on your PC. Extract the timezone.dat, timezlrg.dat, and readme.txt files from Patch 5632264 (p5632264_10203_AIX64-5L.zip) into C:\oracle\10gR2\p5632264 on your PC. AIXserver Install: Create the 10.2.0.1 and 10.2.0.3 directories on AIXserver, FTP (using WinFTP) the downloaded files from your PC, and unzip them as needed (use Oracle's unzip here, not GNU's gunzip, except for the companion extraction): login oracle mkdir /pgms/patches cd /pgms/patches mkdir Oracle_10201 mkdir Oracle_10201/companion mkdir Oracle_10203 mkdir Oracle_10203/p5632264 FTP B24442* and B24443* (in binary mode) from C:\oracle\10gR2 to /pgms/patches/Oracle_10201. FTP p5337014_10203_AIX64-5L.zip (in binary mode) from C:\oracle\10gR2 to /pgms/patches/Oracle_10203. FTP the timezone.dat and timezlrg.dat files (in binary mode) and the readme.txt file (in ascii mode) from C:\oracle\10gR2\p5632264 to /pgms/patches/Oracle_10203/p5632264. FTP p5442919_10203_AIX64-5L.zip (in binary mode) from C:\oracle\10gR2 to /pgms/patches/Oracle_10203. FTP 10gr2_aix5l64_companion.cpio.gz (in binary mode) from C:\oracle\10gR2 to /pgms/patches/Oracle_10201/companion If you don't have Oracle's unzip utility in your search path: Extract unzip from p5337014_10203_AIX64-5L.zip in C:\oracle\10gR2 and FTP it to /pgms/patches (in binary mode). chmod 755 /pgms/patches/unzip Then, use "/pgms/patches/unzip" instead of just "unzip" in the instructions below. cd /pgms/patches/Oracle_10201 (note: the dashes in the names cause problems for just using "unzip B24442*.zip") ls B24442*.zip | sed 's/.*/unzip &/' | sh Unzipping B24442*.zip creates directory dvd1 ls B24443*.zip | sed 's/.*/unzip &/' | sh Unzipping B24443*.zip creates directory dvd2 cd /pgms/patches/Oracle_10203 unzip p5337014_10203_AIX64-5L.zip Unzipping p5337014_10203_AIX64-5L.zip creates directory Disk1 unzip p5442919_10203_AIX64-5L.zip Unzipping p5442919_10203_AIX64-5L.zip creates directory 5442919 cd /pgms/patches/Oracle_10201/companion gunzip 10gr2_aix5l64_companion.cpio.gz cpio -itcv <10gr2_aix5l64_companion.cpio cpio -idcmv <10gr2_aix5l64_companion.cpio puts in Disk1 directory Note: 282036.1 - Minimum Software Versions and Patches Required to Support Oracle Products on IBM pSeries (I ignored most of the "no data" messages below, since they were not applicable to our site): Check to see which maintenance level AIX is at: oslevel -r 5200-08 which means AIX 5.2.0.0 ML08 For AIX 5L V5.2 support of Oracle Database 10gR2 (10.2.0.1): AIX 5L Version 5.2 ML 04 and later: instfix -i -k "IY63133 IY64978 IY63366 IY64691 IY65001 IY64737 IY75901 IY69518 IY70029" There was no data for IY64978 in the fix database. (this is for JFS) HACMP (IBM High Availability Cluster Multiprocessing) - probably not applicable: instfix -i -k "IY60759" There was no data for IY60759 in the fix database. GPFS (IBM General Parallel File System) - probably not applicable: instfix -i -k "IY69911 IY70276 IY70277 IY74097" There was no data for IY69911 in the fix database. There was no data for IY70276 in the fix database. There was no data for IY70277 in the fix database. There was no data for IY74097 in the fix database. JDK (Sun Java Development Kit): /usr/java14/jre/bin/java -fullversion (java14 is the latest in /usr) java full version "J2RE 1.4.2 IBM AIX build ca142-20060421 (SR5)" which is 32-bit 1.4.2.75, according to Metalink note 309769.1) (but, "type java" shows java is /usr/java130/jre/bin/java, and is 32-bit 1.3.1.10) instfix -i -k "IY63533 IY65305" There was no data for IY63533 in the fix database. (but, this is for 64-bit) C/C++ Compiler: xlc -qversion IBM XL C/C++ Enterprise Edition V8.0 for AIX Version: 08.00.0000.0019 instfix -i -k "IY65361 IY65362" There was no data for IY65361 in the fix database. There was no data for IY65362 in the fix database. AIX Filesets: lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.libperfstat \ bos.perf.perfstat bos.perf.proctools xlC.aix50.rte:7.0.0.4 xlC.rte:7.0.0.1 lslpp: 0504-132 Fileset bos.perf.proctools not installed. lslpp: 0504-132 Fileset xlC.aix50.rte:7.0.0.4 not installed. lslpp: 0504-132 Fileset xlC.rte:7.0.0.1 not installed. however, lslpp -l xlC.aix5* xlC.rte* shows: xlC.aix50.rte 8.0.0.0 COMMITTED C Set ++ Runtime for AIX 5.0 xlC.rte 8.0.0.0 COMMITTED C Set ++ Runtime FAQ CMS-2554 Oracle RDBMS Versions: For IBM AIX 5L(5.2,5.3) with RDBMS 10.2.x, the following APARS are required for 5.2: instfix -i -k "IY43980 IY44810 IY45462 IY45707 IY46214 IY46605 IY51801" lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.libperfstat \ bos.perf.perfstat bos.perf.proctools lslpp: 0504-132 Fileset bos.perf.proctools not installed. Results: Need: Fileset bos.perf.proctools (our sysadmin installed this before I continued). Download and install the Remote Diagnostic Agent (Metalink Note 314422.1: Remote Diagnostic Agent (RDA) 4 - Getting Started): Download the RDA for AIX from Metalink to C:\oracle\10gR2: p6854532_4110_AIX5L.zip (RDA/OCM bundle for AIX5L Based Systems (64-bit)) Check perl version on AIXserver: perl -version shows v5.8.0 Install the RDA for AIX: login oracle cd /pgms (since unzip creates an rda directory) FTP p6854532_4110_AIX5L.zip from C:\oracle\10gR2 unzip p6854532_4110_AIX5L.zip (not gunzip) mv readme.txt rda cd rda rda.sh -cv (verifies installation) Set up RDA for AIX: login oracle cd /pgms/rda ./rda.sh -S accepted all defaults except: Enter an Oracle User ID (userid only) to view DBA_ and V$ tables: / Is '/' a sysdba user (will connect as sysdba) (Y/N)? Y Run the PreInstall checklist for Oracle 10.2.0 (Metalink Note 250262.1: RDA 4 - Health Check / Validation Engine Guide): The Health Check Validation Engine (HCVE) rule set for Oracle Database 10g R2 (10.2.0) PreInstall (AIX) is described in: https://metalink.oracle.com/metalink/plsql/docs/HCVE_A201DB10R2_aix.htm Set up the HVCE collection options and run the checks for AIXserver: login oracle cd /pgms/rda ./rda.sh -T hcve Enter the HCVE rule set number: 2 (Oracle Database 10g R2 (10.2.0) PreInstall (AIX)) Shows: Test "Oracle Database 10g R2 (10.2.0) PreInstall (AIX)" executed at Fri Jun 6 15:52:03 2008 Test Results ~~~~~~~~~~~~ ID NAME RESULT VALUE ===== ==================== ====== ======================================== 10 OS Certified? PASSED Certified with Oracle Database 10g R2 20 User in /etc/passwd? PASSED userOK 30 Group in /etc/group? PASSED GroupOK 40 Input ORACLE_HOME RECORD $ORACLE_HOME 50 ORACLE_HOME Valid? PASSED OHexists 60 O_H Permissions OK? PASSED CorrectPerms 70 Umask Set to 022? PASSED UmaskOK 80 LDLIBRARYPATH Unset? FAILED IsSet 90 LIBPATH Unset? FAILED IsSet 100 Other O_Hs in PATH? FAILED OratabEntryInPath 110 oraInventory Permiss PASSED oraInventoryOK 120 /tmp Adequate? FAILED TempTooSmall TMPDIRTooSmall 130 Swap (in MB) RECORD 4096 140 RAM (in MB) PASSED 6144 150 SwapToRAM OK? FAILED SwapLessThanRAM 160 Disk Space OK? PASSED DiskSpaceOK 170 AIXTHREAD_SCOPE=S? FAILED AIXTHREADNotSet 175 LINK_CNTRL is Unset? PASSED LINK_CNTRLunset 180 Got ld,nm,ar,make? PASSED ld_nm_ar_make_found 190 ulimits OK? FAILED NoFilesTooSmall 200 Got OS Packages? PASSED All required OS packages are installed 210 Got OS Patches? PASSED PatchesFound 220 Other OUI Up? PASSED NoOtherOUI What to do (from https://metalink.oracle.com/metalink/plsql/docs/HCVE_A201DB10R2_aix.htm): The LD_LIBRARY_PATH environment variable is set in your environment and must be unset before installing Oracle Database 10g. The LIBPATH environment variable is set in your environment and must be unset before installing Oracle Database 10g. The PATH variable contains one or more references to the Oracle homes found in the /etc/oratab file. Remove these references from the PATH variable before installing Oracle Database 10g. ALERT- Your temporary space ${TEMP} has less than the required 400 MB free space. Make sure your temporary space has at least 400 MB of free space. ALERT- ${TMPDIR} has less than the required 200 MB. Point the TMPDIR environment variable to a mount point with at least 200 MB of free space. ALERT- Swap space is less than the physical memory. Set swap space to at least the same size as the physical memory. AIXTHREAD_SCOPE should be set to S in the environment. (system-based contention scope, instead of process-based contention scope; default is S) Increase the ulimit(NOFILES) to a minimum of 4096. Fix the items flagged above in the 10gR2 preInstall checklist (Note: After 10.2.0.3 installation, the LD_LIBRARY_PATH and LIBPATH will have to be put back in for the proCOBOL compiles to succeed): In the /home/oracle/.profile file (log in as oracle for these changes): Comment out the following: # export LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$LD_LIBRARY_PATH Add the following: # # Explicitly set system-based contention scope for Oracle processes (defaults # to S, but the Oracle 10gR2 preinstall check wanted it set explicitly) # export AIXTHREAD_SCOPE=S In the banenv files (log in as banner for these changes): Comment out the following: # LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${COBDIR}/coblib # export LD_LIBRARY_PATH Comment out the following: # LIBPATH=${ORACLE_HOME}/lib:/usr/lib:${COBDIR}/lib:${LIBPATH} # export LIBPATH Have the sysadmin increase ulimit(NOFILES) to 4096: ulimit -n 4096 chuser nofiles=4096 oracle Have the sysadmin increase the swap space (currently 4096 MB to the same size as physical memory (6144 MB). Create the Oracle product directory: login oracle mkdir /pgms/oracle/product/v10203 Note: installer creates Oracle Home specified, but rda checks fail if not created and not specified to rda. Create the tmp directory: login root mkdir /data/tmp chmod 777 /data/tmp One final RDA run: login oracle cd /pgms/rda export PATH=`echo $PATH | sed "s;:$ORACLE_HOME/bin;;"` unset ORACLE_HOME unset TNS_ADMIN export TEMP=/data/tmp export TMPDIR=/data/tmp ./rda.sh -T hcve Enter the HCVE rule set number: 2 (Oracle Database 10g R2 (10.2.0) PreInstall (AIX)) Enter value for planned Oracle Home: /pgms/oracle/product/v10203 Shows: Test "Oracle Database 10g R2 (10.2.0) PreInstall (AIX)" executed at Wed Jun 11 16:08:14 2008 Test Results ~~~~~~~~~~~~ ID NAME RESULT VALUE ===== ==================== ====== ======================================== 10 OS Certified? PASSED Certified with Oracle Database 10g R2 20 User in /etc/passwd? PASSED userOK 30 Group in /etc/group? PASSED GroupOK 40 Input ORACLE_HOME RECORD /pgms/oracle/product/v10203 50 ORACLE_HOME Valid? PASSED OHexists 60 O_H Permissions OK? PASSED CorrectPerms 70 Umask Set to 022? PASSED UmaskOK 80 LDLIBRARYPATH Unset? PASSED UnSet 90 LIBPATH Unset? PASSED UnSet 100 Other O_Hs in PATH? PASSED NoneFound 110 oraInventory Permiss PASSED oraInventoryOK 120 /tmp Adequate? PASSED TempSpaceOK 130 Swap (in MB) RECORD 6144 140 RAM (in MB) PASSED 6144 150 SwapToRAM OK? PASSED SwapToRAMOK 160 Disk Space OK? PASSED DiskSpaceOK 170 AIXTHREAD_SCOPE=S? PASSED AIXTHREAD_SCOPEOK 175 LINK_CNTRL is Unset? PASSED LINK_CNTRLunset 180 Got ld,nm,ar,make? PASSED ld_nm_ar_make_found 190 ulimits OK? PASSED ulimitOK 200 Got OS Packages? PASSED All required OS packages are installed 210 Got OS Patches? PASSED PatchesFound 220 Other OUI Up? PASSED NoOtherOUI Make backup copies of oraInventory, oratab, and all listener files before performing the Oracle upgrade: login root find / -type d -name oraInventory | sed 's/.*/cp -pr & &.pre_10203/' | sh cp -p /etc/oratab /etc/oratab.pre_10203 find / -name listener.ora | grep -v samples | grep 'network/admin' | sed 's/\(.*\)\/listener.ora$/cp -pr \1 \1.pre_10203/' | sh SHUT DOWN ALL CURRENTLY RUNNING DATABASES and listeners and other processes (such as web servers). (Oracle does not support installs of the RDBMS while databases are running.) Check that all databases are down using: ps -ef | grep pmon (Note: After the 10.2.0.1 install and 10.2.0.3 upgrade, the resulting 10.2.0.3 listener will need to be used to handle both old and new database versions if you leave some of them at the old Oracle version.) Install Oracle 10.2.0.1.0 on AIX: login root cd /pgms/patches/Oracle_10201/dvd1/database/rootpre ./rootpre.sh login oracle export PATH=`echo $PATH | sed "s;:$ORACLE_HOME/bin;;"` unset ORACLE_HOME unset TNS_ADMIN unset OBJECT_MODE export TEMP=/data/tmp export TMPDIR=/data/tmp Start X-Windows session (such as X-Win32) running on your PC. Then, check to see if your DISPLAY environment variable points to your PC, and if an X-Windows connection to your PC can be established (test it by running xclock): env DISPLAY xclock (close xclock on your PC, which terminates it on AIX) cd /pgms/patches/Oracle_10201/dvd1/database ./runInstaller Answer 'y' if root has run 'rootpre.sh' (above) ---> The following is from the Oracle installer running through X-Windows to install Oracle 10.2.0.1.0: "Welcome" screen comes up Select Basic Installation. Oracle Home Location: /pgms/oracle/product/v10203 Keep default Installation Type (Enterprise Edition) and UNIX DBA Group (dba). Uncheck Create Starter Database Click Next button "Preparing to install" screen comes up and runs for a while "Product-Specific Prequisite Checks" comes up. All prereqs passed. (if any filesets were listed as missing, the sysadmin would need to install them before continuing) Click Next button "Summary" screen comes up Shows Oracle Home: /pgms/oracle/product/v10203 (OUIHome1) along with 107 new products to install, requiring 3.46 GB Click Install button Installing ... Linking ... Error in invoking target 'agent nmo nmb' of makefile '/pgms/oracle/product/v10203/sysman/lib/ins_sysman.mk'. (XCOFF32 object files are not allowed in 64-bit mode.) Clicked Continue Setup ... Shows the following configuration scripts need to be executed as the "root" user: /pgms/oracle/product/v10203/root.sh In a separate telnet session: login root Make copies of the files that will be updated by root.sh (but, note that these files will probably be the same after the upgrade): cd /usr/local/bin cp -p dbhome dbhome.pre_10203 cp -p oraenv oraenv.pre_10203 cp -p coraenv coraenv.pre_10203 cd /pgms/oracle/product/v10203 ./root.sh It shows: Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /pgms/oracle/product/v10203 Enter the full pathname of the local bin directory: [/usr/local/bin]: (answer y when prompted about overwriting these three files) Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Click OK button "End of Installation" screen comes up Shows: The installation of Oracle10g Database was successful. The following J2EE Applications have been deployed and are accessible at the URLs listed below. iSQL*Plus URL: http://AIXserver.wherever.edu:5560/isqlplus iSQL*Plus DBA URL: http://AIXserver.wherever.edu:5560/isqlplus/dba Click Exit button Press Enter key in the AIX session. ---> End of Oracle installer running through X-Windows. cd /pgms/oracle/product/v10203/ cp -p root.sh root.sh.post10201 Copy the old listener.ora, sqlnet.ora, and tnsnames.ora files: cd /pgms/oracle/product/v9206/network/admin cp -p listener.ora /pgms/oracle/product/v10203/network/admin cp -p sqlnet.ora /pgms/oracle/product/v10203/network/admin cp -p tnsnames.ora /pgms/oracle/product/v10203/network/admin Copy the init.ora and other dbs files: cd /pgms/oracle/product/v9206/dbs cp -p * /pgms/oracle/product/v10203/dbs Add to end of global login file for sqlplus: vi /pgms/oracle/product/v10203/sqlplus/admin/glogin.sql set termout off define new_prompt='nolog' column value new_value new_prompt -- Fix for buffer overflow with Oracle8 on some user ID's -- select username || ': ' || substr(global_name,1,instr(global_name,'.')-1) -- value from user_users, global_name; select username || ': ' || substr(substr(global_name,1,30),1, instr(substr(global_name,1,30)||'.','.')-1) value from user_users,global_name; set sqlprompt "&new_prompt> " set termout on set pagesize 24 set showmode off timing off -- set feedback on echo on Note: You can still start up your databases as usual from the old Oracle at this time, if needed, by first re-logging into the oracle user ID. Upgrade to Oracle 10.2.0.3.0 on AIX: login root /usr/sbin/slibclean login oracle export PATH=`echo $PATH | sed "s;:$ORACLE_HOME/bin;;"` export ORACLE_HOME=/pgms/oracle/product/v10203 export ORACLE_SID=TEST unset TNS_ADMIN unset OBJECT_MODE export TEMP=/data/tmp export TMPDIR=/data/tmp Start X-Windows session (such as X-Win32) running on your PC. Then, check to see if your DISPLAY environment variable points to your PC, and if an X-Windows connection to your PC can be established (test it by running xclock): env DISPLAY xclock (close xclock on your PC, which terminates it on AIX) cd /pgms/patches/Oracle_10203/Disk1 ./runInstaller Answer 'y' to root has run '/usr/sbin/slibclean' (above) ---> The following is from the Oracle installer running through X-Windows to install Oracle 10.2.0.3.0 patchset: "Welcome" screen comes up Click Next button "Specify Home Details" screen comes up Leave Name and Path as OUIHome1 and /pgms/oracle/product/v10203 Click Next button "Summary" screen comes up Global Settings Source: /pgms/patches/Oracle_10203/Disk1/stage/products.xml Oracle Home: /pgms/oracle/product/v10203 (OUIHome1) Product Languages English Space Requirements /pgms/ Required 3.18GB: Available 19.95GB /data/ Required 45MB (only as temporary space): Available 29.45GB Upgrades (3 products) New Installations (77 products) Already Installed (77 products) Click Install button "Installation" screen comes up Denstalling ... Copying ... Installing ... Linking ... Setting Up ... Configuration Assistants ... note: applies patch 5557962 Prompts to run /pgms/oracle/product/v10203/root.sh from another unix session as root (it sets ORACLE_HOME or ORACLE_OWNER). In that session, it shows: login root cd /pgms/oracle/product/v10203 ./root.sh It shows: Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /pgms/oracle/product/v10203 Enter the full pathname of the local bin directory: [/usr/local/bin]: (answer y when prompted about overwriting these three files) Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Click OK button "End of Installation" screen comes up Shows: The installation of Oracle Database 10g Release 2 Patch Set 2 was successful. Click Exit button Click Yes to confirm Press Enter key in the AIX session. ---> End of Oracle installer running through X-Windows. cd /pgms/oracle/product/v10203/ cp -p root.sh root.sh.post10203 Updated 10.2.0.3 Database Time Zone files (Version 4) in UNIX - manual installation instructions in Metalink Note 396387.1: Change the privileges of the updated timezone files to 664 from 640 (otherwise, the non-dba-group AIX users get "SP2-0642: SQL*Plus internal error state 2165, context 4294967295:0:0" when bringing up sqlplus, or "SQL*Loader-704: Internal error: ulconnect: OCIInitialize [1804]" when bringing up sqlldr): login oracle cd /pgms/patches/Oracle_10203/p5632264 chmod 664 * Made a backup copy of the above files in $ORACLE_HOME/oracore/zoneinfo: cd $ORACLE_HOME/oracore/zoneinfo cp -p timezone.dat timezone.dat_version_2 cp -p timezlrg.dat timezlrg.dat_version_2 cp -p readme.txt readme.txt_version_2 Checked to make sure the timezone files weren't in use: fuser -u timezone.dat fuser -u timezlrg.dat Copied the updates to the above files: cp -p /pgms/patches/Oracle_10203/p5632264/* . Apply patch 5442919 (p5442919_10203_AIX64-5L.zip; Expired Extents Not Being Reused) export PATH=$PATH:/pgms/oracle/product/v10203/OPatch cd /pgms/patches/Oracle_10203/5442919 opatch apply Put LD_LIBRARY_PATH and LIBPATH back in the banenv files so proCOBOL programs can be compiled. (log in as banner for these changes). START UP THE DATABASES and listeners and other processes. Will have to "reinstall" the precompilers from the Oracle_10201/dvd2/client directory, since the install from dvd1 wasn't a complete installation (See Metalink Note: 365463.1): (Didn't shut down the 9.2.0.6 databases for the following installation.) Install Oracle Programmer 10.2.0.1.0 (which contains the precompilers): login oracle export PATH=`echo $PATH | sed "s;:$ORACLE_HOME/bin;;"` export ORACLE_HOME=/pgms/oracle/product/v10203 export ORACLE_SID=TEST unset TNS_ADMIN unset OBJECT_MODE export TEMP=/data/tmp export TMPDIR=/data/tmp Start X-Windows session (such as X-Win32) running on your PC. Then, check to see if your DISPLAY environment variable points to your PC, and if an X-Windows connection to your PC can be established (test it by running xclock): env DISPLAY xclock (close xclock on your PC, which terminates it on AIX) cd /pgms/patches/Oracle_10201/dvd2/client ./runInstaller Answer 'y' to root has run 'rootpre.sh' ---> The following is from the Oracle installer running through X-Windows to install Oracle Programmer 10.2.0.1.0: "Welcome" screen comes up Click Next button "Select Installation Type" screen comes up Select Custom Click Next button "Specify Home Details" screen comes up Leave Name and Path as OUIHome1 and /pgms/oracle/product/v10203 Click Next button "Available Product Components" screen comes up Select Oracle Programmer 10.2.0.1.0 (even though it showed it was installed - this is a Reinstall) Click Next button "Product-Specific Prerequisite Checks" screen comes up Shows all passed Click Next button "Summary" screen comes up Global Settings Source: /pgms/patches/Oracle_10201/dvd2/client/stage/products.xml Oracle Home: /pgms/oracle/product/v10203 (OUIHome1) Installation Type: Custom Product Languages English Space Requirements /pgms/ Required 227MB: Available 15.88GB /data/ Required 82MB (only as temporary space): Available 29.39GB Reinstallations (1 product) New Installations (3 products, including Precompilers) Already Installed (71 product) Click Install button "Installation" screen comes up Deinstalling ... Installing ... Linking ... Setting Up ... Configuration ... "End of Installation" screen comes up Shows: The installation of Oracle Client was successful. Click Exit button Click Yes to confirm Press Enter key in the AIX session. ---> End of Oracle installer running through X-Windows. Metalink Note 316889.1 additional requirements: Install JAccelerator (NCOMP) into the Oracle Home from the Companion media to avoid the issue in: Note 293658.1 "10.1 or 10.2 Patchset Install Getting ORA-29558 JAccelerator (NCOMP) And ORA-06512" (see Note 293658.1, my SR Number 6925723.994, and Oracle Database Companion CD Installation Guide 10g Release 2 (10.2) for AIX 5L Based Systems (64-Bit) (B19079-01), for these download and installation steps): (Didn't shut down the 9.2.0.6 databases for this installation.) Install Oracle Database 10g Products (which contains JAccelerator (NCOMP)): login oracle export PATH=`echo $PATH | sed "s;:$ORACLE_HOME/bin;;"` export ORACLE_HOME=/pgms/oracle/product/v10203 export ORACLE_SID=TEST unset TNS_ADMIN unset OBJECT_MODE export TEMP=/data/tmp export TMPDIR=/data/tmp Start X-Windows session (such as X-Win32) running on your PC. Then, check to see if your DISPLAY environment variable points to your PC, and if an X-Windows connection to your PC can be established (test it by running xclock): env DISPLAY xclock (close xclock on your PC, which terminates it on AIX) cd /pgms/patches/Oracle_10201/companion/Disk1 ./runInstaller Answer 'y' to root has run 'rootpre.sh' ---> The following is from the Oracle installer running through X-Windows to install Oracle 10.2.0.1.0 Products: "Welcome" screen comes up Click Next button "Product to Install" screen comes up Select Oracle Database 10g Products 10.2.0.1 Click Next button "Specify Home Details" screen comes up Leave Name and Path as OUIHome1 and /pgms/oracle/product/v10203 Click Next button "Product-Specific Prerequisite Checks" screen comes up Shows all passed Click Next button "Summary" screen comes up Global Settings Source: /pgms/patches/Oracle_10201/companion/Disk1/stage/products.xml Oracle Home: /pgms/oracle/product/v10203 (OUIHome1) Installation Type: Oracle Database 10g Products Product Languages English Space Requirements /pgms/ Required 1.13GB: Available 17.07GB /data/ Required 208MB (only as temporary space): Available 29.40GB New Installations (19 products) Already Installed (1 product) Click Install button "Installation" screen comes up Installing ... Linking ... Setting Up ... "End of Installation" screen comes up Shows: The installation of Oracle Database 10g Products was successful. Ultra Search URL: http://AIXserver.wherever.edu:5620/ultrasearch Ultra Search Administration Tool URL: http://AIXserver.wherever.edu:5620/ultrasearch/admin Click Exit button Click Yes to confirm Press Enter key in the AIX session. ---> End of Oracle installer running through X-Windows. (Didn't shut down the 9.2.0.6 databases for this installation.) Upgrade Oracle Database 10g Products and Precompilers to 10.2.0.3: login root /usr/sbin/slibclean login oracle export PATH=`echo $PATH | sed "s;:$ORACLE_HOME/bin;;"` export ORACLE_HOME=/pgms/oracle/product/v10203 export ORACLE_SID=TEST unset TNS_ADMIN unset OBJECT_MODE export TEMP=/data/tmp export TMPDIR=/data/tmp unset LD_LIBRARY_PATH unset LIBPATH export LD_LIBRARY_PATH=${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib:/usr/lib:${COBDIR}/lib export LIBPATH=${ORACLE_HOME}/lib:/usr/lib:/usr/lpp/cobol/lib Start X-Windows session (such as X-Win32) running on your PC. Then, check to see if your DISPLAY environment variable points to your PC, and if an X-Windows connection to your PC can be established (test it by running xclock): env DISPLAY xclock (close xclock on your PC, which terminates it on AIX) cd /pgms/patches/Oracle_10203/Disk1 ./runInstaller Answer 'y' to root has run '/usr/sbin/slibclean' (above) ---> The following is from the Oracle installer running through X-Windows to install Oracle 10.2.0.3.0 patchset: "Welcome" screen comes up Click Next button "Specify Home Details" screen comes up Leave Name and Path as OUIHome1 and /pgms/oracle/product/v10203 Click Next button "Available Product Components" screen comes up Click Next button "Summary" screen comes up Global Settings Source: /pgms/patches/Oracle_10203/Disk1/stage/products.xml Oracle Home: /pgms/oracle/product/v10203 (OUIHome1) Product Languages English Space Requirements /pgms/ Required 991MB: Available 15.75GB /data/ Required 115MB (only as temporary space): Available 29.45GB Reinstallations (1 product) New Installations (16 products, including JAccelerator and Precompilers patches) Already Installed (168 products) Click Install button "Installation" screen comes up Installing ... Linking ... Got the following error: Linking /pgms/oracle/product/v10203/precomp/lib32/rtsora32 /bin/sh: cob32: not found. Clicked Ignore to continue. (We ignored that since we only do 64-bit COBOL compiles.) Setting Up ... "End of Installation" screen comes up Shows: The installation of Oracle Database 10g Release 2 Patch Set 2 was successful. Click Exit button Click Yes to confirm Press Enter key in the AIX session. ---> End of Oracle installer running through X-Windows. Upgrade all AIXserver databases from 9i (9.2.0.6) to 10gR2 (10.2.0.3) after running prerequisite checks and doing those and other prerequisites, and gathering and exporting statistics for the 10g CBO (Cost-Based Optimizer): MADE A BACKUP OF THE DATABASES before the checklist changes for the 10gR2 upgrade. The following steps are from Note 316889.1 - Complete Checklist for Manual Upgrades to 10gR2: Make backup copies of oraInventory after performing the Oracle 10gR2 upgrades/patches: login root find / -type d -name oraInventory | sed 's/.*/cp -pr & &.post_10203/' | sh Step 2: Run the upgrade information tool on each of the databases to see what actions need to be taken for tablespaces, init.ora parameters, database links passwords, statistics, and database objects: login oracle cp -p /pgms/oracle/product/v10203/rdbms/admin/utlu102i.sql /tmp cd /tmp sqlplus "/as sysdba" spool utlu102i.$ORACLE_SID.log @utlu102i.sql spool off exit NOTE: The changes listed here, pointed out by the utlu102i.sql runs, for SYSTEM tablespaces, logfiles, TEMP tablespaces, rollback segments, and shared_pool_size are shown for eight databases that we have, which I've renamed here to PROD, TEST, SID3, SID4, etc. These are shown to give you an idea of what you might come across during the prerequisite checking and conversions. The descriptions of the steps and actions for those init.ora changes are only shown here in the "PROD requirements" list - the other databases have similar changes listed, but not described here. PROD requirements: SYSTEM tablespace: add 56MB and/or enable AUTOEXTEND - see Step 2 below. init.ora - see Step 21, Appendix A, and Appendix B: streams_pool_size=50MB - ignore this message from utlu102i.sql for DB version 9iR2 (9.2.0.6) or earlier. (so, ignore this parameter) large_pool_size=8MB - this is probably OK for us. Add this parameter. session_max_open_files=20 - specifies the maximum number of BFILEs that can be opened in any session (such as using DBMS_LOB.FILEOPEN()); default is 10; range 1-50. The default is probably OK for us. obsolete/depreciated: hash_join_enabled - obsolete. Delete this parameter. log_archive_start - Archiving is now automatically started when the database is placed in ARCHIVELOG mode. Delete this parameter. remote_archive_enable - This parameter is deprecated in favor of the LOG_ARCHIVE_CONFIG parameter. REMOTE_ARCHIVE_ENABLE is retained for backward compatibility only. Keep this parameter. Passwords will be encrypted in database links - see Step 4. Update statistics for SYS and XDB schemas - see Step 7. Invalid objects exist - see Step 8. SYSAUX tablespace: create with 500MB - see Step 31. TEST requirements: SYSTEM tablespace: add 50MB and/or enable AUTOEXTEND init.ora: streams_pool_size=50MB large_pool_size=8MB session_max_open_files=20 obsolete/depreciated: hash_join_enabled log_archive_start Passwords will be encrypted in database links Update statistics for SYS and XDB schemas Invalid objects exist SYSAUX tablespace: create with 500MB SID3 requirements: SYSTEM tablespace: add 50MB and/or enable AUTOEXTEND init.ora: streams_pool_size=50MB large_pool_size=8MB session_max_open_files=20 obsolete/depreciated: hash_join_enabled log_archive_start Passwords will be encrypted in database links Update statistics for SYS and XDB schemas Invalid objects exist SYSAUX tablespace: create with 500MB SID4 requirements: SYSTEM tablespace: add 52MB and/or enable AUTOEXTEND init.ora: streams_pool_size=50MB large_pool_size=8MB session_max_open_files=20 obsolete/depreciated: hash_join_enabled log_archive_start Passwords will be encrypted in database links Update statistics for SYS and XDB schemas Invalid objects exist SYSAUX tablespace: create with 500MB SID5 requirements: Logfiles should be at least 4MB (currently 500K) TEMP tablespace: Recreate this, since utlu102i.sql thinks the space is bad init.ora: streams_pool_size=50MB large_pool_size=8MB session_max_open_files=20 obsolete/depreciated: hash_join_enabled log_archive_start Install XML Update statistics for SYS schema SYSAUX tablespace: create with 500MB SID6 requirements: Logfiles should be at least 4MB (currently 500K) init.ora: streams_pool_size=50MB large_pool_size=8MB session_max_open_files=20 obsolete/depreciated: hash_join_enabled log_archive_start Install XML Update statistics for SYS schema SYSAUX tablespace: create with 500MB SEED requirements: Logfiles should be at least 4MB (currently 500K) SYSTEM tablespace: add 21MB and/or enable AUTOEXTEND Rollback: Recreate with rollback segments at least 70MB init.ora: shared_pool_size=187MB - change this from 150M to 200M streams_pool_size=50MB large_pool_size=8MB session_max_open_files=20 obsolete/depreciated: hash_join_enabled log_archive_start Passwords will be encrypted in database links Update statistics for SYS and XDB schemas Invalid objects exist SYSAUX tablespace: create with 500MB SID8 requirements: Logfiles should be at least 4MB (currently 500K) Rollback: Recreate with rollback segments at least 70MB init.ora: streams_pool_size=50MB large_pool_size=8MB session_max_open_files=20 obsolete/depreciated: hash_join_enabled log_archive_start Install XML Update statistics for SYS schema SYSAUX tablespace: create with 500MB Step 3: List the users which have the CONNECT role (which only has CREATE SESSION in 10gR2) for each of the databases (PROD, TEST, SID3, SID4, SID5, SID6, SEED, SID8): sqlplus "/ as sysdba" SELECT grantee FROM dba_role_privs WHERE granted_role = 'CONNECT' and grantee NOT IN ( 'SYS', 'OUTLN', 'SYSTEM', 'CTXSYS', 'DBSNMP', 'LOGSTDBY_ADMINISTRATOR', 'ORDSYS', 'ORDPLUGINS', 'OEM_MONITOR', 'WKSYS', 'WKPROXY', 'WK_TEST', 'WKUSER', 'MDSYS', 'LBACSYS', 'DMSYS', 'WMSYS', 'OLAPDBA', 'OLAPSVR', 'OLAP_USER', 'OLAPSYS', 'EXFSYS', 'SYSMAN', 'MDDATA', 'SI_INFORMTN_SCHEMA', 'XDB', 'ODM'); exit shows: PROD: NAMES, SCOTT, BANSSO, BAN_WEB, NLSUSER, EVISIONS TEST: NAMES, SCOTT, BANSSO, BAN_WEB, NLSUSER, EVISIONS SID3: NAMES, SCOTT, BANSSO, BAN_WEB, NLSUSER, EVISIONS SID4: NAMES, SCOTT, BANSSO, BAN_WEB, NLSUSER, EVISIONS SID5: (none) SID6: (none) SEED: NAMES, SCOTT, BANSSO, WEBSYS, BAN_WEB, EVISIONS SID8: (none) Step 4: Check for database links which would need to be recreated if a downgrade was needed (to remove the upgrade), since the passwords are encoded now in 10gR2 database links: sqlplus "/ as sysdba" set recsep off SELECT 'create '||DECODE(U.NAME,'PUBLIC','public ')||'database link ' ||DECODE(U.NAME,'PUBLIC',Null, U.NAME||'.')|| L.NAME ||' connect to ' || L.USERID || ' identified by ' ||L.PASSWORD||' using ''' || L.host || '''' ||';' TEXT FROM sys.link$ L, sys.user$ U WHERE L.OWNER# = U.USER# ; exit PROD - Note: I removed all of these database links before the 10gR2 conversion: create public database link SID8.WORLD connect to SYSTEM identified by '' using 'AIXserver_sid8'; create public database link TEST connect to SYSTEM identified by '' using 'AIXserver_test'; create public database link TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.SEED.WORLD connect to SYSTEM identified by '' using 'AIXserver_seed'; create database link OTHERID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; Recreated the public TEST link as follows: create public database link TEST connect to SYSTEM identified by using 'AIXserver_test'; NOTE: You can also now use the following to create a link that logs you into the same username/password (see Metalink Note: 61707.1): create public database link MYTEST using 'AIXserver_test'; TEST - Note: I removed all of these database links before the 10gR2 conversion: create public database link SID8.WORLD connect to SYSTEM identified by '' using 'AIXserver_sid8'; create public database link TEST connect to SYSTEM identified by '' using 'AIXserver_test'; create public database link TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.SEED.WORLD connect to SYSTEM identified by '' using 'AIXserver_seed'; create database link OTHERID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; Note: To drop the public TEST link (since it pointed to itself causing a loopback error), I had to do the following: alter database rename global_name to xxxx; drop public database link test; alter database rename global_name to test; SID3 - Note: I removed all of these database links before the 10gR2 conversion: create public database link SID8.WORLD connect to SYSTEM identified by '' using 'AIXserver_sid8'; create public database link TEST connect to SYSTEM identified by '' using 'AIXserver_test'; create public database link TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.SEED.WORLD connect to SYSTEM identified by '' using 'AIXserver_seed'; create database link OTHERID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; SID4 - Note: I removed all of these database links before the 10gR2 conversion: create public database link SID8.WORLD connect to SYSTEM identified by '' using 'AIXserver_sid8'; create public database link TEST connect to SYSTEM identified by '' using 'AIXserver_test'; create public database link TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; create database link MYID.SEED.WORLD connect to SYSTEM identified by '' using 'AIXserver_seed'; create database link OTHERID.TEST.WORLD connect to SYSTEM identified by '' using 'WINserver_test'; SID5: (none) SID6: (none) SEED - Note: I removed this database link before the 10gR2 conversion: create database link SYSTEM.PROD.WORLD connect to SYSTEM identified by '' using 'AIXserver_prod'; SID8: (none) Step 5: Run the timezone check on each of the databases (PROD, TEST, SID3, SID4, SID5, SID6, SEED, SID8) - No TIMESTAMP WITH TIMEZONE datatypes were found in the databases: cp -p /pgms/oracle/product/v10203/rdbms/admin/utltzuv2.sql /tmp cd /tmp sqlplus "/as sysdba" spool utltzuv2.$ORACLE_SID.log @utltzuv2.sql spool off exit Step 6: Check what character set is being used (9i should be OK): select * from nls_database_parameters where parameter ='NLS_NCHAR_CHARACTERSET'; Shows: AL16UTF16 Step 7 done below. Step 8: Fix invalid objects by doing the following on the PROD and cloned databases (PROD, TEST, SID3, SID4, SEED) from SYS (some known invalid objects still exist, as shown in their respective /tmp/invalid_pre.$ORACLE_SID.lst files): sqlplus "/ as sysdba" select substr(owner,1,15) owner, substr(object_name,1,30) object, substr(object_type,1,15) type, status from dba_objects where status <> 'VALID' order by owner,object; @?/rdbms/admin/utlrp.sql spool /tmp/invalid_pre.$ORACLE_SID.lst select substr(owner,1,15) owner, substr(object_name,1,30) object, substr(object_type,1,15) type, status from dba_objects where status <> 'VALID' order by owner,object; spool off exit Step 9: Check for corruption in the dictionary for all databases (PROD, TEST, SID3, SID4, SID5, SID6, SEED, SID8) - No corruption found: sqlplus "/ as sysdba" Set verify off Set space 0 Set line 120 Set heading off Set feedback off Set pages 1000 Spool analyze.sql Select 'Analyze cluster "'||cluster_name||'" validate structure cascade;' from dba_clusters where owner='SYS' union Select 'Analyze table "'||table_name||'" validate structure cascade;' from dba_tables where owner='SYS' and partitioned='NO' and (iot_type='IOT' or iot_type is NULL) union Select 'Analyze table "'||table_name||'" validate structure cascade into invalid_rows;' from dba_tables where owner='SYS' and partitioned='YES'; spool off @$ORACLE_HOME/rdbms/admin/utlvalid.sql @analyze.sql exit Miscellaneous checks done in the same sqlplus session for all databases (PROD, TEST, SID3, SID4, SID5, SID6, SEED, SID8): Step 10: All snapshot refreshes successfully completed. Step 11: No files need media recovery. Step 12: No files are in backup mode. Step 13: Outstanding unresolved distributed transactions are resolved. Step 15: Users SYS and SYSTEM have SYSTEM as their default tablespace. Step 16: The AUD$ table is in the SYSTEM tablespace. Step 18: The table XDB.MIGR9202STATUS does not exist. sqlplus "/ as sysdba" select distinct(trunc(last_refresh)) from dba_snapshot_refresh_times; select * from v$recover_file; select * from v$backup where status!='NOT ACTIVE'; select * from dba_2pc_pending; select username, default_tablespace from dba_users where username in ('SYS','SYSTEM'); select tablespace_name from dba_tables where table_name='AUD$'; select * from dba_tables where table_name = 'MIGR9202STATUS'; drop table XDB.MIGR9202STATUS; exit Step 17: Get the location of the control files for all databases (I didn't see where this information was needed anywhere for the prerequisites): login root find / -name '*ctrl*.ctl' | grep -v gzip | grep -v sb_ctrl | sort -t/ +2 Step 22: Check for adequate free space on archive log destination file systems: login root find / -name archivelogs Shows all archivelogs directories are in the /orcl file system df -k | grep orcl Shows percentage used in /orcl Step 29: Add the following to /usr/lbin/oraenv (our other environment variables are already set): # 10gR2 addition: export ORA_NLS10=$ORACLE_HOME/nls/data Step 2: Make changes for SYSTEM tablespaces, logfiles, TEMP tablespaces, rollback segments, and shared_pool_size indicated by utlu102i.sql: PROD changes: SYSTEM tablespace: add 56MB and/or enable AUTOEXTEND: sqlplus "/ as sysdba" alter tablespace system add datafile '/data/oradata/${ORACLE_SID}/sys_${ORACLE_SID}_04.dbf' SIZE 100064K; exit TEST changes: SYSTEM tablespace: add 50MB and/or enable AUTOEXTEND: sqlplus "/ as sysdba" alter tablespace system add datafile '/data/oradata/${ORACLE_SID}/sys_${ORACLE_SID}_04.dbf' SIZE 100064K; exit SID3 changes: SYSTEM tablespace: add 50MB and/or enable AUTOEXTEND: sqlplus "/ as sysdba" alter tablespace system add datafile '/data/oradata/${ORACLE_SID}/sys_${ORACLE_SID}_04.dbf' SIZE 100064K; exit SID4 changes: SYSTEM tablespace: add 52MB and/or enable AUTOEXTEND: sqlplus "/ as sysdba" alter tablespace system add datafile '/data/oradata/${ORACLE_SID}/sys_${ORACLE_SID}_04.dbf' SIZE 100064K; exit SID6 changes: Logfiles should be at least 4MB (currently 500K): sqlplus "/ as sysdba" select * from v$log; alter system switch logfile; (until log 1 shows to be INACTIVE) alter database drop logfile group 1; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.RDO alter database add logfile group 1 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.rdo' size 4M; alter system switch logfile; (until log 2 shows to be INACTIVE) select * from v$log; alter database drop logfile group 2; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.RDO alter database add logfile group 2 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.rdo' size 4M; alter system switch logfile; (until log 3 shows to be INACTIVE) select * from v$log; alter database drop logfile group 3; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.RDO alter database add logfile group 3 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.rdo' size 4M; alter system switch logfile; select * from v$log; exit SID5 changes: Logfiles should be at least 4MB (currently 500K): sqlplus "/ as sysdba" select * from v$log; alter system switch logfile; (until log 1 shows to be INACTIVE) alter database drop logfile group 1; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.RDO alter database add logfile group 1 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.rdo' size 4M; alter system switch logfile; (until log 2 shows to be INACTIVE) select * from v$log; alter database drop logfile group 2; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.RDO alter database add logfile group 2 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.rdo' size 4M; alter system switch logfile; (until log 3 shows to be INACTIVE) select * from v$log; alter database drop logfile group 3; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.RDO alter database add logfile group 3 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.rdo' size 4M; alter system switch logfile; select * from v$log; exit TEMP tablespace: Recreate this, since utlu102i.sql thinks the space is bad: sqlplus "/ as sysdba" drop tablespace temp; !rm /data/oradata/${ORACLE_SID}/temp_${ORACLE_SID}_01.dbf create temporary tablespace temp tempfile '/data/oradata/SID5/temp_SID5_01.dbf' SIZE 400064K extent management local uniform size 640K; exit SEED changes: Logfiles should be at least 4MB (currently 500K) sqlplus "/ as sysdba" select * from v$log; alter system switch logfile; (until log 1 shows to be INACTIVE) alter database drop logfile group 1; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.rdo alter database add logfile group 1 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.rdo' size 4M; alter system switch logfile; (until log 2 shows to be INACTIVE) select * from v$log; alter database drop logfile group 2; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.rdo alter database add logfile group 2 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.rdo' size 4M; alter system switch logfile; (until log 3 shows to be INACTIVE) select * from v$log; alter database drop logfile group 3; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.rdo alter database add logfile group 3 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.rdo' size 4M; alter system switch logfile; select * from v$log; exit SYSTEM tablespace: add 21MB and/or enable AUTOEXTEND sqlplus "/ as sysdba" alter tablespace system add datafile '/data/oradata/${ORACLE_SID}/sys_${ORACLE_SID}_04.dbf' SIZE 100064K; exit Rollback: Recreate with rollback segments at least 70MB: sqlplus "/ as sysdba" alter rollback segment sysrol online; alter rollback segment rbs1 offline; alter rollback segment rbs2 offline; alter rollback segment rbs3 offline; drop rollback segment rbs1; drop rollback segment rbs2; drop rollback segment rbs3; create public rollback segment rbs1 tablespace rbs storage (initial 4M next 4M minextents 20 maxextents 30); create public rollback segment rbs2 tablespace rbs storage (initial 4M next 4M minextents 20 maxextents 30); create public rollback segment rbs3 tablespace rbs storage (initial 4M next 4M minextents 20 maxextents 30); alter rollback segment rbs1 online; alter rollback segment rbs2 online; alter rollback segment rbs3 online; alter rollback segment sysrol offline; select * from dba_rollback_segs; exit init.ora: shared_pool_size needs to be at least 187MB (this was actually done after Step 21 / Step 26 below): cd /pgms/oracle/product/v9206/dbs Change this in the following init.ora files from 150M to 200M: initSEED.ora_pre_10gR2 initSEED.ora_10gR2 cp -p initSEED.ora_pre_10gR2 initSEED.ora cp -p initSEED.ora_10gR2 initSEED.ora /pgms/oracle/product/v10203/dbs SID8 changes: Logfiles should be at least 4MB (currently 500K): sqlplus "/ as sysdba" select * from v$log; alter system switch logfile; (until log 1 shows to be INACTIVE) alter database drop logfile group 1; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.RDO alter database add logfile group 1 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_1A.rdo' size 4M; alter system switch logfile; (until log 2 shows to be INACTIVE) select * from v$log; alter database drop logfile group 2; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.RDO alter database add logfile group 2 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_2A.rdo' size 4M; alter system switch logfile; (until log 3 shows to be INACTIVE) select * from v$log; alter database drop logfile group 3; !rm /orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.RDO alter database add logfile group 3 '/orcl/oradata/${ORACLE_SID}/log_${ORACLE_SID}_3A.rdo' size 4M; select * from v$log; exit Rollback: Recreate with rollback segments at least 70MB: sqlplus "/ as sysdba" alter rollback segment sysrol online; alter rollback segment rbs1 offline; drop rollback segment rbs1; create public rollback segment rbs1 tablespace rbs storage (initial 4M next 4M minextents 20 maxextents 30); create public rollback segment rbs2 tablespace rbs storage (initial 4M next 4M minextents 20 maxextents 30); create public rollback segment rbs3 tablespace rbs storage (initial 4M next 4M minextents 20 maxextents 30); alter rollback segment rbs1 online; alter rollback segment rbs2 online; alter rollback segment rbs3 online; alter rollback segment sysrol offline; select * from dba_rollback_segs; exit Step 21: Create init.ora files for pre_10gR2 (current version; init*.ora_pre_10gR2) and for 10gR2 (with parameter changes; init*.ora_10gR2); and Step 26: Copy init.ora files to the 10gR2 $ORACLE_HOME/dbs directory: login oracle cd /pgms/oracle/product/v9206/dbs sed -n 's/^\([A-Z]*\):.*/ls *\1.ora/p' /etc/oratab | sh | sort -u | sed 's/.*/cp -p & &_pre_10gR2; sed \/hash_join_enabled\/d & | sed \/log_archive_start\/d | sed \/optimizer_mode\/d | sed \/mts\/d | sed "s\/%S\/%T_%R_%S\/" | sed "s\/920.\/10203\/" | sed \/\\\#.db_file_multiblock_read_count\/d | sed "s\/db_file_multiblock_read_count = 16\/\\\# db_file_multiblock_read_count = 16 \\\# Removed for 10gR2 for automatically tuned multi-block reads\/" >&_10gR2/' | sh cat <10gR2_additions.txt # # 10gR2 additions: # _b_tree_bitmap_plans = FALSE # FAQ 1-95O8T, 1-2AIRKT: Oracle Bug 5401876(?) (Bug 6112730 Note 456361.1) reported with 10.2.0.2. WRONG RESULTS WHEN OPTIMIZER USES BITMAP CONVERSION _complex_view_merging = FALSE # ALREADY THERE - FAQ 1-95O8T: ref: FAQ 1-MR8NU supposedly fixed in 10.2.0.3, but still reported as causing errors in Fin _optimizer_connect_by_cost_based = FALSE # Various bugs including wrong results from CONNECT BY query _optimizer_cost_based_transformation = OFF # FAQ 1-1D4M5Q Required to fix Oracle Bug 5434708 - fixed in 11.1.0.1. _optimizer_order_by_elimination_enabled = FALSE # FAQ 1-VDJ4I Note: 373806.1 Hierarchical Query Dumps in evaopn2 # _smu_debug_mode = 33554432 # No longer needed with patch 5442919 installed _unnest_subquery = FALSE # Note: 464562.1 - Query Execution Reports ORA-600 [15160]. Others in Note: 94078.1. event = '10139 TRACE NAME CONTEXT FOREVER' # FAQ 1-95O8T, REF: FAQ 1-2XKPMV - Bug 4567767 - fixed in 10.2.0.4; Execution Plan changes upon rowcache reload # OLTP optimizer values (versus batch) for systems like Banner: optimizer_dynamic_sampling = 2 optimizer_index_caching = 90 optimizer_index_cost_adj = 30 # give a lower cost to index scans over full-table scans (default is 100) optimizer_mode = FIRST_ROWS_10 statistics_level = TYPICAL # turn on monitoring of table modifications (for dba_tab_modifications) EOF ls *ora_10gR2 | sed 's/\(.*\)_10gR2/cat 10gR2_additions.txt >>\1_10gR2; cp -p \1_10gR2 \/pgms\/oracle\/product\/v10203\/dbs\/\1/' | sh Edit configSEED.ora_10gR2 to remove 10gR2_additions.txt cp -p configSEED.ora_10gR2 /pgms/oracle/product/v10203/dbs/configSEED.ora In the init*.ora_10gR2 and config*.ora_10gR2 files: Remove the following: log_archive_start (archivelogmode determines this now) hash_join_enabled = true # prevents some cost based analysis (obsolete) optimizer_mode = rule (add above with other optimizer parameters) mts* parameters (obsolete) Remove the following - see: Automatically tuned multi-block reads in 10g http://www.dba-oracle.com/t_automatically_tuned_multiblock_reads.htm db_file_multiblock_read_count = 16 Change the following - starting with Oracle 10g, archived log file names must contain each of the elements %s (sequence), %t (thread), and %r (resetlogs id) to ensure that all archived log file names are unique: log_archive_format = arch_PROD_%T_%R_%S.arc LATER: Set compatible to 10gR2 ONLY AFTER testing is completed (can't revert to 9i): LATER: compatible = 10.2.0 Notes on init.ora changes (besides the comments in the 10gR2 changes above): From http://www.colestock.com/blogs/2007/11/custom-statistics-gathering-package-for.html, which also contains another statistics gathering routine: For 10g, STATISTICS_LEVEL is set to a level above basic (such as TYPICAL; in init.ora), so that DBA_TAB_MODIFICATIONS is populated (i.e. tables are monitored). For 9i, the tables have their MONITORING attribute set, so that DBA_TAB_MODIFICATIONS view is populated when they are modified. See BORACLE e-mails from: "Midgett, Dave" on 4/1/2008 8:32 AM "Harden, Scott" on 9/12/2006 10:22 PM "Brandon Cole" on 1/30/08 5:56 PM Also see: FAQ 1-95O8T with Example Init.ora For Oracle RDBMS 10.2.0 Oracle optimizer_index_cost_adj and SQL Performance http://www.dba-oracle.com/oracle_tips_cost_adj.htm NOTE: Explicit parameter settings were removed from the 10gR2 additions if they were the default values, anyway. MADE A BACKUP OF THE DATABASES before the stats collection for the 10gR2 upgrade. Step 7: Collect statistics and export them prior to the 10gR2 database upgrade (NOTE: This takes a long time to run, and can be done during off-hours in the days before the actual 10gR2 conversions are done): For each database, run a modified version of Scott Harden's runStats.ksh to collect the statistics on all of the tables (see Summit 2008 session 133: Banner Performance on Oracle 10g; http://www.cmcgc.com/media/handouts/280413/0133.pdf): SID3: login oracle SID3 (startup the database if not already started) nohup runStats.ksh all SID3 & About a dozen of the scripts died for lack of resources (ORA-12540: TNS:internal limit restriction exceeded). Ran them separately. The "ls" command listed the logs with the errors (length 411 bytes); ran the associated .ksh scripts in scr: ls -ltr /home/oracle/runStats.SID3/log | grep 411 /home/oracle/runStats.SID3/scr/runStats_table_XDB.ksh /home/oracle/runStats.SID3/scr/runStats_table_Y2K.ksh /home/oracle/runStats.SID3/scr/runStats_table_TAISMGR.ksh /home/oracle/runStats.SID3/scr/runStats_table_SATURN.ksh /home/oracle/runStats.SID3/scr/runStats_table_POSNCTL.ksh /home/oracle/runStats.SID3/scr/runStats_table_SOMEID.ksh /home/oracle/runStats.SID3/scr/runStats_table_OTHERID.ksh /home/oracle/runStats.SID3/scr/runStats_table_WTAILOR.ksh /home/oracle/runStats.SID3/scr/runStats_table_LCBMGR.ksh /home/oracle/runStats.SID3/scr/runStats_table_ICMGR.ksh /home/oracle/runStats.SID3/scr/runStats_table_BWPMGR.ksh TEST: login oracle TEST nohup runStats.ksh all TEST & Reran the following after failed for lack of resources: ls -ltr /home/oracle/runStats.TEST/log | grep 411 /home/oracle/runStats.TEST/scr/runStats_table_XDB.ksh /home/oracle/runStats.TEST/scr/runStats_table_WTAILOR.ksh /home/oracle/runStats.TEST/scr/runStats_table_NLSUSER.ksh /home/oracle/runStats.TEST/scr/runStats_table_BWGMGR.ksh /home/oracle/runStats.TEST/scr/runStats_table_BWFMGR.ksh /home/oracle/runStats.TEST/scr/runStats_table_SOMEID.ksh /home/oracle/runStats.TEST/scr/runStats_table_MYID.ksh /home/oracle/runStats.TEST/scr/runStats_table_POSNCTL.ksh PROD: login oracle PROD nohup runStats.ksh all PROD & Reran the following after failed for lack of resources: ls -ltr /home/oracle/runStats.PROD/log | grep 411 /home/oracle/runStats.PROD/scr/runStats_table_NLSUSER.ksh /home/oracle/runStats.PROD/scr/runStats_table_MYID.ksh /home/oracle/runStats.PROD/scr/runStats_table_GENERAL.ksh /home/oracle/runStats.PROD/scr/runStats_table_SATURN.ksh SEED: login oracle SEED nohup runStats.ksh all SEED & Reran the following after failed for lack of resources: ls -ltr /home/oracle/runStats.SEED/log | grep 411 /home/oracle/runStats.SEED/scr/runStats_table_LCBMGR.ksh /home/oracle/runStats.SEED/scr/runStats_table_OUTLN.ksh SID4: login oracle SID4 nohup runStats.ksh all SID4 & Reran the following after failed for lack of resources: ls -ltr /home/oracle/runStats.SID4/log | grep 411 /home/oracle/runStats.SID4/scr/runStats_table_XDB.ksh /home/oracle/runStats.SID4/scr/runStats_table_ICMGR.ksh /home/oracle/runStats.SID4/scr/runStats_table_BWGMGR.ksh /home/oracle/runStats.SID4/scr/runStats_table_WTAILOR.ksh SID5: login oracle SID5 nohup runStats.ksh all SID5 & SID6: login oracle SID6 nohup runStats.ksh all SID6 & SID8: login oracle SID8 nohup runStats.ksh all SID8 & Turn on monitoring for all non-system tables so that the statistics gathering routine (runStats.ksh or other) will only gather statistics on modified tables (monitoring populates the dba_tab_modifications table as changes are made) (SEED, SID3, SID4, SID5, SID6, SID8, TEST, PROD): sqlplus "/ as sysdba" select owner,monitoring,count(*) from dba_tables group by owner,monitoring; set pagesize 0 feedback off spool monitoring.sql select distinct 'exec dbms_stats.alter_schema_tab_monitoring(''' || a.owner || ''',TRUE);' from dba_tables a where a.owner not in ('SYS','SYSTEM'); spool off set pagesize 1000 feedback on @monitoring.sql select owner,monitoring,count(*) from dba_tables group by owner,monitoring; exit Got the following error on PROD: "ORA-00054: resource busy and acquire with NOWAIT specified". Had to shut down and restart PROD to do the following: exec dbms_stats.alter_schema_tab_monitoring('GENERAL',TRUE); Export the stats by creating a stats table (t_stats_temp), creating the SQL to populate it and to restore from it, running the populate script, and then exporting the stats table (SID3, SEED, SID4, SID5, SID6, SID8, TEST, PROD): login oracle sqlplus "/ as sysdba" select * from dba_users where username = 'COMMON'; If user COMMON doesn't exist (or, you can put the t_stats_temp table in some other schema of your own): create tablespace users datafile '/data/oradata/${ORACLE_SID}/usr_${ORACLE_SID}_01.dbf' size 35264K extent management local uniform size 16K; create user common identified by common default tablespace users temporary tablespace temp quota unlimited on users; exec dbms_stats.create_stat_table('common','t_stats_temp'); set heading off feedback off pagesize 0 recsep off linesize 160 spool /home/oracle/runStats.${ORACLE_SID}/exp_STATS.${ORACLE_SID}.sql select distinct 'exec dbms_stats.export_schema_stats(''' || owner || ''',statown=>''common'',stattab=>''t_stats_temp'');' from dba_tables; spool off spool /home/oracle/runStats.${ORACLE_SID}/imp_STATS.${ORACLE_SID}.sql select distinct 'exec dbms_stats.import_schema_stats(''' || owner || ''',statown=>''common'',stattab=>''t_stats_temp'');' from dba_tables; spool off set heading on feedback on pagesize 1000 recsep wrap linesize 80 @/home/oracle/runStats.${ORACLE_SID}/exp_STATS.${ORACLE_SID}.sql select count(*) from common.t_stats_temp; !exp system/ file=/pgms/oradata/exp_STATS.${ORACLE_SID}.dmp log=/home/oracle/runStats.${ORACLE_SID}/exp_STATS.${ORACLE_SID}.log tables=common.t_stats_temp direct=y !ls -ltr /pgms/oradata | tail exit If you run out of SYSTEM tablespace room during the database conversion (shown below), like our SID3 database did, despite adding the requested amount in Step 2 above, you will need to restore the database from the Step 20 backup (below), add another SYSTEM datafile, shut down the database, and start the conversion again at Step 27 (below): Added even more space to system tablespace for other databases so that they don't run into the same issue that SID3 had: SEED, SID4, TEST, PROD: alter tablespace system add datafile '/data/oradata/${ORACLE_SID}/sys_${ORACLE_SID}_05.dbf' SIZE 100064K; SID5, SID6, SID8: alter tablespace system add datafile '/data/oradata/${ORACLE_SID}/sys_${ORACLE_SID}_02.dbf' SIZE 100064K; You may need to add the following to dbstart and dbshut (in /home/oracle) during the 10gR2 conversions to keep from getting "ORA-12701: CREATE DATABASE character set is not known" on startup (it was looking at 9i NLS instead of 10g NLS on TEST startup): export ORA_NLS10=$ORACLE_HOME/nls/data TO CONVERT EACH DATABASE TO 10gR2 (note the SID3 system space issue above) (SID3, SEED, SID8, SID4, SID5, SID6, TEST, PROD): Shut down Luminis for SID4, SID5, and SID6 upgrades (these three are databases used by Luminis and for our Luminis testing). Login to user oracle and set the SID to convert: login oracle Step 14: Disable all batch and cron jobs. Step 20: Make a backup of the original 9.2.0.6 database. For SID8 (a read-only database), put the tablespaces in read-write mode: sqlplus "/ as sysdba" alter tablespace large_tables read write; alter tablespace large_indexes read write; Step 19: Shut down the database: sqlplus "/ as sysdba" shutdown immediate exit Step 27: Update the /etc/oratab file to change the SID's Oracle Home directory from 9206 to 10203: vi /etc/oratab ://s/9206/10203/ :wq Step 28 and 29: Set the Oracle Home and Path environment variables for 10gR2: login oracle (DO NOT USE ". oraenv" here!) which also does the following: export PATH=`echo $PATH | sed "s;:$ORACLE_HOME/bin;:/pgms/oracle/product/v10203/bin;"` export ORACLE_HOME=/pgms/oracle/product/v10203 export LD_LIBRARY_PATH=${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib:${COBDIR}/coblib export LIBPATH=${ORACLE_HOME}/lib:/usr/lib:${COBDIR}/lib export ORA_NLS10=$ORACLE_HOME/nls/data env | egrep '(ORACLE_HOME|^PATH|ORA_NLS10|ORACLE_BASE|LD_LIBRARY_PATH|ORACLE_PATH|LIBPATH)' Step 30: Run the upgrade on the database: cd $ORACLE_HOME/rdbms/admin sqlplus "/ as sysdba" startup upgrade Step 31: Create SYSAUX tablespace: create tablespace sysaux datafile '/data/oradata/${ORACLE_SID}/aux_${ORACLE_SID}_01.dbf' size 100M autoextend on next 50M maxsize unlimited extent management local segment space management auto online; Step 32: Run the catupgrd scripts, and ... Step 33: Run the post-upgrade status tool (done at the end of catupgrd.sql): spool /pgms/oradata/upgrade.$ORACLE_SID.log @catupgrd.sql spool off Step 34: Restart the database: shutdown immediate startup Replace ALL_SYNONYM Oracle 10g view with Oracle 9i version. The 10g version allows it to report on synonyms on synonyms, which Banner doesn't use: CREATE VIEW sys.ALL_SYNONYMS_9i (OWNER, SYNONYM_NAME, TABLE_OWNER, TABLE_NAME, DB_LINK) AS select u.name, o.name, s.owner, s.name, s.node from sys.user$ u, sys.syn$ s, sys.obj$ o where o.obj# = s.obj# and o.type# = 5 and o.owner# = u.user# and ( o.owner# in (USERENV('SCHEMAID'), 1 /* PUBLIC */) /* user's private, any public */ or /* user has any privs on base object */ exists (select null from sys.objauth$ ba, sys.obj$ bo, sys.user$ bu where bu.name = s.owner and bo.name = s.name and bu.user# = bo.owner# and ba.obj# = bo.obj# and ( ba.grantee# in (select kzsrorol from x$kzsro) or ba.grantor# = USERENV('SCHEMAID') ) ) or /* user has system privileges */ exists (select null from v$enabledprivs where priv_number in (-45 /* LOCK ANY TABLE */, -47 /* SELECT ANY TABLE */, -48 /* INSERT ANY TABLE */, -49 /* UPDATE ANY TABLE */, -50 /* DELETE ANY TABLE */) ) ) / drop public synonym all_synonyms; create public synonym all_synonyms for sys.all_synonyms_9i; grant select on sys.all_synonyms_9i to public with grant option; Step 36: Recompile remaining invalid objects: select substr(owner,1,15) owner, substr(object_name,1,30) object, substr(object_type,1,15) type, status from dba_objects where status <> 'VALID' order by owner,object; @utlrp.sql spool /tmp/invalid_post.$ORACLE_SID.lst select substr(owner,1,15) owner, substr(object_name,1,30) object, substr(object_type,1,15) type, status from dba_objects where status <> 'VALID' order by owner,object; spool off !diff /tmp/invalid_pre.$ORACLE_SID.lst /tmp/invalid_post.$ORACLE_SID.lst Step 37: Restart the database: shutdown immediate startup NOTE: ORA-600 [LibraryCacheNotEmptyOnClose] can occur during shutdown and can be ignored (Bug 4483084 - no patch for this; possibly will be fixed in 10.2.0.5) Step 41: Create a server parameter file (but first see the Data Guard changes for PROD below, if applicable; we will be using spfiles from now on instead of init.ora files): create spfile from pfile; shutdown immediate startup exit cd $ORACLE_HOME/dbs mv init${ORACLE_SID}.ora init${ORACLE_SID}.ora.orig Step 42: Modify the listener.ora file to point this SID to the new ORACLE_HOME: vi $ORACLE_HOME/network/admin/listener.ora ://+1s/9206/10203/ :wq Either: Step 43: Reload the 10g listener on second and subsequent 10gR2 database upgrades: lsnrctl reload Or: Step 43: Restart the listener using the 10gR2 version on the first upgrade, which is SID3 in our case (stop it from a 9.2.0.6 database, start it from a 10.2.0.3 database): login oracle PROD lsnrctl stop login oracle SID3 lsnrctl start Step 44: Re-enable all batch and cron jobs. Remove the Oracle stats job from dbms_scheduler: login oracle sqlplus "/ as sysdba" EXECUTE DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB'); Step 47: Reload stats created from the 9i version into the 10g version: truncate table common.t_stats_temp; !imp system/ file=/pgms/oradata/exp_STATS.${ORACLE_SID}.dmp log=/home/oracle/runStats.${ORACLE_SID}/imp_STATS.${ORACLE_SID}.log full=y ignore=y @/home/oracle/runStats.${ORACLE_SID}/imp_STATS.${ORACLE_SID}.sql exit For SID8, put the tablespaces back in read-only mode: sqlplus "/ as sysdba" alter tablespace large_tables read only; alter tablespace large_indexes read only; Make a backup of the converted 10.2.0.3 database. Remove the following from dbstart and dbshut (in /home/oracle) after all of the 10gR2 upgrades (if you had added it before): export ORA_NLS10=$ORACLE_HOME/nls/data Change the bin soft link in the oracle product directory to point to v10203 instead of v9206 (this is for our site, and probably not applicable to your site): login root cd /pgms/oracle/product rm bin ln -s /pgms/oracle/product/v10203/bin bin PROD (applicable to sites running Data Guard): Fixed Data Guard init.ora settings for 10gR2 before creating the spfile.ora file (will be using spfiles from now on instead of init.ora files). Will also need to make similar changes for the standby site parameter file. (DGserver is the Data Guard server at the standby site.) # Data Guard settings: db_unique_name = 'PROD_primary' log_archive_config = 'DG_CONFIG=(PROD_primary,PROD_standby)' # instance_name = PROD log_archive_dest_1 = 'LOCATION=/orcl/oradata/PROD/archivelogs MANDATORY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=PROD_primary' log_archive_dest_state_1 = ENABLE log_archive_dest_2 = 'SERVICE=DGserver_prod LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PROD_standby' log_archive_dest_state_2 = DEFER standby_archive_dest = /orcl/oradata/PROD/archivelogs # for switchover standby_file_management = AUTO # for switchover; or MANUAL for raw devices # remote_archive_enable = TRUE # TRUE or SEND, change SEND to RECEIVE on switchover # lock_name_space = PROD # use when primary and standby on same system; same as instance_name fal_server = DGserver_prod # for switchover fal_client = AIXserver_prod # for switchover db_file_name_convert = ('/UAEX/data/','/data/','/UAEX/ndxs/','/ndxs/') # for switchover log_file_name_convert = ('/UAEX/orcl/','/orcl/') # for switchover Build the C and COBOL makefiles (See: Note:238596.1, Banner General Technical Reference Manual 7.3 (Creating a Pro*COBOL Makefile, Creating a Pro*C Makefile)): login banner TEST (then PROD) cd $BANNER_LINKS rm buildmk rm buildcob cp -p sctproc.mk sctproc.mk.pre_10gR2 cp -p sctprocb.mk sctprocb.mk.pre_10gR2 cc $BANNER_HOME/install/buildmk.c -o buildmk cc $BANNER_HOME/install/buildcob.c -o buildcob buildmk (64-bit) (note: environment variables, such as $BANNER_LINKS, can't be used in the parameters) cc /pgms/sct/ban7/install/banc8.tpl /pgms/oracle/product/v10203/precomp/demo/proc/demo_proc.mk /pgms/sct/ban7/links/sctproc.mk diff sctproc.mk sctproc.mk.pre_10gR2 Made the following changes in sctproc.mk (result was the same as the previous sctproc.mk.pre_10gR2): 29c29 < ENV=-DOPSYS_UNIX -DPLAT_UNKNOWN --- > ENV=-DOPSYS_UNIX -DPLAT_RS6000 98c98,100 < CFLAGS=-I. -I$(GINC) -I$(GENC) -O $(ANSI) $(STRIP) $(CCHECK) $(ENV) --- > OPT=-O -qmaxmem=8192 > LFLAGS=-q64 > CFLAGS=$(LFLAGS) -I. -I$(GINC) -I$(ORACLE_HOME)/precomp/public -I$(GENC) $(OPT) $(ANSI) $(STRIP) $(CCHECK) $(ENV) -q SPILL=32000 176c178 < - mv $* $(GEXE)/$* --- > - mv -f $* $(GEXE)/$* buildcob (64-bit) (note: environment variables, such as $BANNER_LINKS, can't be used in the parameters) cob /pgms/sct/ban7/install/bancob8.tpl /pgms/oracle/product/v10203/precomp/demo/procob2/demo_procob.mk /pgms/sct/ban7/links/sctprocb.mk diff sctprocb.mk sctprocb.mk.pre_10gR2 Made the following changes in sctprocb.mk: < DBMS= dbms=v8 --- > DBMS= dbms=v8 picx=varchar2 69c70 < PROCOB=$(ORACLE_HOME)/bin/procob18 --- > PROCOB=$(ORACLE_HOME)/bin/procob 196c110 < rm $*.o $*.lst $*.int $*.cob --- > rm $*.o $*.lst $*.int $*.cob $*.idy 205c119 < rm $*.lst $*.int $*.cob --- > rm $*.lst $*.int $*.cob $*.idy 214c128 < rm $*.lst $*.int $*.cob --- > rm $*.lst $*.int $*.cob $*.idy < LLIBS=$(COBSQLINTF) $(LLIBSQL) $(TTLIBS) --- > LLIBS=$(ORACLE_HOME)/precomp/lib/cobsqlintf.o -lclntsh \ > `cat $(ORACLE_HOME)/lib/ldflags` -lld -lm \ > `cat $(ORACLE_HOME)/lib/sysliblist` -lm -lc_r -lpthreads Recompile all C and COBOL programs after 10gR2 upgrade (see below if you get an error on standards.h during the Pro*C compiles on AIX 5.3): login banner TEST (then PROD) cd $BANNER_LINKS If you are using the runsqlplus program on my web site, compile runsqlplus: make -f sctproc.mk runsqlplus Change all the baninst1 passwords in the *cmpl*.shl scripts to their appropriate value for the database you are compiling against, if needed, such as (changing from u_pick_it to abcd1234 here): grep -l baninst1 *cmpl*.shl | sed "s~.*~sed 's/baninst1\\\/u_pick_it/baninst1\\\/abcd1234/' & >&.new; echo; echo; echo &:; diff & &.new; mv & &.pre_xlc; mv &.new &; chmod 755 &~" | sh Do the Banner compiles (we have an allcmpl.shl script which contains all of the Banner compile scripts to run): nohup allcmpl.shl >allcmpl.$ORACLE_SID.log 2>&1 & Do your local compiles (we have cescmpl.shl and cescmpl2.shl scripts which contain all of our local compiles to be done): nohup cescmpl.shl >cescmpl.$ORACLE_SID.log 2>&1 & nohup cescmpl2.shl >cescmpl2.$ORACLE_SID.log 2>&1 & Compile E-Visions print software: eviadm, evippgrm, evilp: login banner TEST (then PROD) cd $BANNER_HOME/evisions make -f $BANNER_LINKS/sctproc.mk eviadm CHECKOPT=sqlcheck=limited $EXE_HOME/eviadm B - COMPILE FORMFUSION SERVER SOFTWARE Enter the password for EVISIONS Version to compile and install: 1.6.5.326 (latest; just press Enter key) A. Compile/Execute all 5.) Standard ANSI C Compiler X - EXIT INSTALL MENU If you are using the daemon program on my web site, compile daemon and start it up ("myid" owns daemon here, but it is run from user ID oracle): login myid PROD cd /home/common rm daemon make -f $BANNER_HOME/general/c/sctproc.mk CHECKOPT="sqlcheck=semantics userid=common/" daemon mv $BANNER_HOME/general/exe/daemon . login oracle PROD daemon_start.shl Generate all Banner forms on the Forms server, which, in our case, is the Oracle Application Server. We have a setpathd.bat file that sets our Windows environment variables (such as LOCAL, FORMS90, FORMS90_PATH, ORACLE_HOME, ORACLE_HOME_NAME), an allform.bat file that contains calls to all of the Banner forms generation batch files (such as genform.bat, genform1.bat, genform2.bat, posform.bat, payform.bat, finform.bat comform.bat, tasform.bat), and a cesform.bat file that contains the ifcmp90.exe commands to compile our local Banner forms. NOTE: This is BEFORE our Oracle Forms upgrade to 10gR2, so, we aren't using the *r2.bat files to compile the forms. On the Application Server box: d: cd d:\ban7\fmb setpathd.bat allform.bat cesform.bat move /Y *.fmx ..\winfmx move /Y *.mmx ..\winfmx move /Y *.plx ..\winfmx Some users got the following when trying to run 10gR2 sqlplus: Error 6 initializing SQL*Plus Message file sp1.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory This is Oracle Bug 4516865: Wrong permissions after install of 10gR2 (also see Note: 438676.1 and Note:443638.1) Fix is: Apply 10.2.0.2 or higher and run changePerm.sh cd $ORACLE_HOME/install changePerm.sh Ran for several minutes. Got one error: chmod: rdbms/admin/externaljob.ora: Operation not permitted. AFTER 10gR2 testing is completed, you can set compatible to 10.2.0 in the spfile. Note that you can't revert the database to 9i after this change is made: sqlplus "/ as sysdba" alter system set compatible='10.2.0' scope=spfile; shutdown immediate startup exit On AIX 5.3, if you get an error message from the Pro*C compiler like the following: Syntax error at line 135, column 2, file /usr/include/standards.h: Error at line 135, column 2 in file /usr/include/standards.h #warning The -qdfp option is required to process DFP code in headers. PCC-S-02014, Encountered the symbol "warning" when expecting one of the following: a numeric constant, newline, define, elif, else, endif, error, if, ifdef, ifndef, include, line, pragma, undef, an immediate preprocessor command, a C token, The symbol "newline," was substituted for "warning" to continue. This is SCT FAQ #1-2P6ZLN - "Compiling Banner Pro*C on AIX and getting error in standards.h - PCC-S-02014, Encountered the symbol "warning" related to -qdfp" and Metalink Note 451413.1 "Pro*C Build Fails With Error PCC-02014 on File /usr/include/standards.h" Work around: login root cd /usr/include cp -p standards.h standards.h.orig chmod 744 standards.h vi standards.h Remove the following two lines: #warning The -qdfp option is required to process DFP code in headers. #else :wq chmod 444 standards.h