Category Archives: Installation’s

How do I delete an entire database (UNIX only)?


The following shows the steps to drop a database in Unix enviroment. In order to delete a database, there are few things need to be taken care of. First, all the database related files eg *.dbf, *.ctl, *.rdo, *.arc need to be deleted. Then, the entry in listener.ora and tnsnames.ora need to be removed. Third, all the database links need to be removed since it will be invalid anyways.

It depends how you login to oracle account in Unix, you should have environment set for the user oracle. To confirm that the environment variable is set, do a env|grep ORACLE and you will notice that your ORACLE_SID=SOME_SID and ORACLE_HOME=SOME_PATH. If you do not already have the ORACLE_SID and ORACLE_HOME set, do it now.

Make sure also, that you set the ORACLE_SID and ORACLE_HOME correct else you will end up deleting other database. Next, you will have to query all the database related files from dictionaries in order to identify which files to delete. Do the following:

01. Login as connect / as sysdba at svrmgrl
02. startup the database if it’s not already started. The database must at least mounted.
03. spool /tmp/deletelist.lst
04. select name from v$datafile; (This will get all the datafiles; alternatively, you can select file_name from dba_data_files)
05. select member from v$logfile;
06. select name from v$controlfile;
07. archive log list (archive_log_dest is where the archived destination is)
08. locating ifile by issuing show parameter ifile (alternatively, check the content of init.ora)
09. spool off
10. Delete in O/S level the files listed in /tmp/deletelist.lst
11. remove all the entries which refer to the deleted database in tnsnames.ora and listener.ora (located in $ORACLE_HOME/network/admin)
12. remove all database links referring to the deleted database.
13. check “/var/opt/oracle/oratab” to make sure there is no entry of the database deleted. If yes, remove it.
14. DONE

Question with Answer on Oracle database Patches

Patches are a small collection of files copied over to an existing installation. They are associated with particular versions of Oracle products.

The discussion will especially help for those beginners who are preparing for interview and inexperienced to apply the patches. In this article you will find all those things briefly with an example. For more details please study the oracle documentation and try to search with separate topics on this blog.

What are different Types of Patches?

Regular Patcheset: To upgrade to higher version we use database patchset. Please do not confuse between regular patchests and patch set updates (PSU). Consider the regular patchset is super set of PSU. Regular Patchset contain major bug fixes. In comparison to regular patch PSU will not change the version of oracle binaries such as sqlplus, import/export etc. The importance of PSU is automatically minimized once a regular patchset is released for a given version. It is mainly divided into two types:

Security or Critical Patch Update (CPU): Critical patch update quarterly delivered by oracle to fix security issues.

Patch set updated (PSU): It include CPU and bunch of other one-off patches. It is also quarterly delivered by oracle.

Interim (one-off) Patch: It is also known as patchset exception or one-off patch or interim patch. This is usually a single fix for single problem or enhancement. It released only when there is need of immediate fix or enhancement that cannot wait until for next release of patchset or bundle patch. It is applied using OPATCH utility and is not cumulative.

Bundle Patches: Bundle Patches includes both the quarterly security patches as well as recommended fixes (for Windows and Exadata only). When you try to download this patch you will find bundle of patches (different set of file) instead of single downloaded file (usually incase patchset).

Is Opatch (utility) is also another type of patch?

OPatch is utility from oracle corp. (Java based utility) that helps you in applying interim patches to Oracle’s software and rolling back interim patches from Oracle’s software. Opatch also able to Report already installed interim patch and can detect conflict when already interim patch has been applied. This program requires Java to be available on your system and requires installation of OUI. Thus from the above discussion coming to your question it is not ideal to say OPATCH is another patch.

When we applying single Patch, can you use OPATCH utility?

Yes, you can use Opatch incase of single patch. The only type of patch that cannot be used with OPatch is a patchset

When you applying Patchsets, You can use OUI.

Yes, Patcheset uses OUI. A patch set contains a large number of merged patches, to change the version of the product or introduce new functionality. Patch sets are cumulative bug fixes that fix all bugs and consume all patches since the last base release. Patch sets and the Patch Set Assistant are usually applied through OUI-based product specific installers.

Can you Apply OPATCH without downtime?

As you know for apply patch your database and listener must be down. When you apply OPTACH it will update your current ORACLE_HOME. Thus coming to your question to the point in fact it is not possible in case of single instance but in RAC you can Apply Opatch without downtime as there will be more separate ORACLE_HOME and more separate instances (running once instance on each ORACLE_HOME).

You have collection of patch (nearly 100 patches) or patchset. How can you apply only one patch from patcheset or patch bundle at ORACLE_HOME?
With Napply itself (by providing patch location and specific patch id) you can apply only one patch from a collection of extracted patch. For more information check the opatch util NApply –help. It will give you clear picture.

For Example:

opatch util napply <patch_location> -id 9 -skip_subset -skip_duplicate

This will apply only the patch id 9 from the patch location and will skip duplicate and subset of patch installed in your ORACLE_HOME.

How can you get minimum/detail information from inventory about patches applied and components installed?

You can try below command for minimum and detail information from inventory
C:ORACLE_HOMEOpatchopatch lsinventory –invPtrLoc “location of oraInst.loc file”

$ORACLE_HOMEOPatchopatch lsinventory -detail -invPtrLoc “location of oraInst.loc file”
Differentiate Patcheset, CPU and PSU patch? What kind of errors usually resolved from them?

Critical Patch Update (CPU) was the original quarterly patches that were released by oracle to target the specific security fixes in various products. CPU is a subset of patchset updates (PSU). CPU are built on the base patchset version where as PSU are built on the base of previous PSU

Patch Set Updates (PSUs) are also released quarterly along with CPU patches are a superset of CPU patches in the term that PSU patch will include CPU patches and some other bug fixes released by oracle. PSU contain fixes for bugs that contain wrong results, Data Corruption etc but it doe not contain fixes for bugs that that may result in: Dictionary changes, Major Algorithm changes, Architectural changes, Optimizer plan changes

Regular patchset: Please do not confuse between regular patchests and patch set updates (PSU). Consider the regular patchset is super set of PSU. Regular Patchset contain major bug fixes. The importance of PSU is minimizing once a regular patchset is released for a given version. In comparison to regular patch PSU will not change the version of oracle binaries such as sqlplus, import/export etc.

If both CPU and PSU are available for given version which one, you will prefer to apply?
From the above discussion it is clear once you apply the PSU then the recommended way is to apply the next PSU only. In fact, no need to apply CPU on the top of PSU as PSU contain CPU (If you apply CPU over PSU will considered you are trying to rollback the PSU and will require more effort in fact). So if you have not decided or applied any of the patches then, I will suggest you to go to use PSU patches. For more details refer: Oracle Products [ID 1430923.1], ID 1446582.1

PSU is superset of CPU then why someone choose to apply a CPU rather than a PSU?

CPUs are smaller and more focused than PSU and mostly deal with security issues. It seems to be theoretically more consecutive approach and can cause less trouble than PSU as it has less code changing in it. Thus any one who is concerned only with security fixes and not functionality fixes, CPU may be good approach.

How can you find the PSU installed version?

PSU references at 5th place in the oracle version number which makes it easier to track such as (e.g. 10.2.0.3.1). To determine the PSU version installed, use OPATCH utility:

OPATCH lsinv -bugs_fixed | grep -i  PSU

To find from the database:

Select substr(action_time,1,30) action_time, substr(id,1,10) id, substr(action,1,10) action,substr(version,1,8) version, substr(BUNDLE_SERIES,1,6) bundle, substr(comments,1,20) comments from registry$history;

Note: You can find the details from the above query if you already executed the catbundle.sql

Click to Check Existing Oracle Database Patch Status

Will Patch Application affect System Performance?
Sometimes applying certain patch could affect Application performance of SQL statements. Thus it is recommended to collect a set of performance statistics that can serve as a baseline before we make any major changes like applying a patch to the system.

Can you stop applying a patch after applying it to a few nodes? What are the possible issues?

Yes, it is possible to stop applying a patch after applying it to a few nodes. There is a prompt that allows you to stop applying the patch. But, Oracle recommends that you do not do this because you cannot apply another patch until the process is restarted and all the nodes are patched or the partially applied patch is rolled back.

How you know impact of patch before applying a patch?

OPATCH <option> -report

You can use the above command to know the impact of the patch before actually applying it.

How can you run patching in scripted mode?

