Tuesday, March 6, 2012

HOW TO INSTALL ORACLE 11G Release 2 on IBM AIX


ORACLE  11G RELEASE 2 INSTALLATION on IBM AIX

Step1:  Check the Hardware Requirements
a.      Memory Requirment:
Recommended : 2GB of RAM
To determine the physical RAM size
#/usr/sbin/lsattr –E -1 sys0 –a realmem
b.      Swap space requirement

Available RAM
Swap Space Required
Between 1 GB and 2 GB
1.5 times the size of the RAM
Between 2 GB and 16 GB
Equal to the size of the RAM
More than 16 GB
16 GB

To determine the size of swap space.
#/usr/sbin/lsps –a

c.       System architecture
To determine whether the system architecture can run the software.
#/usr/bin/getconf HARDWARE_BITMODE
Output must be 64.
To determine if the system is started in 64 bit mode
#bootinfo –K
Result will be 64, indicating that the 64 bit kernel is enable.

d.      Disk space requirements
At least 1.5Gb of space in the /tmp directory.
To determine the amount of disk space available in the /tmp directory
#df –k /tmp
·     The following table describes the disk space requirements for software files for each installation type:
Installation Type
Requirement for Software Files (GB)
Enterprise Edition
7.51
Standard Edition
7.07
·      
·     The following table describes the disk space for data files for each installation type:
Installation Type
Disk Space for Data Files (GB)
Enterprise Edition
1.75
Standard Edition
1.73
e.      Run level Requirement
Ensure that the system is started with run level 2.
Step2:  Operating System Requirements
The following, or later versions, of the operating systems are required for Oracle Database 11g Release 2 (11.2):
·         AIX 5L V5.3 TL 09 SP1 ("5300-09-01"), 64 bit kernel
·         AIX 6.1 TL 02 SP1 ("6100-02-01), 64-bit kernel
·         AIX 7.1 TL 0 SP1 ("7100-00-01"), 64-bit kernel
The following operating system filesets are required for AIX 5L:
·         bos.adt.base
·         bos.adt.lib
·         bos.adt.libm
·         bos.perf.libperfstat 5.3.9.0 or later
·         bos.perf.perfstat
·         bos.perf.proctools
·         xlC.aix50.rte.10.1.0.0 or later
·         gpfs.base 3.2.1.8 or later
The following operating system filesets are required for AIX 6.1:
·         bos.adt.base
·         bos.adt.lib
·         bos.adt.libm
·         bos.perf.libperfstat 6.1.2.1 or later
·         bos.perf.perfstat
·         bos.perf.proctools
·         xlC.aix61.rte.10.1.0.0 or later
·         xlC.rte.10.1.0.0 or later
·         gpfs.base 3.2.1.8 or later
The following operating system filesets are required for AIX 7.1:
·         bos.adt.base
·         bos.adt.lib
·         bos.adt.libm
·         bos.perf.libperfstat
·         bos.perf.perfstat
·         bos.perf.proctools
·         xlC.aix61.rte:10.1.0.0 or later
·         xlC.rte.10.1.0.0 or later
·         gpfs.base 3.3.0.11 or later
Note:
·         On AIX 5L operating system, if you set the value of LOCK_SGA parameter to true, then you must ensure that the CAP_BYPASS_RAC_VMM and CAP_PROPAGATE privileges are enabled for the operating system account that is used to start the respective database instances. Otherwise, setting the value of LOCK_SGA parameter to TRUE alone does not ensure startup of the database instance.
To determine the distribution and version of AIX      installed
#oslevel –s
To determine kernel bit mode
#getconf KERNEL_BITMODE
Note:
The expected output of this command is 64. If you do not see the expected output, then you cannot install the software on this system.
To determine whether required filesets  are installed and committed.
#lsapp –l <>

The following is the minimum compiler requirement for Pro*C/C++, Oracle Call Interface, Oracle C++ Call Interface, and Oracle XML Developer's Kit (XDK) with Oracle Database 11g Release 2 (11.2):
IBM XL C/C++ Enterprise Edition for AIX, V9.0 April 2008 PTF:

OS level Patch Requirement
Authorized Problem Analysis Reports (APARs) for AIX 5L:
·         IZ42940
·         IZ49516
·         IZ52331
Authorized Problem Analysis Reports (APARs) for AIX 6.1 TL 02 SP1, and the following AIX fixes:
·         IZ41855
·         IZ51456
·         IZ52319
Authorized Problem Analysis Reports (APARs) for AIX 7.1 TL 0 SP1, and the following AIX fixes:
  • IZ87216
  • IZ87564
To determine whether an APAR is installed.
#/usr/sbin/instfix –i –k "IZ42940 IZ49516 IZ52331 IZ41855 IZ52319"

Step3: Creating Required Operating System Groups and Users

The following local operating system groups and users are required if you are installing Oracle Database:
·         The Oracle Inventory group (oinstall)
·         The OSDBA group (dba)
·         The Oracle software owner (oracle)
To determine whether these groups and users exist, and if necessary, to create them, follow these steps:
1.    To determine whether the oinstall group exists, enter the following command:
# more /etc/oraInst.loc
If the output of this command shows the oinstall group name, then the group exists
To determine whether the dba group exists, enter the following command:
# grep dba /etc/group

 if groups are not exist then we need to create the oinstall and dba groups.

#smit security

Choose the appropriate menus and press F10 and exit.

TO determine whether the oracle user exists.

#id oracle

1. uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
if user not exist then we need to create the user
#smit security, choose appropriate menu and specify below information
In the primary Group field, specify the Oracle Inventory group(oinstall)
In the Group SET field , specifythe OSDBA group(dba,oper) and press F10 and exit.
Note:
The UID for the oracle user must be less than 65536.
Set the password for the oracle user
#passwd oracle

Step 4: Configure Shell Limits and System Configuration Parameters

SHELL LIMITS:

For AIX, it is the ulimit settings that determine process memory related resource limits.
Shell Limit (As Shown in smit)
Recommended Value
Soft FILE size
-1 (Unlimited)
Soft CPU time
-1 (Unlimited)
Note: This is the default value.
Soft DATA segment
-1 (Unlimited)
Soft STACK size
-1 (Unlimited)
Soft Real Memory size
-1 (Unlimited)
Processes (per user)
-1 (Unlimited)
 To view the current value specified for these shell limits, and to change them if necessary:
1.    Enter the following command:
2. # smit chuser
3.    In the User NAME field, enter the user name of the Oracle software owner, for example oracle.
4.    Scroll down the list and verify that the value shown for the soft limits listed in the previous table is -1.
If necessary, edit the existing value.
5.    When you have finished making changes, press F10 to exit.
Verify that the kernel parameters shown in the following table are set to values greater than or equal to the minimum value shown.
Parameter
Recommended Value
maxuprocs
16384
ncargs
128

The following procedure describes how to verify and set the values.
·     To verify that the maximum number of processes allowed per user is set to 16384 or greater, use the following steps:
Note:
For production systems, this value should be at least 128 plus the sum of the PROCESSES and PARALLEL_MAX_SERVERS initialization parameters for each database running on the system.
1. Enter the following command:
2. # smit chgsys
3. Verify that the value shown for Maximum number of PROCESSES allowed per user is greater than or equal to 16384.
If necessary, edit the existing value.
4. When you have finished making changes, press F10 to exit.


  • To verify that long commands can be executed from shell, use the following steps:
Note:
Oracle recommends that you set the ncargs system attribute to a value greater than or equal to 128. The ncargs attribute determines the maximum number of values that can be passed as command line arguments.
    1. Enter the following command:
2. # smit chgsys
    1. Verify that the value shown for ARG/ENV list size in 4K byte blocks is greater than or equal to 128.
If necessary, edit the existing value.
    1. When you have finished making changes, press F10 to exit.

Checking Asynchronous Input Output Processes

On AIX 5, run the rootpre.sh script to enable the AIO (Asynchronous Input Output) device drivers. On AIX 6, the AIO device drivers are enabled by default. For both AIX 5 and AIX 6, increase the number of aioserver processes from the default value. The recommended value for aio_maxreqs is 64k (65536). Confirm this value for both AIX 5 and AIX 6.
Confirm the aio_maxreqs value using the procedure for your release:
AIX 6.1:
# ioo –o aio_maxreqs
aio_maxreqs = 65536
On AIX 5.3:
# lsattr -El aio0 -a maxreqs
maxreqs 65536 Maximum number of REQUESTS True
When performing an asynchronous I/O to a file system, note that each asynchronous I/O operation is tied to an asynchronous I/O server. Thus, the number of asynchronous I/O servers limits the number of concurrent asynchronous I/O operations in the system.
The initial number of servers that are started during a system restart is determined by the minservers parameter. As concurrent asynchronous I/O operations occur, additional asynchronous I/O servers are started, up to a maximum of the value set in the maxservers parameter.
On AIX 5.3, if you are using Oracle Database with data files on a file system then increase the default values for minservers and maxservers, as the default values for these parameters are too small. Increase the minservers and maxservers values based on I/O kprocs for each processor.
In general, to set the number of asynchronous I/O servers, complete the following procedure:
1.    Adjust the initial value of maxservers to 10 times the number of disks that are to be used concurrently but no more than 80.
2.    Monitor the performance effects on the system during periods of high I/O activity. If all AIO server processes are started, then increase the maxservers value. Also, continue to monitor the system performance during peak I/O activity to determine if there was a benefit from the additional AIO servers. Too many asynchronous I/O servers increase memory and processor overload of additional processes, but this disadvantage is small.
To monitor the number of AIO server processes that have started, enter the following:
# ps -ek|grep -v grep|grep –v posix_aioserver|grep -c aioserver

Step5: Creating Required Directories

The Oracle base directory must have 3 GB of free disk space, or 4 GB of free disk space if you choose not to create a separate Oracle data file directory.
To create the Oracle base directory:
# mkdir -p /mount_point/app/
# chown -R oracle:oinstall /mount_point/app/
# chmod -R 775 /mount_point/app/
For example:
# mkdir -p /u01/app/
# chown -R oracle:oinstall /u01/app/
# chmod -R 775 /u01/app/

Step6: CONFIGURING THE ORACLE USER’s Environment
Login as root user
#xterm
It will open new window, in that type
#xhost + then exit
Now login as oracle user
#su – oracle  or pbrun –u oracle ksh
$xterm
$ vi .profile
umask 022
TMP=/tmp; export TMP
TMPDIR=/tmp; export TMPDIR
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_HOSTNAME=inatechsrv.blr.com; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.1/server; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
 ESC :wq

Step 7: Installing oracle database
Copy the zip files intto /mnt folder.
Unzip the 11g software files
If you want to install through GUI then choose step8 else go with Step9.
Step 8: If your installing Oracle under GUI Mode
Go to the respective folder
#su – oracle
#xterm
$cd /mnt/hgfs/shared/database
$./runInstaller.

Step 9: If your installing on silent Mode or through Putty =====================================================================================
ORACLE 11G Release 2 Software silent Mode installation

Go to the software folder
Ex:
#su - oracle
$cd /mnt/database
Enter the below command
$./runInstaller –silent –debug –force \
FROM_LOCATION=/mnt/database/stage/products.xml \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oracle/oraInventory \
ORACLE_HOME=/u01/app/oracle/product/11.2.0.1/server \
ORACLE_HOME_NAME="OraDb11g_Home1" \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=dba \
DECLINE_SECURITY_UPDATES=true
Enter
Running the rootpre.sh
# /directory_path/rootpre/rootpre.sh 
PRESS Y
While  installing if it gives error like

[FATAL] [INS-32035] Unable to create a new central inventory at the specified location.

CAUSE: The central inventory location provided is not empty.

Please create oraInst.loc file,  this file will be in /etc/oraInst.loc or /var/opt/oracle/oraInst.loc (it depends on OS)

Creating oraInst.loc
#vi /etc/oraInst.loc  or /var/opt/oracle/oraInst.loc
Enter the data
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
save it :wq

again run it but this time please remove the line(INVENTORY LOCATION).
#su – oracle
$cd /mnt/database
$./runInstaller –silent –debug –force –ignoreSysPrereqs  \
FROM_LOCATION=/mnt/database/stage/products.xml  \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
ORACLE_HOME=/u01/app/oracle/product/11.2.0.1/server  \
ORACLE_HOME_NAME="OraDb11g_Home1" \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=dba \
DECLINE_SECURITY_UPDATES=true

Enter,  it will ask to run rootpre.sh, press Y.
now oracle software will install smoothly.  At  end of the installation , we can see a text called
The following configuration scripts need to be executed as the "root" user.
 #!/bin/sh
 #Root scripts to run
/u01/app/oracle/product/11.2.0.1/server/root.sh
To execute the configuration scripts:
         1. Open a terminal window
         2. Log in as "root"
         3. Run the scripts
         4. Return to this window and hit "Enter" key to continue

We need to run this script under root user
#cd /u01/app/oracle/product/11.2.0.1/server
#./root.sh

 To confirm this script ran successfully
#cat /etc/oratab
If it shows then script run successfully.  If file doesn’t exist means root.sh script not ran successfully.

Step10: Creating listeners
Copy the response file netca.rsp to some other location, open the file
Modify the values.
Note: INSTALL_TYPE should be custom(if u want to use your listener name else default ).

Please check some prerequisites
#ping hostname
#ping ipaddress
Both should successfully otherwise listener creation will fails.
$cd $ORACLE_HOME/bin
$./netca /silent /responsefile /mnt/database/database/netca.rsp


For more details click this link
http://muralikrishnadba.blogspot.in/2012/03/configuration-of-listeners-status.html


Step11: Create the database
Copy the dbca.rsp to some other location, change the parameters whichever is applicable.

#su – oracle
$cd $ORACLE_HOME/bin
[oracle@inatechsrv bin]$ ./dbca -silent -responseFile /mnt/database/database/dbca.rsp
Copying database files
1% complete
3% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/DB11G/DB11G.log" for further details.
[oracle@inatechsrv bin]$

Step12:HOW TO CREATE ENTERPRISE MANAGER
#su – oracle
$cd $ORACLE_HOME/bin
$./emca -config dbcontrol db -repos create

Enter all parameter values, press Y.  While creating repository if given error like already repository available
$ ./emca -config dbcontrol db
Just enter all parameter values and press Y.

Note the db control URL like The Database Control URL is https://inatechsrv.blr.com:1158/em

POST Installation Check

Step1: Check  . oraenv working properly or not
#su – oracle
$. oraenv

Step2: Check sqlplus command working fine or not
#su  - oracle
$sqlplus
Enter username: /as sysdba

Step3:  check the database Mode
Sql> select name,open_mode from v$database;
DB11G READWRITE

Step4: Check whether database using spfile file or not
SQL>show parameter spfile;

If it using pfile just create it.
SQL> create spfile from pfile;

Step5:  Check whether sys user working as sysdba or not
#su – oracle
$sqlplus sys$DB11G
Enter the password
SQL>

If any error throws just check below documents.

Step6:  Just check listener status & tnsname entry
#su – oracle
$lsnrctl status <listenername>

Got to $ORACLE_HOME/network/admin
Check whether tnsnames.ora file has entry.

Check the connectivity
#su – oracle
$sqlplus sys@


Step7: Create one tablespace and make it default.
SQL> create tablespace red_fms datafile ‘/u01/app/test1.dbs’ size 1G;
SQL>alter database default tablespace red_fms;

Step8: Check whether enterprise manager working or not.
Open explorer and type above URL.


ERRORS

ERROR1
[oracle@inatechsrv ~]$ sqlplus sys@DB11G


SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 3 17:02:25 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password:
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

Solution:
SQL> alter system set o7_dictionary_accessibility=true scope=spfile;

System altered.

Error2: ORA-01994: GRANT failed: password file missing or disabled
Recreate the password file.
$orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=newsyspassword entries=16 force=y

SQL> show parameter REMOTE_LOGIN_PASSWORDFILE

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE

SQL> select * from v$pwfile_users;

USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE

2 comments:

  1. step by step guide install and config Oracle on AIX:
    part 1:
    https://youtu.be/liwhaOo6NGs
    Part 2:
    http://youtu.be/z3rqGM4u7vI
    part 3:
    http://youtu.be/cYwpjQdlhsc

    ReplyDelete
  2. thank you sir, it very helpful

    ReplyDelete

Share your knowledge it really improves, don't show off...