Last updated: Jan 22, 2009 4:19 PM
By Ram Perumal
Contents
PrerequisitesRed Hat PackagesInstall below or higher versions of Red Hat RPM packages.
Oracle SoftwareBelow files can be downloaded from http://technet.oracle.com/
Oracle PatchesBelow files can be downloaded from http://metalink.oracle.com/
Validation and CertificationFor Validation and/or Certification, Checkout Oracle Validation Certification Matrix Installing Required RPMsQuery Installed Packages
Sample output as below;
If any of the above packages show as " not installed". Use yum or up2date to install, it will resolve dependencies automatically. yum install packagename or up2date packagename Create ORACLE Software owner OS UserCreate USER and GROUPS[root@dblx131 ~]# groupadd dba [root@dblx131 ~]# groupadd oinstall
[root@dblx131 ~]# useradd -c "Oracle software owner" -g oinstall -G
dba oracle
[root@dblx131 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@dblx131 ~]#
Create Oracle Software Directory
Setup Kernel Parameters, File Handlers, and LimitsMemory Kernel ParametersExecute the below command to find out
Memory Kernel parameter values;
File HandlersExecute the below command to find out Maximum File Handlers;
TIP: Do not change the value of any kernel parameter on a system where it is already higher than the minimum requirement. Add below lines to /etc/sysctl.conf
Network Kernel ParametersRun command below to check local port range;
Add below lines to /etc/sysctl.conf
To make all the changes made in 4.1, 4.2
and 4.3, issue sysctl
-p;
Shell Limits / Open File Descriptors for OracleLogin as root, and add below lines to /etc/security/limits.conf
Add soft and hard limit to
~oracle/.bash_profile
Setup Temporary Swap SpaceCreate Swap SpaceCheck available memory and swap space
Here is the command to create temporary swap space.
Remove Swap SpaceIssue the below command to disable and remove swap space [root@dblx131 ~]# swapoff tmpswap Setup Oracle Environment VariablesAdd below lines to ~oracle/.bash_profile export
ORACLE_BASE=/u01/app Change Redhat Release
File
Installer Output: "Checking
operating system version: must be redhat-3, SuSE-9, redhat-4,
UnitedLinux-1.0, asianux-1 or asianux-2"
10201 OUI will not install Oracle on
RHEL version 5; below, steps will make the OUI think that you are
installing Oracle on RHEL 3
Revert Redhat Release File after Oralce InstallThis should be done as a final task
TIP: Oracle Installer uses only BASE and SID variables, do not
set any other variables while installing oracle.
Unpack Oracle Software ArchivesIssue below command to unzip Oracle 10g Software Archive; [oracle@dblx131 ~]$ unzip 10201_database_linux32.zip Verify X-WindowsMake sure the clock (xclock) appears before you kick off oracle installer ; Open a terminal and issue the below command [oracle@dblx131 ~]$ xclock If you don’t see a graphical clock on the console then, Issue the below command in terminal [oracle@dblx131 ~]$ echo "DISPLAY=localhost:0.0;export DISPLAY"
If you don't see a graphical clock after setting the DISPLAY environment variable, please consult Red Hat User Manuals to configure XWindows Starting Oracle Universal InstallerRun below command to start the oracle installer, only when you succeeded step 8. [oracle@dblx131 ~]$ cd database/ I changed the path db_1 to
pdb10 and global database name to pdb10, see the screenshot below
Checking operating system
requirements ...
Expected result: One of redhat-3,redhat-4,SuSE-9,asianux-1,asianux-2 Actual Result: redhat-3 Check complete. The overall result of this check is: Passed ======================================================================= Checking operating system
package requirements ...
Checking for make-3.79; found make-1:3.81-3.el5. Passed Checking for binutils-2.14; found binutils-2.17.50.0.6-6.el5. Passed Checking for gcc-3.2; found gcc-4.1.2-42.el5. Passed Checking for libaio-0.3.96; found libaio-0.3.106-3.2. Passed Check complete. The overall result of this check is: Passed ======================================================================= Checking kernel
parameters
Checking for semmsl=250; found semmsl=250. Passed Checking for semmns=32000; found semmns=32000. Passed Checking for semopm=100; found semopm=100. Passed Checking for semmni=128; found semmni=128. Passed Checking for shmmax=536870912; found shmmax=4294967295. Passed Checking for shmmni=4096; found shmmni=4096. Passed Checking for shmall=2097152; found shmall=268435456. Passed Checking for file-max=65536; found file-max=65536. Passed Checking for VERSION=2.4.21; found VERSION=2.6.18-92.1.22.el5. Passed Checking for ip_local_port_range=1024 - 65000; found ip_local_port_range=1024 - 65000. Passed Checking for rmem_default=262144; found rmem_default=262144. Passed Checking for rmem_max=262144; found rmem_max=262144. Passed Checking for wmem_default=262144; found wmem_default=262144. Passed Checking for wmem_max=262144; found wmem_max=262144. Passed Check complete. The overall result of this check is: Passed ======================================================================= Checking Recommended glibc
version
Expected result: ATLEAST=2.3.2-95.27 Actual Result: 2.5-24.el5_2.2 Check complete. The overall result of this check is: Passed ======================================================================= Checking
physical memory requirements ...
Expected result: 922MB Actual Result: 376MB Check complete. The overall result of this check is: Failed <<<< Problem: The system does not have sufficient physical memory to perform the install. Recommendation: Increase the amount of physical memory available to your system before continuing with the installation. ======================================================================= Checking available swap
space requirements ...
Expected result: 752MB Actual Result: 1646MB Check complete. The overall result of this check is: Passed ======================================================================= Checking
Network Configuration requirements ...
Check complete. The overall result of this check is: Not executed <<<< Recommendation: Oracle supports installations on systems with DHCP-assigned public IP addresses. However, the primary network interface on the system should be configured with a static IP address in order for the Oracle Software to function properly. See the Installation Guide for more details on installing the software on systems configured with DHCP. ======================================================================= Validating ORACLE_BASE
location (if set) ...
Check complete. The overall result of this check is: Passed ======================================================================= Checking Oracle Home path
for spaces...
Check complete. The overall result of this check is: Passed ======================================================================= Checking for proper system
clean-up....
Check complete. The overall result of this check is: Passed ======================================================================= Checking for Oracle Home
incompatibilities .... Actual Result: NEW_HOME Check complete. The overall result of this check is: Passed ======================================================================= Fixes for prerequisite checksPhysical memory requirements: Though the minimum requirement
it 1 GB, you can still install with < 512 MB physical
memory.
Network Configuration requirements: I added "192.168.1.100 dblx131" to /etc/hosts file to avoid the port 1521 error while creating database. Before you click "OK", Login as root and execute above mentioned scripts, steps below;
Note: If you execute forget to execute
"/u01/app/oraInventory/orainstRoot.sh" as root then
following error will appear and perform the instructions on the screen
otherwise you will not be able to patch or upgrade from 10.2.0.1
Setup Other Oracle Environment VariablesAfter installing Oracle 10g Release 2 (10.2.0.1)
Software, add below lines to ~oracle/.bash_profile
Upgrading Database Software from 10g Release 2 (10.2.0.1) to Oracle 10g R2 (10.2.0.4)Copy p6810189_10204_Linux-x86.zip to oracle users' home
directory and use below command to extract the archive;
[oracle@dblx131 ~]$ unzip p6810189_10204_Linux-x86.zip
TIPS: Shutdown all Oracle Database, Listener,
iSQLPlus and Database Console before you Patch Oracle Software; Check out
Start and Shutdown Oracle Database/Processes
Now execute below command to Launch Oracle Universal installer that
came with 10.2.0.4.
[root@dblx131 ~]# cd
/u01/app/oracle/product/10.2.0/pdb10/
[root@dblx131 pdb10]# ./root.sh Running Oracle10 root.sh script... The following environment variables are set
as:
ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/10.2.0/pdb10 Enter the full pathname of the local bin
directory: [/usr/local/bin]: /usr/local/bin
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y 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. Upgrading Data Files from 10g Release 2 (10.2.0.1) to Oracle 10g R2 (10.2.0.4)TIPS: Shutdown all Oracle Database, Listener,
iSQLPlus and Database Console before you Patch Oracle Software; Check out
Start and Shutdown Oracle Database/Processes
Login as oracle user to Upgrade Instance[oracle@dblx131 ~]$ sqlplus
/nolog
SQL*Plus: Release 10.2.0.4.0 -
Production on Mon Jan 19 22:25:46 2009
Copyright (c) 1982, 2007,
Oracle. All Rights Reserved.
SQL> connect
sys/yoursyspassword as sysdba
Connected to an idle instance. SQL> STARTUP UPGRADE ORACLE instance started. Total System Global Area
167772160 bytes
Fixed Size 1266392 bytes Variable Size 83889448 bytes Database Buffers 79691776 bytes Redo Buffers 2924544 bytes Database mounted. Database opened. SQL> SPOOL /tmp/dblx131_pdb10_upgrade.log SQL> @?/rdbms/admin/catupgrd.sql SQL> SPOOL OFF Sample Output of dellc600l1_db10g1_patch.log
To see Upgrade Start and End Times;
[root@dblx131 tmp]# cat
/tmp/dblx131_pdb10_upgrade.log |awk '/COMP_TIMESTAMP/ ||
/DBUA_TIMESTAMP/'
COMP_TIMESTAMP UPGRD__BGN 2009-01-19 22:28:12 2454851 80892 COMP_TIMESTAMP PATCH_BGN 2009-01-19 22:28:44 COMP_TIMESTAMP CATPROC 2009-01-20 00:03:04 COMP_TIMESTAMP RDBMS 2009-01-20 00:03:04 DBUA_TIMESTAMP RDBMS VALID 2009-01-20 00:03:04 COMP_TIMESTAMP JAVAVM 2009-01-20 00:17:38 DBUA_TIMESTAMP JAVAVM VALID 2009-01-20 00:17:38 COMP_TIMESTAMP XML 2009-01-20 00:23:32 DBUA_TIMESTAMP XML VALID 2009-01-20 00:23:32 COMP_TIMESTAMP CATJAVA 2009-01-20 00:29:06 DBUA_TIMESTAMP CATJAVA VALID 2009-01-20 00:29:06 COMP_TIMESTAMP CONTEXT 2009-01-20 00:32:32 DBUA_TIMESTAMP CONTEXT VALID 2009-01-20 00:32:32 COMP_TIMESTAMP XDB 2009-01-20 00:51:03 DBUA_TIMESTAMP XDB VALID 2009-01-20 00:51:03 COMP_TIMESTAMP OWM 2009-01-20 00:58:09 DBUA_TIMESTAMP OWM VALID 2009-01-20 00:58:09 COMP_TIMESTAMP ODM 2009-01-20 01:01:56 DBUA_TIMESTAMP ODM VALID 2009-01-20 01:01:56 COMP_TIMESTAMP APS 2009-01-20 01:04:39 DBUA_TIMESTAMP APS VALID 2009-01-20 01:04:39 COMP_TIMESTAMP AMD 2009-01-20 01:12:10 DBUA_TIMESTAMP AMD VALID 2009-01-20 01:12:10 COMP_TIMESTAMP XOQ 2009-01-20 01:20:12 DBUA_TIMESTAMP XOQ VALID 2009-01-20 01:20:12 COMP_TIMESTAMP ORDIM 2009-01-20 02:11:51 DBUA_TIMESTAMP ORDIM VALID 2009-01-20 02:11:51 COMP_TIMESTAMP SDO 2009-01-20 02:28:27 DBUA_TIMESTAMP SDO VALID 2009-01-20 02:28:27 COMP_TIMESTAMP EXF 2009-01-20 02:30:13 DBUA_TIMESTAMP EXF VALID 2009-01-20 02:30:13 COMP_TIMESTAMP EM 2009-01-20 02:45:25 DBUA_TIMESTAMP EM VALID 2009-01-20 02:45:25 COMP_TIMESTAMP RUL 2009-01-20 02:48:03 DBUA_TIMESTAMP RUL VALID 2009-01-20 02:48:03 COMP_TIMESTAMP UPGRD_END 2009-01-20 02:48:04 To see List of Upgrades Components;
[root@dblx131 tmp]# tail -40
/tmp/dblx131_pdb10_upgrade.log
Component Status Version HH:MM:SS Oracle Database Server VALID 10.2.0.4.0 01:34:52 JServer JAVA Virtual Machine VALID 10.2.0.4.0 00:14:34 Oracle XDK VALID 10.2.0.4.0 00:05:53 Oracle Database Java Packages VALID 10.2.0.4.0 00:05:33 Oracle Text VALID 10.2.0.4.0 00:03:25 Oracle XML Database VALID 10.2.0.4.0 00:18:31 Oracle Workspace Manager VALID 10.2.0.4.3 00:07:05 Oracle Data Mining VALID 10.2.0.4.0 00:03:47 OLAP Analytic Workspace VALID 10.2.0.4.0 00:02:42 OLAP Catalog VALID 10.2.0.4.0 00:07:30 Oracle OLAP API VALID 10.2.0.4.0 00:08:02 Oracle interMedia VALID 10.2.0.4.0 00:51:38 Spatial VALID 10.2.0.4.0 00:16:35 Oracle Expression Filter VALID 10.2.0.4.0 00:01:46 Oracle Enterprise Manager VALID 10.2.0.4.0 00:15:11 Oracle Rule Manager VALID 10.2.0.4.0 00:02:37 . Total Upgrade Time: 04:19:52 DOC>####################################################################### DOC>####################################################################### DOC> DOC> The above PL/SQL lists the SERVER components in the upgraded DOC> database, along with their current version and status. DOC> DOC> Please review the status and version columns and look for DOC> any errors in the spool log file. If there are errors in the spool DOC> file, or any components are not VALID or not the current version, DOC> consult the Oracle Database Upgrade Guide for troubleshooting DOC> recommendations. DOC> DOC> Next shutdown immediate, restart for normal operation, and then DOC> run utlrp.sql to recompile any invalid application objects. DOC> DOC>####################################################################### DOC>####################################################################### DOC># SQL> SQL> SQL> SPOOL OFF Restart InstanceSQL> SHUTDOWN SQL> STARTUP Recompile Invalid ObjectsAfter you start the database instance in
normal mode, Login as sysdba and run below script;
SQL> SPOOL /tmp/dblx131_pdb10_utltp.log SQL> @?/rdbms/admin/utlrp.sql TIMESTAMP
-------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2009-01-20 02:56:49 DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid DOC> objects in the database. Recompilation time is proportional to the DOC> number of invalid objects in the database, so this command may take DOC> a long time to execute on a database with a large number of invalid DOC> objects. DOC> DOC> Use the following queries to track recompilation progress: DOC> DOC> 1. Query returning the number of invalid objects remaining. This DOC> number should decrease with time. DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6); DOC> DOC> 2. Query returning the number of objects compiled so far. This number DOC> should increase with time. DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED; DOC> DOC> This script automatically chooses serial or parallel recompilation DOC> based on the number of CPUs available (parameter cpu_count) multiplied DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu). DOC> On RAC, this number is added across all RAC nodes. DOC> DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel DOC> recompilation. Jobs are created without instance affinity so that they DOC> can migrate across RAC nodes. Use the following queries to verify DOC> whether UTL_RECOMP jobs are being created and run correctly: DOC> DOC> 1. Query showing jobs created by UTL_RECOMP DOC> SELECT job_name FROM dba_scheduler_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC> DOC> 2. Query showing UTL_RECOMP jobs that are running DOC> SELECT job_name FROM dba_scheduler_running_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC># TIMESTAMP
-------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_END 2009-01-20 03:09:53 DOC> The following query reports the number of objects that have compiled DOC> with errors (objects that compile with errors have status set to 3 in DOC> obj$). If the number is higher than expected, please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. DOC># OBJECTS WITH
ERRORS
------------------- 0 DOC> The following query reports the number of errors caught during DOC> recompilation. If this number is non-zero, please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. DOC># ERRORS DURING
RECOMPILATION
--------------------------- 0 SQL> SPOOL OFF SQL> Start and Shutdown Oracle Database/ProcessesIssue ps -eaf to see any oracle processes running in the OS, if you have chosen an option to install reconfigured database then below services will be running. To start, iSQL Plus
[oracle@dblx131 ~]$ isqlplusctl
start
iSQL*Plus 10.2.0.4.0 Copyright (c) 2003, 2007, Oracle. All Rights Reserved. Starting iSQL*Plus ... iSQL*Plus started. [oracle@dblx131 ~]$ To Stop, iSQLPlus[oracle@dblx131 ~]$ isqlplusctl
stop
iSQL*Plus 10.2.0.4.0 Copyright (c) 2003, 2007, Oracle. All Rights Reserved. Stopping iSQL*Plus ... iSQL*Plus stopped. [oracle@dblx131 ~]$
|