opatch <option> -silent

You can use the above command to run the patches in scripted mode.

Can you use OPATCH 10.2 to apply 10.1 patches?

No, Opatch 10.2 is not backward compatible. You can use Opatch 10.2 only to apply 10.2 patches.

What you will do if you lost or corrupted your Central Inventory?

In that case when you lost or corrupted your Central Inventory and your ORACLE_HOME is safe, you just need to execute the command with –attachHomeflag, OUI automatically setup the Central Inventory for attached home.

What you will do if you lost your Oracle home inventory (comps.xml)?

Oracle recommended backup your ORACLE_HOME before applying any patchset. In that case either you can restore your ORACLE_HOME from the backup or perform the identical installation of the ORACLE_HOME.

When I apply a patchset or an interim patch in RAC, the patch is not propagated to some of my nodes. What do I do in that case?

In a RAC environment, the inventory contains a list of nodes associated with an Oracle home. It is important that during the application of a patchset or an interim patch, the inventory is correctly populated with the list of nodes. If the inventory is not correctly populated with values, the patch is propagated only to some of the nodes in the cluster.

OUI allows you to update the inventory.xml with the nodes available in the cluster using the -updateNodeList flag in Oracle Universal Installer.

When I apply a patch, getting the following errors:

“Opatch Session cannot load inventory for the given Oracle Home <Home_Location> Possible causes are: No read or write permission to ORACLE_HOME/.patch_storage; Central Inventory is locked by another OUI instance; No read permission to Central Inventory; The lock file exists in ORACLE_HOME/.patch_storage; The Oracle Home does not exist in Central Inventory”. What do I do?

This error may occur because of any one or more of the following reasons:

  • – The ORACLE_HOME/.patch_storage may not have read/write permissions. Ensure that you give read/write permissions to this folder and apply the patch again.
  • – There may be another OUI instance running. Stop it and try applying the patch again.
  • – The Central Inventory may not have read permission. Ensure that you have given read permission to the Central Inventory and apply the patch again.
  • – The ORACLE_HOME/.patch_storage directory might be locked. If this directory is locked, you will find a file named patch_locked inside this directory. This may be due to a previously failed installation of a patch. To remove the lock, restore the Oracle home and remove the patch_locked file from the ORACLE_HOME/.patch_storage
  • – The Oracle home may not be present in the Central Inventory. This may be due to a corrupted or lost inventory or the inventory may not be registered in the Central Inventory.

We should check for the latest security patches on the Oracle metalink website http://metalink.oracle.com/ and we can find the regular security alert at the location http://technet.oracle.com/deploy/security/alert.htm

Caution: It is not advisable to apply the patches directly into the production server. The ideal solution is to apply or test the patches in test server before being moved into the production system.

For more about oracle Patch:

About Patching in Oracle

How to Apply Critical Patch Update on RAC

Apply patches on 9.2.0.1.0 to upgrade 9.2.0.7.0

How to Create Oracle database Manually

There are basically three ways to create database:
Using the database configure Assistance (DBCA)
DBCA can be used to create the new database at the time of oracle installation as well as later at any time as a standalone tool, which provide a graphical interface (GUI) that guide you through the creation of database.
With the SQL create database statement.
You can use the CREATE DATABASE script to create the database manuallly from command prompt. For that you must have created previously your environment as a part of oracle installation (Install oracle software only).
Through upgrading an existing database.
If you are already using a previous release of oracle, You can upgrade your existing database and use it with new release of oracle software
This article basically focusing on the second option (only). It can be completed on the command line that is without any GUI.
Database creation prepares several operating system files to work together as an Oracle database. You need only create a database once, Thus you must carefully plan your database structure before creating a database such as:
1. Plan the database tables and indexes and estimate the amount of space they will require.
2. Plan the layout of underlying operating system. Proper distribution of I/O will improve your database performance. For example: Place redolog files and datafiles on seperate disks. Placing datafiles on seperate disk will reduce contention problem.
3. Consider using OMF feature to create and manage the operating system file that comprise your database storage.
4. Select the global database name, which is the name (DBNAME) and location (DOMAIN_NAME) of database within the network structure.
5. Develop good understanding of Pfile or spfile parameters.
6. You must select the database character set. All characters including data in data dictionary, is stored in database character set
7. Consider what time zones your database must support.
8. Select the standard database block size. This is specified at database creation by the DB_BLOCK_SIZE initialization parameter and cannot be changed after the database is created. The SYSTEM tablespace and most other tablespaces use the standard block size. Additionally, you can specify up to four
non-standard block sizes when creating tablespaces.
9. Use an UNDO tablespace to manage your undo records, rather than rollback segments.
10. Develop a backup and recovery strategy to protect the database failure.
                                                                **Step to Create Database Manually**
Step1: Create all the necessary directories.
Step2: Prepare the database Script.
Step3: Prepare the init.ora file.
Step4: Startup created database with init.ora file.
Step5: Finally run the catalog.sql and catproc.sql scripts.

Step1: First create all the required directory on the destination server such as: Admin, adump, bdump, cdump, udump, Archive etc.
Step2: Next Prepare the database creation script such as:
Create Database Script on Windows Environment
—————————————————————————————————-
Create database MY_DB
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 292
logfile group 1 (‘D:oracleMY_DBredo1.log’) size 10M,
group 2 (‘D:oracleMY_DBredo2.log’) size 10M,
group 3 (‘D:oracleMY_DBredo3.log’) size 10M
character set WE8ISO8859P1
national character set utf8
datafile ‘D:oracleMY_DBsystem_01.dbf’
size 50M autoextend on
next 20M maxsize unlimited
extent management local
sysaux datafile ‘D:oracleMY_DBsysaux_01.dbf’
size 10M autoextend on
next 10M maxsize unlimited
undo tablespace undotbs1
datafile ‘D:oracleMY_DBundotbs1_01.dbf’ size 10M
default temporary tablespace temp
tempfile ‘D:oracleMY_DBtemp_01.dbf’ size 10M;
Note: On windows environment you need to create services using oradim such as:
CMD> ORADIM -NEW -SID MY_DB -PFILE=’D:oracleadminSADHANpfileinitSADHAN.ora’;
Create Database Script on Linux Environment
—————————————————————————————————-
Create database MY_DB
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 292
logfile group 1 (‘/u01/../redo1.log’) size 10M, group 2 (‘/u01/../redo2.log’) size 10M,
group 3 (‘/u01/../redo3.log’) size 10M
character set WE8ISO8859P1
national character set utf8
datafile ‘/u01/../system_01.dbf’ size 50M autoextend on next 20M maxsize unlimited
extent management local
sysaux datafile ‘/u01/../sysaux_01.dbf’ size 10M autoextend on next 10M maxsize unlimited
undo tablespace undotbs1
datafile ‘/u01/../undotbs1_01.dbf’ size 10M
default temporary tablespace temp
tempfile ‘/u01/../temp_01.dbf’ size 10M;
Step3: Prepare the init.ora file such as:
audit_file_dest=’/u01/../MY_DB/admin/adump’
background_dump_dest=’/u01/../MY_DB/admin/bdump’
compatible=’10.2.0.3.0′
control_files=’/u01/../MY_DB/control01.ctl’, ‘/u01/../MY_DB/control02.ctl’,’/u01/../MY_DB/control03.ctl’
core_dump_dest=’/u01/../MY_DB/admin/cdump’
db_block_size=8192
db_domain=”
db_file_multiblock_read_count=16
db_name=’MY_DB’
dispatchers='(PROTOCOL=TCP) (SERVICE=my_dbXDB)’
job_queue_processes=10
log_archive_dest_1=’LOCATION=/u01/../MY_DB/archive’
log_archive_format=’%t_%s_%r.dbf’
open_cursors=300
pga_aggregate_target=220200960
processes=150
remote_login_passwordfile=’EXCLUSIVE’
sga_target=629145600
undo_management=’AUTO’
undo_tablespace=’UNDOTBS’
user_dump_dest=’/u01/../MY_DB/admin/udump’
db_recovery_file_dest=’/u02/../MY_DB/backup’
db_recovery_file_dest_size=230686720
Step4: Now start the newly created database in nomount phase with the help of init.ora file.
$ export ORACLE_SID=my_db
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 – Production on Thu Jun 21 10:26:54 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> Startup Pfile=/u01/app/oracle/product/10.2.0/db_1/dbs/initmy_db.ora nomount; 
ORACLE instance started.
Total System Global Area 629145600 bytes
Fixed Size 1443789 bytes
Variable Size 168878648 bytes
Database Buffers 447849588 bytes
Redo Buffers 7340032 bytes
SQL> @My_db.sql 
Database created.
Step5: Finally run the catalog.sql and catproc.sql scripts.
Thus the database is created now. you just need to run the catalog.sql and catproc.sql scripts. You will find these script on the location: $ORACLE_HOME/rdbms/admin
SQL>@/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql
SQL>@/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc.sql
SQL> select name from v$database;
NAME
———
MY_DB
Finally now your database is ready to use.

