Friday, October 28, 2011

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

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.4 to 11.1.0.1" on Red Hat Linux 5.3 OS. For this you have to download Oracle Enterprise Manager Grid Control 11gR1 from oracle website http://www.oracle.com/technetwork/oem/grid-control/downloads/index.htm 
Pre-Upgrade Tasks

1. Oracle WebLogic Server 10.3.2 should be installed. Guide available here
2. Upgrade the repository database to Oracle 11gR2. Guide available here
3. Take Cold backup of repository database.
4. Switch the repository database to archive log mode. (not mandatory)
5. Stop the OMS and agent connected to the repository database.
6. set parameter job_queue_processes to 0 for the duration of upgrade.
7. set parameter log_buffer parameter to 10485760 or higher.
8. set parameter processes to 500 or higher.
9. Grant execute on DBMS_RANDOM to SYSMAN and DBSNMP users.


Execute following query to see the log mode of the database.

$ sqlplus / as sysdba
SQL> select log_mode from v$database;
LOG_MODE
-----------
ARCHIVELOG


if it is in NOARCHIVELOG then execute following script to switch it to archivelog mode.

$ sqlplus / as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database open;

Stop OMS and agents connected to the repository database by following commands

$ $<OMS_HOME>/opmn/bin/opmnctl stopall
$ $<AGENT_HOME>/bin/emctl stop agent

Set database parameters and grants by following script

$ sqlplus / as sysdba
SQL> alter system set job_queue_processes=0;
SQL> alter system set log_buffer=10485760 scope=spfile;
SQL> alter system set processes=500 scope=spfile;
SQL> grant execute on DBMS_RANDOM to SYSMAN, DBSNMP;
SQL> shutdown immediate;
SQL> startup;

Upgrade Tasks


Unzip the installation source and start the installer by running following command


$ cd /tmp/GridControl
$ unzip GridControl_11.1.0.1.0_Linux_1of3.zip
$ unzip GridControl_11.1.0.1.0_Linux_2of3.zip
$ unzip GridControl_11.1.0.1.0_Linux_3of3.zip 

$ ./runInstaller

Figure - 1

Leave the email and support password blank and click Next.


Figure - 2

Click Yes.


Figure - 3

Click the "Skip Software Updates" and then click Next.


Figure - 4


Click "Upgrade to Enterprise Manager 11g" and then click Next.


Figure - 5

Select the Enterprise Manager 10g you want to upgrade and click Next.


Figure - 6


If all the tests are succeeded then click Next otherwise check and fix the problem.


Figure - 7


Enter the SYS users password for the repository database and click Next.


Figure - 8

Click Next.



Figure - 9

Enter WebLogic username and passwords and click Next.


Figure - 10


Click Next.


Figure - 11

Review information and click Install.



Figure - 12


View Progress.


Figure - 13

View Progress.


Figure - 14


View Progress.



Figure - 15


Open a new terminal, login with root, make a directory for oracle files and run the script in the above figure.

$ mkdir /usr/local/bin/gc11g
$ /u01/oracle/Middleware/oms11g/allroot.sh


Figure - 16


Provide the directory path created above when prompted then click OK on figure 15.


Figure - 17

View Progress.



Figure - 18


View Progress.


Figure - 19

Note the Enterprise Manager URL and then click Close. Open the URL in brower.


Figure - 20


Enter username and password for repository database and click Login.


Figure - 21


Oracle Enterprise Manager Grid Control Release 10.2.0.4 is upgraded to 11.1.0.1.

Post-Upgrade Tasks


Reset the job_queue_processes parameter.


$ sqlplus / as sysdba
SQL> alter system set job_queue_processes=10;
SQL> exit;

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

Monday, October 24, 2011

How to install Oracle WebLogic Server 10.3.2 on Red Hat Enterprise Linux 5.3

In this article I will describe the installation of Oracle WebLogic Server 10.3.2 on Red Hat Enterprise Linux 5.3 OS. Download wls1032_linux32.bin from oracle website and copy to a /tmp folder. Run the installer as follows.


$ cd /tmp
$ ./wls1032_linux32.bin


Figure - 1

Click Next.


Figure - 2


Enter Middleware Home Directory path and click Next.


Figure - 3

Uncheck Oracle Support Check Box and click Next.


Figure - 4

Choose "Typical" Installation and click Next.

Figure - 5


Click Next.


Figure - 6

Click Next.


Figure - 7


View Progress.


Figure - 8


Uncheck "Run Quickstart" and click Done. Run the config.sh file from <MIDDLE_HOME>/wlserver_10.3/common/bin directory as shown in figure below.


Figure - 9


Configuration screen appears.


Figure - 10
 Check "Create a new WebLogic domain" box and click Next.


Figure - 11


Check "WebLogic Advanced Web Services Extension" and click Next.


Figure - 12


Enter Domain name and click Next.


Figure - 13


Enter User Name and Password for administrator user and click Next.


Figure - 14

Provide at least Jdk 1.6 update 18 and click Next. If Jdk is not already installed then install Jdk first.


Figure - 15




Check "Administration Server" and click Next.


Figure - 16

Enter information as in above screen and click Next.


Figure - 17


Review information and click Create.


Figure - 18

View Progress.


Figure - 19


Click Done. Change directory to <MIDDLE_HOME>/user_projects/domains/mydomain and run startWebLogic.sh file as follows.


Figure - 20
One WebLogic Server is started enter the URL in browser as follows. http://127.0.0.1:7001/console



Figure - 21

Provide admin user's password and click Login. Oracle WebLogic Server 11g Administration home page will appear as follows.


Figure - 22


Oracle WebLogic Server 11g 10.3.2.0 is installed.


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



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.