Thursday, October 20, 2011

How to Upgrade Oracle Database Release 10.2.0.4 to 11.2.0.1


In the name of Allah, Most Gracious, Most Merciful.

In this article i will describe "How to upgrade Oracle Database Release 10.2.0.4 to 11.2.0.1" on Red Hat Linux 5.3 OS. For this purpose you have to install 11g R2 software and then upgrade the database by using dbua utility. Shutdown the database and take cold backup of database files and spfile.

$ sqlplus / as sysdba
  shutdown immediate;
  exit;
$ lsnrctl stop

Backup Database files including control files, redo log files, data files and system parameter files (spfile).

Prerequisites

1. Make directory for 11gR2 software installation by logging with user "oracle".


mkdir -p /u01/oracle/product/11.2.0/db_1

2. Make directory for 11gr2 software zip files by "root" user.


$ mkdir /tmp/11gr2
$ chown -R oracle:oinstall /tmp/11gr2


3. Copy 11gr2 software zip files to /tmp/11gr2


4. Unzip the installation zip files to /tmp/11gr2 directory by logging with user "oracle".


$ cd /tmp/11gr2
$ unzip linux_11gR2_database_1of2.zip
$ unzip linux_11gR2_database_2of2.zip


5. Run setup by running following command.


$ cd database
$ ./runInstaller


Installation


Figure - 1


Click Next.


Figure - 2


Click Yes.




Figure - 3


Click "Install database software only" and then click Next.


Figure - 4


Click "Single Instance database installation" and click Next.




Figure - 5


Click Next.




Figure - 6


Click Next.


Figure - 7


Provide "Oracle Base" path and "Software Location" path and click Next.


Figure - 8


Click Next.


Figure - 9


Login with root user and edit the /etc/sysctl.conf file and update the parameter "ip_local_port_range" parameter to 9000 65500


$ vi /etc/sysctl.conf



Apply these setting by running following command



$ /sbin/sysctl -p


Figure - 10


Now click "Check Again" button on Figure - 9.




Figure - 11


Review information and click Finish.



Figure - 12


View progress.


Figure - 13


Open a new terminal and login with root user and create a directory with following command and run the script in above figure - 13.


$ mkdir -p /usr/local/bin/11gdb
$ /u01/oracle/product/11.2.0/db_1/root.sh


Figure - 14
Click OK on figure - 13.


Figure - 15


Click Close to finish 11gr2 software installation.


Upgradation


Update the ORACLE_HOME in oracle's bash profile


$ cd ~
$ vi .bash_profile


Figure - 16




Figure - 17

Apply these settings by running following command.
$ . ./.bash_profile



Figure - 18


Run dbua utility as follows.


Figure - 19


Following welcome screen will appear.


Figure - 20


Click Next.


Figure - 21


Select database to upgrade and click Next.




Figure - 22


Purge deleted objects from Recycle bin.


Figure - 23


Figure - 24


Select higher degree of parallelism for invalid objects compilation and turn off archiving for the duration of upgrade and click Next.




Figure - 25


Click Next.


Figure - 26


Click Next.


Figure - 27


Review upgrade summary and click Finish




Figure - 28


View progress.


Figure - 29


View Progress.




Figure - 30


View Progress.


Figure - 31


View Progress.


Figure - 32


View upgrade results.


Oracle Database Release 10.2.0.4 is upgraded to Oracle 11g Release 2 11.2.0.1.



Insha-Allah this will help and serve the purpose. For any corrections and improvements please suggest. 


Tuesday, October 11, 2011

How to Upgrade Oracle Management Agent Release 10.2.0.1 to 10.2.0.4

In the name of Allah, Most Gracious, Most Merciful.

In this article i will describe "How to upgrade Oracle Management Agent Release 10.2.0.1 to 10.2.0.4" on Red Hat Linux 5.3 OS. For this you have to download patch number 3731593 from Oracle Metalink site.

Before upgrading Oracle Management Agent to Release 10.2.0.4 you should upgrade Oracle Grid Control to 10.2.0.4. You can find this guide here.