How to Install Oracle 11g XE on Linux Fedora 17/18

Installing Oracle Database 11g XE on Fedora 17/18

[Oracle 11g Logo]
The following are the steps to install a Oracle 11g in fedora.
Step1:  Downloading the Software
Download the oracle-xe-11.2.0-1.0.x86_64.rpm.zip file from follwing url
Step2: Extracting the content
Extract the zip into any location. Here i am extracting the above zip into following location.
[ranga@ranga Disk1]$ pwd

/home/ranga/install/Disk1
[ranga@ranga Disk1]$ ls
oracle-xe-11.2.0-1.0.x86_64.rpm  response  upgrade
[ranga@ranga Disk1]$
Step3: Install libaio

[root@ranga Disk1]#  yum install libaio
Step4: Installing the oracle by using rpm command.
 
[root@ranga Disk1]# rpm -i oracle-xe-11.2.0-1.0.x86_64.rpm
Preparing… ########################################### [100%] 1:oracle-xe ########################################### [100%] Executing post-install steps… You must run ‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.
Your installation done but u need configure
Step5: Configuring the database
[root@ranga Disk1]# /etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration ————————————————- This will configure on-boot properties of Oracle Database 11g Express Edition. The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Press <enter> to accept the defaults. Ctrl-C will abort. Specify the HTTP port that will be used for Oracle Application Express [8080]: 9090 Specify a port that will be used for the database listener [1521]: Specify a password to be used for database accounts. Note that the same password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration: Confirm the password: Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y Starting Oracle Net Listener…Done Configuring database…Done Starting Oracle Database 11g Express Edition instance…Done Installation completed successfully.
In the above configuration, i am given port number is 9090 by default 8080 and database listener is same and you need to enter SYS or SYSTEM password. If you want while booting it self starting the database your giving ‘y’ in boot option. Finaly your database configured successfully. This installation created under /u01 directory.
Starting the Database manually : 
To start the database manually, run this command as root user:
# /etc/init.d/oracle-xe start
or
# /usr/lib/oracle/xe/app/oracle/product/11.2.0/server/bin/lsnrctl start
Stopping the Database manually:
To stop the database manually, run the following command as root user:

# /etc/init.d/oracle-xe stop

Un Install the Oracle 11g: 

Step1: First you need to check which oracle version is installed.
[ranga@ranga ~]$ rpm -qa | grep oracle
oracle-xe-11.2.0-1.0.x86_64
Step2:Uninstall the oracle by using rpm -e with which version it is installed.
[ranga@ranga ~]$ rpm -e

oracle-xe-11.2.0-1.0.x86_64

Installing Oracle 11g R2 Express Edition on Ubuntu 64-bit

              But at first, I must inform you about the limitations of Oracle 11g R2 Express Edition (XE) which are as follows :
  • The Installer released by Oracle is only meant for 64-bit (x86_64) systems. If you wish to install the 32-bit version , see installing oracle xe on ubuntu 32-bit
  • It will consume, at most, processing resources equivalent to one CPU.
  • Only one installation of Oracle Database XE can be performed on a single computer.
  • The maximum amount of user data in an Oracle Database XE database cannot exceed 11 GB.
  • The maximum amount of RAM that Oracle XE uses cannot exceed 1 GB, even if more is available.
Now the steps for Installation :
1) Download the Oracle 11gR2 express edition installer from the link given below:
( You will need to create a free oracle web account if you don’t already have it )
2) Unzip it :
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
3) Install the following packages :
sudo apt-get install alien libaio1 unixodbc vim
4) Convert the red-hat ( rpm ) package to Ubuntu-package :
sudo alien –scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
(Note: this may take a while , till that time you can go for step 5 )
5) Do the following pre-requisite things:
a) Create a special chkconfigscript :
The Red Hat based installer of Oracle XE 11gR2 relies on /sbin/chkconfig, which is not used in Ubuntu. The chkconfig package available for the current version of Ubuntu produces errors and my not be safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully:
sudo vim /sbin/chkconfig

(copy and paste the following into the file )
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo ‘### BEGIN INIT INFO’ >> $file
echo ‘# Provides: OracleXE’ >> $file
echo ‘# Required-Start: $remote_fs $syslog’ >> $file
echo ‘# Required-Stop: $remote_fs $syslog’ >> $file
echo ‘# Default-Start: 2 3 4 5’ >> $file
echo ‘# Default-Stop: 0 1 6’ >> $file
echo ‘# Short-Description: Oracle 11g Express Edition’ >> $file
echo ‘### END INIT INFO’ >> $file
fi
update-rc.d oracle-xe defaults 80 01

Save the above file and provide appropriate execute privilege :
       chmod 755 /sbin/chkconfig
b) Set the Kernel parameters :
Oracle 11gR2 XE requires to set the following additional kernel parameters:
sudo vim /etc/sysctl.d/60-oracle.conf
(Enter the following)
# Oracle 11g XE kernel parameters
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65000
kernel.sem=250 32000 100 128
kernel.shmmax=536870912
(Save the file)
Note: kernel.shmmax = max possible value , e.g. size of physical RAM ( in bytes e.g. 512MB RAM == 512*1024*1024 == 536870912 bytes )
Verify the change :
sudo cat /etc/sysctl.d/60-oracle.conf
Load newkernel parameters:
sudo service procps start
Verify: sudo sysctl -q fs.file-max
       -> fs.file-max = 6815744
c) Increase the system swap space :Analyze your current swap space by following command :
           free -m
Minimum swap space requirement of Oracle 11gR2 XE is 2 GB . In case, your is lesser , you can increase it by following steps in my one of previous post .
d) make some more required changes :
i) ln -s /usr/bin/awk /bin/awk
ii) mkdir /var/lock/subsys
iii) touch /var/lock/subsys/listener
6) Now you are ready to install Oracle 11gR2 XE. Go to the directory where you created the ubuntu package file in Step 4 and enter following commands in terminal :
i) sudo dpkg –install oracle-xe_11.2.0-2_amd64.deb
Update : Before you proceed to next step , do have a look at this trouble-shooting post in order to avoid MEMORY TARGET or any other “shared memory” error.
ii) sudo /etc/init.d/oracle-xe configure
Enter the following configuration information:
  • A valid HTTP port for the Oracle Application Express (the default is 8080)
  • A valid port for the Oracle database listener (the default is 1521)
  • A password for the SYS and SYSTEM administrative user accounts
  • Confirm password for SYS and SYSTEM administrative user accounts
  • Whether you want the database to start automatically when the computer starts (next reboot).
7) Before you start using Oracle 11gR2 XE you have to set-up more things :
a) Set-up the environmental variables :
Add following lines to your .bashrc :
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
b) execute your .profile to load the changes:
          . ./.profile
8) Start the Oracle 11gR2 XE :
sudo service oracle-xe start
The output should be similar to following :
user@machine:~$ sudo service oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 11g Express Edition instance.
user@machine:~$
8) Create your user :
a) start sqlplus and login as sys :
sqlplus sys as sysdba
( provide the password you gave while configuring the oracle in Step 6 (ii) ).
This should come to following :
SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:12:16 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 – 64bit Production
SQL>
b) Enter following on the sql prompt : Replace username and password by your desired ones.
SQL> create user username identified by password;
User created.
SQL> grant connect,resource to username;
Grant succeeded. 
9) Now as you have created the user , you can login to it :
user@machine:~$ sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:28:48 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter user-name: temp
Enter password:
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 – 64bit Production
SQL> select 2+2 from dual;
2+2
———-
4
SQL>

Removing Oracle Database XE from Linux

First off, check to see what Oracle RPMs are installed, and try removing them.

rpm -qa | grep oracle

rpm -e oracle-xe-univ

If you get an error here, move on to the next steps to manually remove XE. Remove the XE directories.

rm -Rf /usr/lib/oracle/xe
rm -Rf /etc/oratab
rm -Rf /etc/init.d/oracle-xe
rm -Rf /etc/sysconfig/oracle-xe
Your system no longer has any XE files and you can start again.

Installation of Oracle 10g Release 2 (10.2.0.1.0) on Fedora Core Linux 6

Dear friends,

Operating System Details:
Linux testserver 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux

Database Verison Details:
Oracle 10g Release 2 (10.2.0.1.0)

Download Software: (10201_database_linux32.zip) http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html

Pre-Installation tasks:

Creating DBA group and ORACLE user account in Linux

Login to the System as ROOT and execute the below commands.

$ su – root
Password:

# groupadd dba
# useradd –d “/home/oracle” –m –g dba oracle
# passwd oracle

Configuring Kernel Parameters

Check and edit the /etc/sysctl.conf file with the following lines.

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Note: Make sure to reboot the system or run the command ” /sbin/sysctl –p” to change the kernel parameters.

Add the following lines to the /etc/security/limits.conf file:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

session required /lib/security/pam_limits.so

Make sure that ” SELINUX=disabled” in the the /etc/selinux/config file

Edit the /etc/redhat-release file replacing the current release information (Fedora Core release 6 (Zod)) with redhat-4

Creating an Oracle Base Directory

# mkdir –p /u01/app/oracle
# mkdir –p /u01/app/oradata
# mkdir –p /u02/app/oradata

# chown –R oracle:dba /u01/app/oracle
# chown –R oracle:dba /u0 1/app/oradata /u02/app/oradata
# chmod –R 775 /u01/app/oracle
# chmod –R 775 /u0 1/app/oradata /u02/app/oradata

Setting Oracle Environment

Login as Oracle Unix user and change the .bash_profile with the following variables.

Su – oracle
Password:

ORACLE_HOME=/u01/app/oracle
ORACLE_SID=mydb
LD_LIBRARY_PATH=$ORACLE_HOME/lib
TNS_ADMIN=$ORACLE_HOME/network
PATH=$PATH:$ORACLE_HOME/bin

Export ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH TNS_ADMIN

Save the bash profile after changing: wq!

Insallation

Login as oracle and unzip the Oracle 10g software

Su – oracle
Password:

$ unzip 10201_database_linux32.zip

Check all pre-req packages are installed, if not install them

To check the packages information: # rpm –q
To install the packages: # rpm –q
Require packages for installation:

rpm -q binutils gcc glibc glibc-headers glibc-kernheaders glibc-devel compat-libstdc++ cpp compat-gcc make compat-db compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel openmotif openmotif21 setarch pdksh libaio libaio-devel

Important: For successful installation, the rpms “libXp-1.0.0-8.i386.rpm and libaio-0.3.106-3.2.i386.rpm” must have installed. Download these from : http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS

Go to database directory and launch the installer.

$./runInstaller

Provide the required information asked by wizards during installation.

Post – Installation tasks:

Edit the /etc/redhat-release file restoring the original release information:
Fedora Core release 6 (Zod)

I didn’t let DBCA to create the default database during the installation; I selected Install Software Only option. After the successful installation of Oracle 10g Software, I created the database manually with my requiremtns. The following are the particulars.

Login as oracel

Make sure that all the required environment variables are Set i.e. ORACLE_HOME and ORACLE_SID etc..

Prepare the initialization parameter with required values

Connect to SQL*Plus as sysdba

$ sqlplus /nolog
SQL> connect /as sysdba

Create the database with the following script.

SQL> startup nomount pfile= /initmydb.ora;

SQL> @$HOME/create_db_manually.sql

create_db_manually.sql file contains

CREATE DATABASE unic
USER SYS IDENTIFIED BY sys
USER SYSTEM IDENTIFIED BY manager
LOGFILE GROUP 1 (‘/u01/app/oradata/unic/redo01.log’) SIZE 50M,
GROUP 2 (‘/u01/app/oradata/unic/redo02.log’) SIZE 50M,
GROUP 3 (‘/u01/app/oradata/unic/redo03.log’) SIZE 50M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET WE8ISO8859P1
NATIONAL CHARACTER SET AL16UTF16
DATAFILE ‘/u02/app/oradata/unic/system01.dbf’ SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE ‘/u02/app/oradata/unic/sysaux01.dbf’ SIZE 325M REUSE
DEFAULT TABLESPACE users
datafile ‘/u02/app/oradata/unic/users01.dbf’
SIZE 20M REUSE
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE ‘/u02/app/oradata/unic/temp01.dbf’
SIZE 200M REUSE
UNDO TABLESPACE undotbs1
DATAFILE ‘/u02/app/oradata/unic/undotbs01.dbf’
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE 2000m;

Run Scripts to Build Data Dictionary Views

CONNECT SYS/password AS SYSDBA
SQL>@$ORACLE_HOME rdbmsadmincatalog.sql
SQL>@$ORACLE_HOME rdbmsadmincatproc.sql

Errors generated during the installation

>>Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2Failed

Edit the /etc/redhat-release file replacing the current release information (Fedora Core release 6 (Zod)) with redhat-4

>> Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-02-25_03-22-29PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred..java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-02-25_03-22-29PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directoryat java.lang.ClassLoader$NativeLibrary.load(Native Method)at java.lang.ClassLoader.loadLibrary0(Unknown Source)
……
……

Download and install the libXp-1.0.0-8.i386.rpm
http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/libXp-1.0.0-8.i386.rpm

#rpm –ivh libXp-1.0.0-8.i386.rpm

>> error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Download and install the libaio-0.3.106-3.2.i386.rpm
http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/libXp-1.0.0-8.i386.rpm

# rpm -ivh libaio-0.3.106-3.2.i386.rpm

References:

http://download-uk.oracle.com/docs/cd/B19306_01/install.102/b15660/toc.htm

http://www.puschitz.com/InstallingOracle10g.shtml

http://ivan.kartik.sk/oracle/install_ora10gR2_fedora.html

How to check the Physical RAM and Swap Space in Unix/Linux Systems.

 Following are the most requred OS commands while installing and configuring Oracle Software on Unix/Linux Operating Systems.

Operating System: AIX 5L Based Systems (64-Bit)
Physical RAM: # /usr/sbin/lsattr -E -l sys0 -a realmem
Swap Space: # /usr/sbin/lsps -a

Operating System: HP Tru64 UNIX
PPhysical RAM: # /bin/vmstat -P grep “Total Physical Memory”
Swap Space: # /sbin/swapon -s

Operating System: HP-UX Itanium
Physical RAM: # /usr/contrib/bin/machinfo grep -i Memory
Swap Space: # /usr/sbin/swapinfo -a

Operating System: HP-UX PA-RISC (64-Bit)
Physical RAM: # grep “Physical:” /var/adm/syslog/syslog.log
Swap Space: # /usr/sbin/swapinfo -a

Operating System: IBM zSeries Based Linux, LinuxItanium/POWER/x86/x86-64
Physical RAM: # grep MemTotal /proc/meminfo
Swap Space: # grep SwapTotal /proc/meminfo

Operating System: Solaris SPARC 64-Bit/x86/x86-64
Physical RAM: # /usr/sbin/prtconf grep “Memory size”
Swap Space: # /usr/sbin/swap -s

How to Apply Critical Patch Update (CPU) on RAC

Patch Details: Patch “CPUJULY2012”

CPU patch is released 4 times in a year JAN/APR/JUL/OCT

Version & Platform: 10.2.0.4 Database on LINUX

Overview: A Critical patch update (CPU) is a collection of patches for multiple security vulnerabilities. CPU patch are usually cumulative, which means fixes from previous Oracle security alerts and critical patch updates are included in current patch. However each advisory describes only the security fixes added since the critical patch update advisory. Thus it is not required to have previous security patches applied before applying the latest patches. However, you must be on the stated patch set level for a given product home before applying the latest patches for that release: Information about latest CPU patch

Note: Do not forget to read the README file from the patch before start the actual work.

  • – If this is a RAC environment, select one of the patch installation methods provided by OPatch (rolling, all node, or minimum downtime), and shutdown instances and listeners as appropriate for the installation method selected. This CPU patch is rolling RAC installable.
  • – If this is not a RAC environment, shut down all instances and listeners associated with the Oracle home that you are updating.

Repeat the Steps for each node of RAC