1. Stop Management Agent bu using following command

$ <AGENT_HOME>/bin/emctl stop agent

2. Take backup of Agent home directory

3. set ORACLE_HOME to Agent home directory

$ export ORACLE_HOME=/u01/oracle/product/10.2.0/grid/agent10g

4. unzip the patch zip file to /tmp directory

$ unzip p3731593_10204_LINUX.zip

5. Run Installer from patch

$ /tmp/3731593/Disk1/runInstaller

Figure - 1

Select agent Home name and path and click Next.

Figure - 2

Click Next.

Figure - 3

Click Next.

Figure - 4

Review Summary information and click Install.

Figure - 5

View progress.

Figure - 6

View configuration progress.

Figure - 7

Oracle Management Agent Release 10.2.0.1 is upgraded to 10.2.0.4.

Insha-Allah this will help and serve the purpose. For any corrections and improvements please suggest.

Friday, October 7, 2011

How to Upgrade Oracle Enterprise Manager Grid Control Release 10.2.0.1 to 10.2.0.4

In the name of Allah, Most Gracious, Most Merciful.

In this article i will describe "How to upgrade Oracle Enterprise Manager Grid Control Release 10.2.0.1 to 10.2.0.4" on Red Hat Linux 5.3 OS. For this you have to download patch number 3731593 from Oracle Metalink site.

1. Stop Management Agent, Management Services, Repository Database and Repository Database Listener.

$ <AGENT_HOME>/bin/emctl stop agent
$ <OMS_HOME>/opmn/bin/opmnctl stopall
$ <ORACLE_HOME>/bin/sqlplus / as sysdba
  shutdown immediate;
  exit;

$ <ORACLE_HOME>/bin/lsnrctl stop

2. Backup OMS Home Directory, Repository Database and Oracle Inventory Directory.

3. Start repository database and its listener.

$ lsnrctl start
$ sqlplus / as sysdba
  startup;


4. If you are using Corrective Action Feature then you have to execute following code. First verify it by logging on with repository owner i.e. sysman


select count(*) from mgmt_corrective_action;

if this query returns a value greater then 0 then execute following block.

BEGIN
   FOR r IN (SELECT job_id
        FROM   mgmt_corrective_action a
        WHERE  NOT EXISTS
        (SELECT 1
        FROM   mgmt_job j
        WHERE  j.job_id = a.job_id)
        ) LOOP
     UPDATE mgmt_policy_assoc_cfg c
       SET crit_action_job_id = NULL
     WHERE  crit_action_job_id = r.job_id
     ;
     UPDATE mgmt_policy_assoc_cfg c
       SET warn_action_job_id = NULL
     WHERE  warn_action_job_id = r.job_id
     ;
     UPDATE mgmt_policy_assoc_cfg c
       SET info_action_job_id = NULL
     WHERE  info_action_job_id = r.job_id
     ;
     DELETE
     FROM   mgmt_corrective_action
     WHERE  job_id = r.job_id
     ;
     COMMIT;
   END LOOP;
  COMMIT;
END;
/

5. set ORACLE_HOME to OMS home directory

$ export ORACLE_HOME=/u01/oracle/product/10.2.0/grid/oms10g

6. unzip the patch zip file to /tmp directory

$ unzip p3731593_10204_LINUX.zip

7. Run Installer from patch

$ /tmp/3731593/Disk1/runInstaller

Figure - 1

Select OMS home name and patch from list and click Next button.

Figure - 2

Click Next button.

Figure - 3

Enter the sys password for the repository database and click Next.

Figure - 4

Click Next.

Figure - 5

Review summary and click Next.

Figure - 6

View progress.

Figure - 7

View progress.

Figure - 8

Repository upgrade is in progress.

Figure - 9

View progress.

Figure - 10

View progress.

Figure - 11

Oracle Enterprise Manager Grid Control Release 10.2.0.1 is upgraded to 10.2.0.4

Insha-Allah this will help and serve the purpose. For any corrections and improvements please suggest.