– Shutdown the Oracle instances and services or listener on node 1
– Apply the patch to the on node 1
– Start the Oracle instance of node 1
– Now Shutdown the Oracle instance on node 2
– Apply the patch to on node 2
– Start the Oracle instance of node 2

– Repeat this process as per the number of node.

  1. Download the CPU required patchset from Metalink
  2. Change the owner of the patch file to oracle user.

# chown –R oracle

  1. Set the PATH variable to locate the opatch utility.

$ export PATH=$PATH: $ORACLE_HOME/OPatch

  1. unzip the patch and go the unzipped directory

$unzip “patchfile.zip”

  1. Find and invoke the Opatch version

$ opatch version

OPatch Version: 10.2.0.4.2

$ opatch lsinventory

If you want check the CPU patch is whether rolling support or not, go to the patch directory

Cd /oracle/??  –patch directory

[oracle@rac1 ??]$ opatch query -all

  1. Backup the oraInventory and Opatch directory

$cp -R oraInventory old_oraInventory

$cp -R opatch old_opatch

  1. If you are Applying on RAC: Stop Instance/asm/nodeapps of node1

$ srvctl stop instance -d racdb –i racdb1

$ srvctl stop asm -n rac1

$ srvctl stop nodeapps -n rac1

  1. Go to the Patch Directory and invoke opatch apply.

$ cd ??  –patch directory

$opatch apply or $opatch napply -skip_subset -skip_duplicate

  1. Verify Patches are applied

$opatch lsinventory -detail -oh $ORACLE_HOME

  1. Now start the Node1 and repeat the same steps 7 to 9 for Node2
  2. Verify Patches are applied 

$opatch lsinventory -detail -oh $ORACLE_HOME

  1. Start the Instance/Asm/Nodeapps of node2

$srvctl start instance –d racdb –i racdb2

$srvctl start asm –n rac2

$srvctl start nodeapps –n rac2

$crs_stat –t

Post CPU Patch Steps:

For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus on each node. Connect as SYSDBA and run the catbundle.sql script:

On node1/node2:

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> STARTUP

SQL> @catbundle.sql cpu apply

SQL> @utlrp.sql

The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series CPU. Check the following log files for any errors:

catbundle_CPU__APPLY_.log, catbundle_CPU__GENERATE_.log on the path $ORACLE_HOME/cfgtoollogs/catbundle

Recompiling Views in the Database

If you already applied this during previous CPU installation then you can skip this section. To check whether view recompilation has already been performed:

SELECT * FROM registry$history where ID = ‘6452863’;

If the view recompilation has been performed, this statement returns one or more rows. If the view recompilation has not been performed, this statement returns no rows.

If no rows returns then go the following steps for RAC environment:

  1. Run the pre-check script, which reports the maximum number of views and objects that may be recompiled:

cd $ORACLE_HOME/cpu/view_recompile

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> @recompile_precheck_jan2010cpu.sql

Note: If the database is in RAC environment then perform both the steps otherwise (single instance db), perform only step1 skip the step 2.

cd $ORACLE_HOME/cpu/view_recompile

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP UPGRADE;

SQL> @view_recompile_jan2010cpu.sql

SQL> SHUTDOWN;

SQL> STARTUP;

  1. Stop all instances except the one where the view recompilation is being executed.

cd $ORACLE_HOME/cpu/view_recompile

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> STARTUP NOMOUNT;

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;

SQL> SHUTDOWN;

SQL> STARTUP UPGRADE;

SQL> @?/ cpu/view_recompile /view_recompile_jan2008cpu.sql

SQL> SHUTDOWN;

SQL> STARTUP NOMOUNT;

Set the CLUSTER_DATABASE initialization parameter to TRUE:

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;

Restart the database:

SQL> QUIT

cd $CRS_HOME/bin

srvctl start database -d racdb

If any invalid objects were reported, run the utlrp.sql script:

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> @utlrp.sql

Then, manually recompile any invalid objects:

SQL> alter package schemaname.packagename compile;

Verify Patches are applied.

$opatch lsinventory -detail -oh $CRS_HOME #if you have CRS_HOME

$opatch lsinventory -detail -oh $ORACLE_HOME #if you have both ORACLE_HOME

Oracle 11g Real Application Cluster Setup Steps on Linux

Prepare the cluster nodes for Oracle RAC:

User Accounts:

NOTE: Oracle recommend different users for the installation of the Grid Infrastructure (GI) and the Oracle RDBMS home. The GI will be installed in a separate Oracle base, owned by user ‘grid.’ After the grid install the GI home will be owned by root, and inaccessible to unauthorized users.

  1. Create OS groups using the command below. Enter these commands as the ‘root’ user:

#/usr/sbin/groupadd -g 501 oinstall

#/usr/sbin/groupadd -g 502 dba

#/usr/sbin/groupadd -g 503 oper

#/usr/sbin/groupadd -g 504 asmadmin

#/usr/sbin/groupadd -g 506 asmdba

#/usr/sbin/groupadd -g 507 asmoper

  1. Create the users that will own the Oracle software using the commands:

#/usr/sbin/useradd -u 501 -c “Oracle Grid Infrastructure Owner” -g oinstall -G asmadmin,asmdba,asmoper grid

#/usr/sbin/useradd -u 502 -c “Oracle RDBMS Owner” -g oinstall -G dba,oper,asmdba oracle

  1. Set the password for the oracle account using the following command. Replace password with your own password.

[root@krac1 ~]# passwd grid

Changing password for user grid.

New UNIX password:

BAD PASSWORD: it is based on a dictionary word

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

[root@krac1 ~]#passwd oracle

Changing password for user oracle.

New UNIX password:

BAD PASSWORD: it is based on a dictionary word

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

  1. Repeat Step 1 through Step 3 on each node in your cluster.

Networking:

  1. Determine your cluster name. The cluster name should satisfy the following conditions:The cluster name is globally unique throughout your host domain.  The cluster name is at least 1 character long and less than 15 characters long.  The cluster name must consist of the same character set used for host names: single-byte alphanumeric characters (a to z, A to Z, and 0 to 9) and hyphens (-).
  2. Determine the public host name for each node in the cluster. For the public host name, use the primary host name of each node. In other words, use the name displayed by the hostname command for example: kracnode1.
  3. Determine the public virtual hostname for each node in the cluster. The virtual host name is a public node name that is used to reroute client requests sent to the node if the node is down. Oracle recommends that you provide a name in the format <public hostname>-vip, for example: kracnode1-vip. The virtual hostname must meet the following requirements:
  •  The virtual IP address and the network name must not be currently in use.
  •  The virtual IP address must be on the same subnet as your public IP address.
  •   The virtual host name for each node should be registered with your DNS.
  1. Determine the private hostname for each node in the cluster. This private hostname does not need to be resolvable through DNS and should be entered in the /etc/hosts A common naming convention for the private hostname is <public hostname>-pvt.
  • The private IP should NOT be accessable to servers not participating in the local cluster.
  • The private network should be on standalone dedicated switch(es).
  • The private network should NOT be part of a larger overall network topology.
  • The private network should be deployed on Gigabit Ethernet or better.
  •  It is recommended that redundant NICs are configured with the Linux bonding driver. Active/passive  is the preferred bonding method due to its simplistic configuration.

[root@kracnode2 ~]#  nslookup kracnode1-vip

Server:         192.168.1.100

Address:        192.168.1.100#53

Name:   kracnode1-vip.india.com

Address: 192.168.1.60

[root@kracnode2 ~]#  nslookup kracnode2-vip

Server:         192.168.1.100

Address:        192.168.1.100#53

Name:   kracnode2-vip.india.com

Address: 192.168.1.61

  1. Define a SCAN DNS name for the cluster that resolves to three IP addresses (round-robin). SCAN IPs must NOT be in the /etc/hosts file, the SCAN name must be resolved by DNS. For DNS configuration setup refer blog Step by Step DNS configuration

[root@kracnode2 ~]# nslookup kracnode-scan

Server:         192.168.1.100

Address:        192.168.1.100#53

Name:   kracnode-scan.india.com

Address: 192.168.1.72

Name:   kracnode-scan.india.com

Address: 192.168.1.70

Name:   kracnode-scan.india.com

Address: 192.168.1.71

  1. Even if you are using a DNS, Oracle recommends that you add lines to the /etc/hosts file on each node, specifying the public IP, VIP and private addresses. Configure the /etc/hosts file so that it is similar to the following example:

NOTE: The SCAN IPs MUST NOT be in the /etc/hosts file. This will result in only 1 SCAN IP for the entire cluster. Refer more about Single Client Access Name(SCAN)

################################################################

####### ————— Local Host —————– ###########

################################################################

127.0.0.1         localhost.localdomain         localhost

################################################################

####### —————   eth0 – PUBLIC ———— ###########

################################################################

192.168.1.50      kracnode1.india.com           kracnode1

192.168.1.51      kracnode2.india.com           kracnode2

################################################################

####### ——————— VIP —————— ###########

################################################################

10.10.10.10       kracnode1-priv.india.com      kracnode1-priv

10.10.10.20       kracnode2-priv.india.com      kracnode2-priv

################################################################

####### —————-  eth1 – PRIVATE ———– ###########

################################################################

192.168.1.60      kracnode1-vip.india.com       kracnode1-vip

192.168.1.61      kracnode2-vip.india.com       kracnode2-vip

  1. If you configured the IP addresses in a DNS server, then, as the root user, change the hosts search order in /etc/nsswitch.conf on all nodes as shown here:

Old:

hosts: files nis dns

New:

hosts: dns files nis

After modifying the nsswitch.conf file, restart the nscd daemon on each node using the following

command:

# /sbin/service nscd restart

Synchronizing the Time on ALL Nodes:

[root@krac1 ~]# ls -lr /etc/ntp.conf

-rw-r–r– 1 root root 1833 Dec 9 2009 /etc/ntp.conf

[root@krac1 ~]# service ntpd stop

Shutting down ntpd:                                       [ OK ]

[root@krac1 ~]# mv /etc/ntp.conf /etc/ntp.conf.bkp

Configuring Kernel Parameter:

  1. As the root user add the following kernel parameter settings to /etc/sysctl.conf. If any of the arameters are already in the /etc/sysctl.conf file, the higher of the 2 values should be used.

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 6553600

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

NOTE: The latest information on kernel parameter settings for Linux can be found in My Oracle Support ExtNote:169706.1.

  1. Run the following as the root user to allow the new kernel parameters to be put in place:

#/sbin/sysctl -p

  1. Repeat steps 1 and 2 on all cluster nodes.

NOTE: OUI checks the current settings for various kernel parameters to ensure they meet the minimum requirements for deploying Oracle RAC.

  1. Set shell limits for the oracle and grid user:

To improve the performance of the software on Linux systems, you must increase the shell limits for the

oracle user

Add the following lines to the /etc/security/limits.conf file:

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

  1. Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

session required pam_limits.so

  1. Make the following changes to the default shell startup file, add the following lines to the /etc/profile file:

if [[ $USER = “oracle” ] || [ $USER = “grid” ]]; then

if [ $SHELL = “/bin/ksh” ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

For the C shell (csh or tcsh), add the following lines to the /etc/csh.login file:

if ( $USER = “oracle” || $USER = “grid” ) then

limit maxproc 16384

limit descriptors 65536

endif

  1. Repeat this procedure on all other nodes in the cluster.

Creating the directories.

  1. Create the Oracle Inventory Director:

To create the Oracle Inventory directory, enter the following commands as the root user:

# mkdir -p /u01/app/oraInventory

# chown -R grid:oinstall /u01/app/oraInventory

# chmod -R 775 /u01/app/oraInventory

  1. Creating the Oracle Grid Infrastructure Home Directory:

# mkdir -p /u01/11.2.0/grid

# chown -R grid:oinstall /u01/11.2.0/grid

# chmod -R 775 /u01/11.2.0/grid

  1. Creating the Oracle Base Directory

To create the Oracle Base directory, enter the following commands as the root user:

# mkdir -p /u01/app/oracle

# mkdir /u01/app/oracle/cfgtoollogs #needed to ensure that dbca is able to run after the rdbms installation.

# chown -R oracle:oinstall /u01/app/oracle

# chmod -R 775 /u01/app/oracle

  1. Creating the Oracle RDBMS Home Directory

To create the Oracle RDBMS Home directory, enter the following commands as the root user:

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

# chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1

# chmod -R 775 /u01/app/oracle/product/11.2.0/db_1

Check OS Software Requirements

The OUI will check for missing packages during the install and you will have the opportunity to install them at that point during the prechecks. Nevertheless you might want to validate that all required packages have been installed prior to launching the OUI.

NOTE: These Requirements are for 64-bit versions of Oracle Enterprise Linux 5 and RedHat? Enterprise Linux 5. Requirements for other supported platforms can be found in My Oracle Support ExtNote:169706.1.

binutils-2.15.92.0.2

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

elfutils-libelf-0.97

elfutils-libelf-devel-0.97

expat-1.95.7

gcc-3.4.6

gcc-c++-3.4.6

glibc-2.3.4-2.41

glibc-2.3.4-2.41 (32 bit)

glibc-common-2.3.4

glibc-devel-2.3.4

glibc-headers-2.3.4

libaio-0.3.105

libaio-0.3.105 (32 bit)

libaio-devel-0.3.105

libaio-devel-0.3.105 (32 bit)

libgcc-3.4.6

libgcc-3.4.6 (32-bit)

libstdc++-3.4.6

libstdc++-3.4.6 (32 bit)

libstdc++-devel 3.4.6

make-3.80

pdksh-5.2.14

sysstat-5.0.5

unixODBC-2.2.11

unixODBC-2.2.11 (32 bit)

unixODBC-devel-2.2.11

unixODBC-devel-2.2.11 (32 bit)

The following command can be run on the system to list the currently installed packages:

rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n’ binutils \

compat-libstdc++-33 \

elfutils-libelf \

elfutils-libelf-devel \

gcc \

gcc-c++ \

glibc \

glibc-common \

glibc-devel \

glibc-headers \

ksh \

libaio \

libaio-devel \

libgcc \

libstdc++ \

libstdc++-devel \

make \

sysstat \

unixODBC \

unixODBC-devel

Prepare the shared storage for Oracle RAC

This section describes how to prepare the shared storage for Oracle RAC Each node in a cluster requires external shared disks for storing the Oracle Clusterware (Oracle Cluster Registry and voting disk) files, and Oracle Database files. To ensure high availability of Oracle Clusterware files on Oracle ASM.

  • All of the devices in an Automatic Storage Management diskgroup should be the same size and have the same performance characteristics.
  • A diskgroup should not contain more than one partition on a single physical disk device. Using logical volumes as a device in an Automatic Storage Management diskgroup is not supported with Oracle RAC.
  • The user account with which you perform the installation (typically, ‘oracle’) must have write permissions to create the files in the path that you specify.

Shared Storage

For this example installation we will be using ASM for Clusterware and Database storage on top of SAN technology. The following Table shows the storage layout for this implementation:

Block Device ASMlib Name Size Comments
/dev/sdb OCR_VOTE01 1 GB ASM Diskgroup for OCR and Voting Disks
/dev/sdc OCR_VOTE02 1 GB ASM Diskgroup for OCR and Voting Disks
/dev/sdd OCR_VOTE03 1 GB ASM Diskgroup for OCR and Voting Disks
/dev/sde ASM_DATA01 4 GB ASM Data Diskgroup
/dev/sdf ASM_DATA02 4 GB ASM Data Diskgroup
/dev/sdg ASM_DATA03 4 GB ASM Flash Recovery Area Diskgroup
/dev/sdh ASM_DATA04 4 GB ASM Flash Recovery Area Diskgroup

Partition the Shared Disks:

This section describes how to prepare the shared storage for Oracle RAC.

  1. Once the LUNs have been presented from the SAN to ALL servers in the cluster, partition the LUNs from one node only, run fdisk to create a single whole-disk partition with exactly 1 MB offset on each LUN to be used as ASM Disk

[root@kracnode1 ~]# fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): u

Changing display/entry units to sectors

Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First sector (63-2097151, default 63):

Using default value 63

Last sector or +size or +sizeM or +sizeK (63-2097151, default 2097151):

Using default value 2097151

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@kracnode1 ~]#

Load the updated block device partition tables by running the following on ALL servers participating in the cluster:

#/sbin/partprobe

Installing and Configuring ASMLib:

The ASMLib is highly recommended for those systems that will be using ASM for shared storage within the cluster due to the performance and manageability benefits that it provides. Perform the following steps to install and configure ASMLib on the cluster nodes:

  1. Download the following packages from the ASMLib OTN page, if you are an Enterprise Linux customer you can obtain the software through the Unbreakable Linux network.

NOTE: The ASMLib kernel driver MUST match the kernel revision number, the kernel revision number of your system can be identified by running the “uname -r” command. Also, be sure to download the set of RPMs which pertain to your platform architecture, in our case this is i686.

oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm

oracleasmlib-2.0.4-1.el5.i386.rpm

oracleasm-support-2.1.7-1.el5.i386.rpm

  1. Install the RPMs by running the following as the root user.

[root@kracnode1]# rpm -Uvh oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm \

> oracleasm-support-2.1.7-1.el5.i386.rpm \

> oracleasmlib-2.0.4-1.el5.i386.rpm

warning: oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing…                ########################################### [100%]

1:oracleasm-support      ########################################### [ 33%]

2:oracleasm-2.6.18-194.el########################################### [ 67%]

3:oracleasmlib          ########################################### [100%]

[root@kracnode1]#

  1. Configure ASMLib by running the following as the root user:

[root@kracnode1 ~]# /etc/init.d/oracleasm configure

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library

driver. The following questions will determine whether the driver is

loaded on boot and what permissions it will have. The current values

will be shown in brackets (‘[]’). Hitting <ENTER> without typing an

answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: grid

Default group to own the driver interface []: asmdba

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver:                     [ OK ]

Scanning the system for Oracle ASMLib disks:               [ OK ]

[root@kracnode1 ~]#

  1. Repeat steps 2 – 4 on ALL cluster nodes.

Using ASMLib to Mark the Shared Disks as Candidate Disks:

To create ASM disks using ASMLib:

  1. As the root user, use oracleasm to create ASM disks using the following syntax:

# /usr/sbin/oracleasm createdisk disk_name device_partition_name

Example:

[root@kracnode1 ~]# /usr/sbin/oracleasm createdisk OCR_VOTE01 /dev/sdc1

Writing disk header: done

Instantiating disk: done

[root@kracnode1 ~]# /usr/sbin/oracleasm createdisk OCR_VOTE02 /dev/sdd1

Writing disk header: done

Instantiating disk: done

[root@kracnode1 ~]# /usr/sbin/oracleasm createdisk OCR_VOTE03 /dev/sde1

Writing disk header: done

Instantiating disk: done

[root@kracnode1 ~]# /usr/sbin/oracleasm createdisk ASM_DISK01 /dev/sdf1

Writing disk header: done

Instantiating disk: done

[root@kracnode1 ~]# /usr/sbin/oracleasm createdisk ASM_DISK02 /dev/sdg1

Writing disk header: done

Instantiating disk: done

[root@kracnode1 ~]# /usr/sbin/oracleasm createdisk ASM_DISK03 /dev/sdh1

Writing disk header: done

Instantiating disk: done

[root@kracnode1 ~]# /usr/sbin/oracleasm createdisk ASM_DISK04 /dev/sdi1

Writing disk header: done

Instantiating disk: done

[root@kracnode1 ~]#

  1. Repeat step 1 for each disk that will be used by Oracle ASM.

After you have created all the ASM disks for your cluster, use the listdisks command to verify their availability:

[root@kracnode1 ~]# /usr/sbin/oracleasm listdisks

ASM_DISK01

ASM_DISK02

ASM_DISK03

ASM_DISK04

OCR_VOTE01

OCR_VOTE02

OCR_VOTE03

  1. On all the other nodes in the cluster, use the scandisks command as the root user to pickup the newly created ASM disks. You do not need to create the ASM disks on each node, only on one node in the cluster.

[root@kracnode2 ]# /usr/sbin/oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks…

Scanning system for ASM disks…

[root@kracnode2 ]# /usr/sbin/oracleasm listdisks

ASM_DISK01

ASM_DISK02

ASM_DISK03

ASM_DISK04

OCR_VOTE01

OCR_VOTE02

OCR_VOTE03

[root@kracnode2 ]#

 

Oracle Grid Infrastructure Install. (Basic Grid Infrastructure Install (without GNS and IPMI))

./runInstaller

 Action: Select radio button ‘Install and Configure Grid Infrastructure for a Cluster’ and click ‘ Next> ‘

Action: Select radio button ‘Advanced Installation’ and click ‘ Next> ‘

Action: Accept ‘English’ as language’ and click ‘ Next> ‘

Action: Specify your cluster name and the SCAN name you want to use and click ‘ Next> ‘  
Note: Make sure ‘Configure GNS’ is NOT selected.
Action:Use the Edit and Add buttons to specify the node names and virtual IP addresses you configured previously in your /etc/hosts file. Use the ‘SSH Connectivity’ button to configure/test the passwordless SSH connectivity between your nodes.

ACTION: Type in the OS password for the user ‘grid’ and press ‘Setup’

Action:Click on ‘Interface Type’ next to the Interfaces you want to use for your cluster and select the correct values for ‘Public’, ‘Private’ and ‘Do Not Use’ . When finished click ‘ Next> ‘

Action:Select radio button ‘Automatic Storage Management (ASM) and click ‘ Next> ‘
Action:Select the ‘DiskGroup Name’ specify the ‘Redundancy’ and tick the disks you want to use, when done click ‘ Next> ‘

NOTE: The number of voting disks that will be created depend on the redundancy level you specify: EXTERNAL will create 1 voting disk, NORMAL will create 3 voting disks, HIGH will create 5 voting disks.

Action:Specify and conform the password you want to use and click ‘ Next> ‘

Action:Select NOT to use IPMI and click ‘ Next> ‘

Action: Assign the correct OS groups for OS authentication and click ‘ Next> ‘

Action:Specify the locations for your ORACLE_BASE and for the Software location and click ‘ Next> ‘
Action: Specify the locations for your Inventory directory and click ‘ Next> ‘

Note: OUI performs certain checks and comes back with the screen below

Action:Check that status of all checks is Succeeded and click ‘ Next> ‘

Action:Click ‘ Finish’

Action:Follow the instructions on the screen running the orainstRoot.sh and root.sh scripts as root on all  nodes before you click ‘OK’

NOTE: The required root scripts MUST BE RUN ON ONE NODE AT A TIME!
Sample root.sh output node 1:
#/u01/app/11.2.0/grid/root.sh

Running Oracle 11g root.sh script…

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin …

Copying oraenv to /usr/local/bin …

Copying coraenv to /usr/local/bin …

Creating /etc/oratab file…

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.

2009-09-25 20:58:00: Parsing the host name

2009-09-25 20:58:00: Checking for super user privileges

2009-09-25 20:58:00: User has super user privileges

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

LOCAL ADD MODE

Creating OCR keys for user ‘root’, privgrp ‘root’..

Operation successful.

root wallet

root wallet cert

root cert export

peer wallet

profile reader wallet

pa wallet

peer wallet keys

pa wallet keys

peer cert request

pa cert request

peer cert

pa cert

peer root cert TP

profile reader root cert TP

pa root cert TP

peer pa cert TP

pa peer cert TP

profile reader pa cert TP

profile reader peer cert TP

peer user cert

pa user cert

Adding daemon to inittab

CRS-4123: Oracle High Availability Services has been started.

ohasd is starting

CRS-2672: Attempting to start ‘ora.gipcd’ on ‘kracnode1’

CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.gipcd’ on ‘kracnode1’ succeeded

CRS-2676: Start of ‘ora.mdnsd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.gpnpd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘kracnode1’

CRS-2676: Start of ‘ora.cssdmonitor’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.cssd’ on ‘kracnode1’

CRS-2672: Attempting to start ‘ora.diskmon’ on ‘kracnode1’

CRS-2676: Start of ‘ora.diskmon’ on ‘kracnode1’ succeeded

CRS-2676: Start of ‘ora.cssd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.ctssd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.ctssd’ on ‘kracnode1’ succeeded

ASM created and started successfully.

DiskGroup OCR_VOTE created successfully.

clscfg: -install mode specified

Successfully accumulated necessary OCR keys.

Creating OCR keys for user ‘root’, privgrp ‘root’..

Operation successful.

CRS-2672: Attempting to start ‘ora.crsd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.crsd’ on ‘kracnode1’ succeeded

CRS-4256: Updating the profile

Successful addition of voting disk 24ce55bef20d4f4ebf16d733a91bc9d3.

Successfully replaced voting disk group with +DATA.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfully replaced

## STATE   File Universal Id               File Name Disk group

— —–   —————–              ——— ———

  1. ONLINE   24ce55bef20d4f4ebf16d733a91bc9d3 (ORCL:OCR_VOTE01) [OCR_VOTE]
  2. ONLINE   24ce55bef20d4f4ebf16d733a91bc9d3 (ORCL:OCR_VOTE02) [OCR_VOTE]
  3. ONLINE   24ce55bef20d4f4ebf16d733a91bc9d3 (ORCL:OCR_VOTE03) [OCR_VOTE]

Located 1 voting disk(s).

CRS-2673: Attempting to stop ‘ora.crsd’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.crsd’ on ‘kracnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.asm’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.asm’ on ‘kracnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.ctssd’ on ‘kracnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘kracnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.cssd’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.cssd’ on ‘kracnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.gpnpd’ on ‘kracnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.gipcd’ on ‘kracnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘kracnode1’

CRS-2677: Stop of ‘ora.mdnsd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.mdnsd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.gipcd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.gipcd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.gpnpd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘kracnode1’

CRS-2676: Start of ‘ora.cssdmonitor’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.cssd’ on ‘kracnode1’

CRS-2672: Attempting to start ‘ora.diskmon’ on ‘kracnode1′<blockquote><pre>

CRS-2676: Start of ‘ora.diskmon’ on ‘kracnode1’ succeeded

CRS-2676: Start of ‘ora.cssd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.ctssd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.ctssd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.asm’ on ‘kracnode1’

CRS-2676: Start of ‘ora.asm’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.crsd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.crsd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.evmd’ on ‘kracnode1’

CRS-2676: Start of ‘ora.evmd’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.asm’ on ‘kracnode1’

CRS-2676: Start of ‘ora.asm’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.DATA.dg’ on ‘kracnode1’

CRS-2676: Start of ‘ora.OCR_VOTE.dg’ on ‘kracnode1’ succeeded

CRS-2672: Attempting to start ‘ora.registry.acfs’ on ‘kracnode1’

CRS-2676: Start of ‘ora.registry.acfs’ on ‘kracnode1’ succeeded

kracnode1     2010/09/25 21:07:03     /u01/app/11.2.0/grid/cdata/kracnode1/backup_20090925_210703.olr

Preparing packages for installation…

cvuqdisk-1.0.7-1

Configure Oracle Grid Infrastructure for a Cluster … succeeded

Updating inventory properties for clusterware

Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 755 MB   Passed

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /u01/app/oraInventory

‘UpdateNodeList’ was successful.

#

Sample root.sh output node 2: 

#/u01/app/11.2.0/grid/root.sh

Running Oracle 11g root.sh script…

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin …

Copying oraenv to /usr/local/bin …

Copying coraenv to /usr/local/bin …

Creating /etc/oratab file…

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.

2009-09-25 21:08:32: Parsing the host name

2009-09-25 21:08:32: Checking for super user privileges

2009-09-25 21:08:32: User has super user privileges

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

LOCAL ADD MODE

Creating OCR keys for user ‘root’, privgrp ‘root’..

Operation successful.

Adding daemon to inittab

CRS-4123: Oracle High Availability Services has been started.

ohasd is starting

CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac1, number 1, and is terminating

CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘kracnode2’

CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘kracnode2’ succeeded

An active cluster was found during exclusive startup, restarting to join the cluster

CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘kracnode2’

CRS-2676: Start of ‘ora.mdnsd’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.gipcd’ on ‘kracnode2’

CRS-2676: Start of ‘ora.gipcd’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘kracnode2’

CRS-2676: Start of ‘ora.gpnpd’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘kracnode2’

CRS-2676: Start of ‘ora.cssdmonitor’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.cssd’ on ‘kracnode2’

CRS-2672: Attempting to start ‘ora.diskmon’ on ‘kracnode2’

CRS-2676: Start of ‘ora.diskmon’ on ‘kracnode2’ succeeded

CRS-2676: Start of ‘ora.cssd’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.ctssd’ on ‘kracnode2’

CRS-2676: Start of ‘ora.ctssd’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.drivers.acfs’ on ‘kracnode2’

CRS-2676: Start of ‘ora.drivers.acfs’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.asm’ on ‘kracnode2’

CRS-2676: Start of ‘ora.asm’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.crsd’ on ‘kracnode2’

CRS-2676: Start of ‘ora.crsd’ on ‘kracnode2’ succeeded

CRS-2672: Attempting to start ‘ora.evmd’ on ‘kracnode2’

CRS-2676: Start of ‘ora.evmd’ on ‘kracnode2’ succeeded

kracnode2     2010/09/25 21:13:55     /u01/app/11.2.0/grid/cdata/kracnode2/backup_20090925_211355.olr

Preparing packages for installation…

cvuqdisk-1.0.7-1

Configure Oracle Grid Infrastructure for a Cluster … succeeded

Updating inventory properties for clusterware

Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 1036 MB   Passed

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /u01/app/oraInventory

‘UpdateNodeList’ was successful.

Action: Wait for the OUI to finish the cluster configuration.

Action: You should see the confirmation that installation of the Grid Infrastructure was successful. Click ‘Close’ to finish the install.

RDBMS Software Install:

change into the directory where you staged the RDBMS software

./runInstaller

 

Action: Provide your e-mail address, tick the check box and provide your Oracle Support Password if you want to receive Security Updates from Oracle Support and click ‘ Next> ‘

Action: Select the option ‘Install Database software only’ and click ‘ Next> ‘

Action: Select ‘Real Application Clusters database installation’, and select all nodes. Use the ‘SSH Connectivity’ button to configure/test the passwordless SSH connectivity between your nodes ‘

 Action: Type the Oracle user password and click “Setup”

Action: To confirm English as selected language click ‘ Next> ‘

Action: Make sure radio button ‘Enterprise Edition’ is ticked, click ‘ Next> ‘

Action: Specify path to your Oracle Base and below to the location where you want to store the software (Oracle home). Click ‘ Next> ‘

Action:Use the drop down menu to select the names of the Database Administrators and Database perators group and click ‘ Next> ‘

Action: Check that the status of all checks is ‘Succeeded’ and click ‘ Next> ‘ 

Note: If you are sure the unsuccessful checks can be ignored tick the box ‘Ignore All’ before you click ‘ Next> ‘

Action: Perfrom a last check that the information on the screen is correct before you click ‘ Finish ‘

 

Action: Log in to a terminal window as root user and run the root.sh script on the first node. When finished do the same for all other nodes in your cluster as well. When finished click ‘OK’

NOTE: root.sh should be run on one node at a time.

Action: Click ‘ Close ‘ to finish the installation of the RDBMS Software.

Run ASMCA to create diskgroups

As the grid user start the ASM Configuration Assistant (ASMCA)

#su – grid

cd /u01/11.2.0/grid/bin

./asmca

Action: Click ‘Create’ to create a new diskgroup

Action: Type in a name for the diskgroup, select the redundancy you want to provide and mark the tick box for the disks you want to assign to the new diskgroup. Click

Repeat the same steps create the diskgroup for the flash recovery area.

Action: Click ‘Exit’

Run DBCA to create the database

As the oracle user start the Database Configuration Assistant (DBCA)

#su – oracle

cd /u01/app/oracle/product/11.2.0/db_1/bin

./dbca

Action: choose option ‘Create a Database’ and click ‘Next’

Action: Select the database template that you want to use for your database and click ‘Next’

Action: Type in the name you want to use for your database and select all nodes before you click ‘Next’

Action: select the options you want to use to manage your database and click ‘Next’

Action: Type in the passwords you want to use and click ‘Next’

Action: Select the diskgroup you created for the database files and click ‘Multiplex Redo Logs and Control Files’. In the popup window define the diskgroup that should contain controlfiles and redo logfiles and the diskgroup that should contain the mirrored files.

 

Action : Enter the ASMSNMP Password and click “OK”

Action: Specify the diskgroup that was created for the flash recovery area and define the size. If the size is smaller than recommended a warning will popup.

Action: Select if you want to have sample schemas created in your database and click ‘Next’

Action: Review and change the settings for memory allocation, characterset etc. according to your needs and click ‘Next’

Action: Review the database storage settings and click ‘Next’

Action: Review the database storage settings and click ‘Next’

Action: The database is now created, you can either change or unlock your passwords or just click Exit to finish the database creation.

Ref:http://dnccfg.blogspot.in/2012/09/koracle11gr2racsetup.html