How to Install Oracle 11g on Linux with ASM


ASK A QUESTION, ANSWER A QUESTION. CHECK OUT OUR NEW FORUMS

Background & Overview

The following documentation provides instructions for building an Oracle 11g database with ASM residing on an Oracle Linux Server (Version 5.3, Kernal version 2.6.18). Use the command lsb_release -id to check the Oracle Linux OS version and uname -r to check the Kernal level.

Further reference documentation about Oracle 11g and Oracle Linux is detailed in the Other References section below.

Assumptions & Pre-Requisites

This document expects and assumes the following:

  • The instructions are carried out by a qualified DBA.
  • Access to the internet is available.
  • All necessary client software, e.g. Telnet and X-Server is available.
  • The resultant database will be standalone, i.e. not part of a cluster or failover configuration.
    • Documentation for clustered (RAC) configurations can be found here. - Add link when documentation available_
    • Documentation for failover configurations can be found here. - Add link when documentation available
  • All references to SID should be replaced with correct database name as derived using a suitable database naming standard.
  • All $variable references assume the .profile as described in the File Listings section has been implemented and run.
  • There is only ONE database installed on the server.

Useful Information

This section outlines useful information and changes to previous 10g documentation found on this site. Some have been made for cosmetic reasons, others for more practical considerations.

  • A new deinstallation tool is used for deinstalling Oracle software and databases. See Deinstalling Oracle 11g section below.
  • On Linux the oratab and the oraInst.loc file is kept in directory /etc.
  • A new directory structure exists. See below.
  • A new init.ora parameter called diag_dest has been set and maps to the diag directory in the new directory structure mentioned above.
  • A listener.ora file has a new parameter called ADR_BASE_LISTENER. This maps to the base of the diag directory.
  • There are a number of new maintenance jobs in 11g. These will be turned off as part of this step-by-step guide.
  • In order to get the database working with ASM, Oracle Grid Infrastructure will need to be installed. This should not be mistaken for Oracle Grid Control. The following guide explains how to install Oracle Grid Infrastructure and any pre-requisite packages like ASMLIB.
  • At the time of writing this guide there are no supported Veritas Cluster agents for database version 11.2.

Step-By-Step Guide

1. Get a UNIX administrator to check the following Metalink article 169706.1 to ensure that the SE Linux build meets Oracle's requirements.

2. Ensure oracle account and dba group exists.

3. Ensure the Oracle Linux version is 5.3 or higher.

  • lsb_release -id

4. Ensure the Oracle Linux Kernal version is 2.6.18 or higher.

  • uname -r

5. Ask a UNIX administrator to check that the correct OS packages have been installed as detailled in the Packages for Oracle Enterprise Linux v5 section below.

6. Ensure that SHMMAX is set to 4Gb minus 1 byte. This is to accomodate feature/bug detailled in Metalink nore 567506.1.

  • grep -i shmmax /etc/sysctl.conf

7. Ensure net.ipv4.ip_local_port_range is set to 9000 to 65500

8. Get a Unix administrator to set the machine to permissive mode.

  • setenforce 0

9. Check the machine is in permissive mode.

  • getenforce

NB This is required due to a bug/feature in Oracle.

10. Ensure /dev/shm is large enough. It should be set to the size of the physical RAM minus 4GB. (or an appropriate amount reserved for the OS)

  • cd /dev/shm
  • df -h .

11. Ask a Unix administrator to install ASMLIB. At the time of writing this guide, the following Linux package had been identified by the Unix team, oracleasm-2.6.18-128.4.1.0.1.el5-2.0.5-1.el5.x86_64.rpm. This will install the follwing ASM 2.0 libraries

  • oracleasmlib-2.0 ~ The ASM libraries
  • oracleasm-support-2.0 ~ Utilities needed to administer ASMLib
  • oracleasm ~ A kernel module for the ASM library

12. Ask a Unix administrator to create a single partition on each device to be used by ASM.

  • fdisk /dev/mapper/< alias >
  • kpartx /dev/mapper/< alias >< partition >

13. Ask a Unix administrator to create the ASM disks

  • oracleasm createdisk < disk label > /dev/mapper/< alias >< partition >

14. Create and run .profile - see File Listings section below.

15. Ensure the database file systems have been created with correct permissions and have been sized appropriately for the application. - see File Systems section below.

16. Download the latest oracle binaries from OTN. For example:

Enterprise Edition for Linux Operating System (64-bit)
linux.x64_11gR2_database_1of2.zip : 1,239,269,270 bytes; cksum - 3152418844
linux.x64_11gR2_database_2of2.zip : 1,111,416,131 bytes; cksum - 3669256139
linux.x64_11gR2_grid.zip : 1,052,897,657 bytes; cksum - 3369676398

17. Unzip the downloaded files using the following commands

  • cd /u01/app/oracle/software/
  • unzip <filename>

18. Configure the DISPLAY variable.

19. Unset the ORACLE_HOME and TNS_ADMIN

  • unset ORACLE_HOME
  • unset TNS_ADMIN

20. Set the ORACLE_BASE

  • export ORACLE_BASE=/u01/app/oracle

21. Ensure ORACLE_HOME/bin is NOT in the PATH

22. Start x-server.

23. Start the installer.

  • cd /u01/app/oracle/software/grid
  • ./runInstaller

24. Follow the instructions as demonstrated in the Example ASM Install section below.

Before continuing apply any oneoff patches or patch bundles or CPU patch bundles recommended by Oracle or the application vendor.

25. Create additional ASM Disk Groups

  • sqlplus '/ as sysasm'
  • SQL> create diskgroup FRA EXTERNAL REDUNDANCY
  • SQL> disk 'ORCL:asm disk label' ;
  • SQL> exit;

26. Create the ADM aliases

  • sqlplus '/ as sysasm'
  • SQL> alter diskgroup DATA add directory '+DATA/<SID>';
  • SQL> alter diskgroup FRA add directory '+FRA/< SID >';
  • SQL> alter diskgroup FRA add directory '+FRA/< SID >/arch';
  • SQL> exit;

27. Alter the disk group attributes to 11.2 compatability.

  • sqlplus '/ as sysasm'
  • SQL> alter diskgroup DATA set attribute 'compatible.asm'='11.2';
  • SQL> alter diskgroup DATA set attribute 'compatible.rdbms'='11.2';
  • SQL> alter diskgroup FRA set attribute 'compatible.asm'='11.2';
  • SQL> alter diskgroup FRA set attribute 'compatible.rdbms'='11.2';
  • SQL> exit;

28. Disable the high availability services.

  • crsctl disable has

29. Create the ASM init.ora.

  • Using vi create file $ORACLE_HOME/dbs/init+ASM.ora as defined in the ASM Parameter File section below.

30. Create a password file for ASM

  • cd $ORACLE_HOME/dbs
  • rm orapw+ASM
  • orapwd file=orapw+ASM password=password

31. Shutdown ASM

  • sqlplus '/ as sysasm'
  • SQL> shutdown immediate
  • SQL> quit

32. Startup ASM on the new pfile and create an spfile

  • sqlplus '/ as sysasm'
  • SQL> startup pfile='$ORACLE_HOME/dbs/init+ASM.ora'
  • SQL> create spfile='+DATA' from pfile='$ORACLE_HOME/dbs/init+ASM.ora';
  • SQL> shutdown immediate
  • SQL> quit

33. Remove old init.ora files

  • cd $ORACLE_HOME/dbs
  • rm init.ora
  • rm init+ASM.ora

34. Startup ASM on the new spfile

  • sqlplus '/ as sysasm'
  • SQL> startup
  • SQL> quit

35. Enable, Stop and Start the High Availability Service.

  • crsctl enable has
  • crsctl stop has
  • crsctl start has

36. Configure the DISPLAY variable.

37. Unset the ORACLE_HOME and TNS_ADMIN

  • unset ORACLE_HOME
  • unset TNS_ADMIN

38. Start x-server.

39. Start the installer.

  • cd /u01/app/oracle/software/database
  • ./runInstaller

40. Follow the instructions as demonstrated in the Example Install section below.

Before continuing apply any oneoff patches or patch bundles or CPU patch bundles recommended by Oracle or the application vendor.

41. Configure /etc/oratab file and test using . oraenv command - see File Listings section below.

42. Configure $ORACLE_BASE/admin/SID/create/createdb.sql file, adjusting parameters accordingly - see File Listings section below.

43. Configure $ORACLE_BASE/admin/SID/pfile/initSID.ora file, adjusting parameters accordingly and create symbollic link to it from $ORACLE_HOME/dbs - see File Listings section below.

44. Remove template init.ora file from $ORACLE_HOME/dbs.

45. Configure Oracle environment variables using the following commands:

  • . oraenv
  • SID

46. Set-up a $ORACLE_HOME/network/admin/listener.ora file as detailed in the File Listings below.

47. Start the listener using the command lsnrctl start.

48. Build the embryo database using the following commands:

  • cd $ORACLE_HOME/dbs
  • orapwd file=orapwSID password=<password>
  • cd $ORACLE_BASE/admin/SID/create
  • sqlplus '/ as sysdba'
  • SQL> @createdb.sql
    • Enter SYS password.
    • Enter SYSTEM password.
    • Enter SID name.
    • Wait for database to build - this may take up to 30 mins…
  • Confirm there are no unexpected errors in $ORACLE_BASE/admin/SID/create/createdb.log.
  • SQL> connect / as sysdba
  • SQL> CREATE SPFILE='/u01/app/oracle/admin/SID/pfile/spfileSID.ora' FROM PFILE='/u01/app/oracle/admin/SID/pfile/initSID.ora';
  • SQL> shutdown immediate
  • SQL> exit
  • rm initSID.ora
  • ln -s /u01/app/oracle/admin/SID/pfile/spfileSID.ora spfileSID.ora
  • sqlplus '/ as sysdba'
  • SQL> startup
  • SQL>quit

49. Disable the default 11g maintenance jobs.

  • sqlplus /nolog
  • SQL> connect sys as sysdba
  • SQL> BEGIN
  • SQL> dbms_auto_task_admin.disable(client_name => 'auto optimizer stats collection', operation => NULL,window_name => NULL);
  • SQL> dbms_auto_task_admin.disable(client_name => 'auto space advisor', operation => NULL, window_name => NULL);
  • SQL> dbms_auto_task_admin.disable(client_name => 'sql tuning advisor', operation => NULL, window_name => NULL);
  • SQL> END;
  • SQL> /

50. Confirm database has been recognised by the listener using the command lsnrctl status - this may take a minute or so to occur.

51. Remove unwanted files

  • cd $TNS_ADMIN
  • rm -rf samples

52. Configure $TNS_ADMIN/tnsnames.ora file, adjusting parameters accordingly - see File Listings section below.

53. Confirm connections via SQLnet are working using the following commands:

  • sqlplus system/<password>@SID
  • SQL> exit

How to Disable Oracle HAS

1. Disable Oracle HAS

  • crsctl disable has

Security Compliance

The following steps should be performed once the database has been built to ensure that the environment conforms to Oracle's Best Practices and also ensures that it doesn't fall foul of Internal Audit.

1. Remove the GRANT EXECUTE TO PUBLIC privilege from potentially harmful packages.

  • sqlplus '/ as sysdba'
  • SQL> revoke execute on utl_file from public;
  • SQL> revoke execute on dbms_random from public;
  • SQL> revoke execute on utl_http from public;
  • SQL> revoke execute on utl_smtp from public;
  • SQL> revoke execute on utl_tcp from public;
  • SQL> exit

2. Ensure the following user-ids' passwords, where applicable, have been changed:

  • SYS
  • SYSTEM
  • DBSNMP
  • OUTLN
  • CTXSYS
  • PERFSTAT

1. Adjust the database DEFAULT TABLESPACE settings so that the SYSTEM tablespace is not used inappropriately.

  • sqlplus '/ as sysdba'
  • SQL> alter database default tablespace users;
  • SQL> alter user sys default tablespace system;
  • SQL> alter user system default tablespace system;

2. Correct any users that already have SYSTEM as their DEFAULT TABLESPACE

  • sqlplus '/ as sysdba'
  • SQL> select username, default_tablespace from dba_users where default_tablespace = 'SYSTEM';
  • SQL> alter user <user name> default tablespace <non-SYSTEM tablespace>;
  • SQL> exit

3. Lock and expire potentially harmful built-in user-ids.

  • sqlplus '/ as sysdba'
  • SQL> alter user outln password expire account lock;
  • SQL> alter user dbsnmp password expire account lock;
  • SQL> exit

Regression

To restore the environment back to its initial state, perform the following

1. Shutdown the database and listener.

2. Remove all database files, binaries, trace files and administration logs using the deinstall tool - see Miscellaneous Section below.

File Listings

oracle .profile

#----------------------------------------------------------------------
# Configure Terminal Settings.
#----------------------------------------------------------------------
stty susp ^Z
stty quit ^C
stty erase ^H
export TERM=vt100-w
export ORACLE_TERM=vt100

#----------------------------------------------------------------------
# Configure Shell Settings.
#----------------------------------------------------------------------
set -o vi
export PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/ccs/bin:$PATH
export EDITOR=vi
export HOSTNAME=‘hostname`
export PS1=’$LOGNAME@$HOSTNAME:$ORACLE_SID> '
export TMPDIR=/tmp
export TEMP=/tmp
umask 022

#----------------------------------------------------------------------
# Configure Aliases.
#----------------------------------------------------------------------
alias ll="ls -la"
alias bdf="df -k"

#----------------------------------------------------------------------
# Configure Oracle Settings.
#----------------------------------------------------------------------
export ORACLE_BASE=/u01/app/oracle
export SQLPATH=$ORACLE_BASE/scripts/sql
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_HOME_LISTNER=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORATAB=/etc/oratab

oratab

SID:/u01/app/oracle/product/11.2.0/dbhome_1:Y
+ASM:/u01/app/oracle/product/11.2.0/grid:N

listener.ora

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = <SID>)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = <SID>)
)
)

LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <hostname>)(PORT = 1521))
)

ADR_BASE_LISTENER = /u01/app/oracle

ASM Parameter File

###########################################
# Cache and I/O
###########################################
large_pool_size = 12m

###########################################
# ASM Instance Parameters
###########################################
instance_type = asm
asm_power_limit = 1

###########################################
# Security and Diagnostics
###########################################
remote_login_passwordfile = exclusive
diagnostic_dest = '/u01/app/oracle'

###########################################
# Disk Groups
###########################################
asm_diskstring = '/dev/oracleasm/disks/*'
asm_diskgroups = 'DATA','FRA'

initSID.ora

###########################################
# Cache and I/O
###########################################
db_block_size=8192
memory_target=1606418432
db_block_checking=MEDIUM
db_block_checksum='FULL'

###########################################
# Cursors and Library Cache
###########################################
open_cursors=500

###########################################
# Database Identification
###########################################
compatible='11.2.0.0.0'
db_name='SID'

###########################################
# Diagnostics and Statistics
###########################################
diagnostic_dest='/u01/app/oracle'

###########################################
# File Configuration
###########################################
control_files='+DATA/SID/control01.ctl','+DATA/SID/control02.ctl','+DATA/SID/control03.ctl'

###########################################
# Processes
###########################################
processes=1000

###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_tablespace='UNDO'

###########################################
# Security and Auditing
###########################################
audit_trail='db'
remote_login_passwordfile='EXCLUSIVE'

###########################################
# Enabling Archivelog mode
###########################################
log_archive_dest='+FRA/SID/arch/d1'
log_archive_format=arch_%t_%s_%r.log

###########################################
# Defer Segment Creation
###########################################
deferred_segment_creation=FALSE

createdb.sql

--
-- Title : createdb.sql
-- Description : Build an empty database.
--
-- Usage/Notes : For use with 11g databases.
-- Required answers for SYS,
-- SYSTEM and SID.
--
--

ACCEPT syspw PROMPT 'Enter SYS password : '
ACCEPT systpw PROMPT 'Enter SYSTEM password : '
ACCEPT sid PROMPT 'Enter SID name : '

SET VERIFY OFF
SET ECHO ON

SPOOL createdb.log

STARTUP NOMOUNT

CREATE DATABASE &sid
USER SYS IDENTIFIED BY &syspw
USER SYSTEM IDENTIFIED BY &systpw
MAXDATAFILES 1024
MAXINSTANCES 1
MAXLOGFILES 32
MAXLOGMEMBERS 4
MAXLOGHISTORY 100
CHARACTER SET AL32UTF8
ARCHIVELOG
DATAFILE '+DATA/&sid/system_01.dbf'
SIZE 400m
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '+DATA/&sid/sysaux_01.dbf'
SIZE 400m
LOGFILE
GROUP 1 ('+DATA/&sid/redo001a.dbf','+FRA/&sid/redo001b.dbf')
SIZE 50m,
GROUP 2 ('+DATA/&sid/redo002a.dbf','+FRA/&sid/redo002b.dbf')
SIZE 50m,
GROUP 3 ('+DATA/&sid/redo003a.dbf','+FRA/&sid/redo003b.dbf')
SIZE 50m,
GROUP 4 ('+DATA/&sid/redo004a.dbf','+FRA/&sid/redo004b.dbf')
SIZE 50m
UNDO TABLESPACE undo
DATAFILE '+DATA/&sid/undo_01.dbf'
SIZE 400m
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE '+DATA/&sid/temp_01.dbf'
SIZE 400m
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1m
/

SET ECHO OFF

PROMPT
PROMPT
PROMPT Now running CATALOG. Please wait….
PROMPT
PROMPT

SET TERMOUT OFF

@${ORACLE_HOME}/rdbms/admin/catalog

SET TERMOUT ON

PROMPT
PROMPT
PROMPT Now running CATBLOCK. Please wait….
PROMPT
PROMPT

SET TERMOUT OFF

@${ORACLE_HOME}/rdbms/admin/catblock

SET TERMOUT ON

PROMPT
PROMPT
PROMPT Now running CATPROC. Please wait….
PROMPT
PROMPT

SET TERMOUT OFF

@${ORACLE_HOME}/rdbms/admin/catproc

SET TERMOUT ON

SET ECHO ON

CREATE TABLESPACE tools
DATAFILE '+DATA/&sid/tools_01.dbf' SIZE 400m
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTO
/

CREATE TABLESPACE users
DATAFILE '+DATA/&sid/users_01.dbf' SIZE 400m
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTO
/

CREATE TABLESPACE indx
DATAFILE '+DATA/&sid/indx_01.dbf' SIZE 400m
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTO
/

CREATE USER ops$oracle IDENTIFIED EXTERNALLY
DEFAULT TABLESPACE users
/

GRANT DBA TO ops$oracle
/

CONN system/&systpw

SET ECHO OFF

PROMPT
PROMPT
PROMPT Now running PUPBLD. Please wait….
PROMPT
PROMPT

SET TERMOUT OFF

@?/sqlplus/admin/pupbld.sql

SET TERMOUT ON

CONN system/&systpw

SET ECHO OFF

PROMPT
PROMPT
PROMPT Now running HLPBLD. Please wait….
PROMPT
PROMPT

SET TERMOUT OFF

@?/sqlplus/admin/hlpbld.sql

SET TERMOUT ON
SET ECHO ON

SPOOL OFF

tnsnames.ora

<SID> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = <hostname>)(PORT = 1521))
(CONNECT_DATA = (SID = <SID>))
)

File Systems

--- /u01 --- /app --- /oraInventory
|aaaaaaaaaaaaaa|
|aaaaaaaaaaaaaa--- /oracle --- /software
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /dba --- /scripts
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa|aaaaaaa--- /sql
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /diag
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /product ---/11.2.0 ---/dbhome_1
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /product ---/11.2.0 ---/grid
|aaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaa--- /admin --- /SID --- /adump
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /create
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /exp
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|aa (link to /u09)
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /parfile
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /pfile
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--- /scripts ---/base ---/rfc
|
|
|
--- /u09 --- /oradata --- /SID -------- /exp ------- /d1

Example ASM Install


ogi1.jpg
  • Select Install and Configure Grid Infrastructure for a Standalone Server
  • Click Next

ogi2.jpg
  • Click Next

ogi3.jpg
  • Set Disk Group Name to DATA
  • Ensure the Redundancy radio button is set to External
    • NB It is assumed that external disk infrastricture will mirror the disks. If not, review this option.
  • Ensure the Candidate Disk radio button is selected.
  • Tick the box next to the candidate disk(s) you wish to add to the disk group.
  • Click Next

ogi4.jpg
  • Select Use same passwords for these accounts
  • Enter a valid password in the Specify Password box.
  • Enter a valid password in the Confirm Password box.

ogi5.jpg
  • NB If you specified an insecure password, the following message will be displayed.

ogi6.jpg
  • Set the ASM Database Administrator (OSDBA) Group to dba
  • Set the ASM Instance Administration Operator (OSOPER) Group to dba
  • Set the ASM Instance Administrator (OSASM) Group to dba
    • NB These options will be site specific and should be reviewed.
  • Click Next

ogi7.jpg
  • Click Yes to continue.

ogi8.jpg
  • Ensure Oracle Base is set to /u01/app/oracle
  • Click Next

ogi9.jpg
  • Ensure the Inventory Directory is set to /u01/app/oraInventory
  • Click Next

ogi10.jpg
  • Review the Summary screen
  • Click Finish

ogi10a.jpg
  • As root, ask the UNIX administrator to run /u01/app/oraInventory/orainstRoot.sh
  • As root, ask the UNIX administrator to run /u01/app/oracle/product/11.2.0/grid/root.sh
  • Click Yes

ogi11.jpg
  • Click Close

Example Database Install


11gOracleInstall_01.JPG
  • Un-tick the I wish to receive security updates via My Oracle Support box.
    • NB This is site specific and should be reviewed.
  • Click Next.

11gOracleInstall_02.JPG
  • Click Yes to remain uninformed.

11gOracleInstall_03.JPG
  • Select Install database software only.
  • Click Next.

11gOracleInstall_04.JPG
  • Ensure Single instance database installation is selected.
  • Click Next.

11gOracleInstall_05.JPG
  • Ensure languages Englsih and English (United Kingdom) are selected.
  • Click Next.

11gOracleInstall_06.JPG
  • Ensure Enterprise Edition is selected.
  • Click Next.

11gOracleInstall_07.JPG
  • Set Oracle Base to /u01/app/oracle
  • Allow Software Location to default
  • Click Next.

11gOracleInstall_08.JPG
  • Ensure Database Administrator (OSDBA) Group is set to dba
  • Ensure Database Operator (OSOPER) Group is set to dba
  • Click Next

11gOracleInstall_09.JPG
  • Review the summary.
  • If required save the response file by selecting Save Response File
  • Click Finish

11gOracleInstall_10.JPG
  • This screen moves on automatically when complete.

11gOracleInstall_11.JPG
  • Ask Unix Administrator to run root.sh. - Note: There is a known issue with running this script. See here.
  • Click OK.

11gOracleInstall_12.JPG
  • Click Close.

Other References

Known Issues

ORA-7445 [kokscold()+849]

Description

This is due to unpublished Bug 9594372, documented in Note 1115493.1 and occurs when running SQL_ANALYZE from a scheduled job. The SQL statement is likely to be similar to the following.

/* SQL Analyze(397,1) */ MERGE INTO MGMT_ARU_PATCH_RECOMMENDATIONS p USING ..

Fix

Apply patch 9594372


Running root.sh on the Database

Description

When running root.sh you are prompted for the local bin directory. The default directory is specified in square brackets. However, due to a bug in the root.sh script this default is not picked up. As a result, you will always need to specify the local bin directory regardless of the default specified within the square brackets.

Example Output

[root@myhost dbhome_1]# ./root.sh
Running Oracle 11g root.sh script…

The following environment variables are set as:

ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/local/bin
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin …
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin …
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin …

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.


Miscellaneous

OS Packages for Oracle Enterprise Linux v5

The following OS packages at the following minimum version should be installed on Oracle Enterprise Linux v5 before you start the Oracle software install.

Correct as of 01 September 2009

binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)

Removing an 11g Database

Use the following SQL script if you wish to remove just the 11g database. If you wish to remove both database and binaries, then use the deinstall tool, details of whcih can be found here.

Shutdown the database and run the following SQL script logged onto ASM

alter diskgroup DATA drop file '+DATA/SID/system_01.dbf';
alter diskgroup DATA drop file '+DATA/SID/sysaux_01.dbf';
alter diskgroup DATA drop file '+DATA/SID/redo001a.dbf'
alter diskgroup DATA drop file '+DATA/SID/redo002a.dbf';
alter diskgroup DATA drop file '+DATA/SID/redo003a.dbf';
alter diskgroup DATA drop file '+DATA/SID/redo004a.dbf';
alter diskgroup FRA drop file '+FRA/SID/redo001a.dbf'
alter diskgroup FRA drop file '+FRA/SID/redo002a.dbf';
alter diskgroup FRA drop file '+FRA/SID/redo003a.dbf';
alter diskgroup FRA drop file '+FRA/SID/redo004a.dbf';
alter diskgroup DATA drop file '+DATA/SID/temp_01.dbf';
alter diskgroup DATA drop file '+DATA/SID/undo_01.dbf';
alter diskgroup DATA drop file '+DATA/SID/control01.ctl';
alter diskgroup DATA drop file '+DATA/SID/control02.ctl';
alter diskgroup DATA drop file '+DATA/SID/control03.ctl';
alter diskgroup FRA drop file '+FRA/SID/control01.ctl';
alter diskgroup FRA drop file '+FRA/SID/control02.ctl';
alter diskgroup FRA drop file '+FRA/SID/control03.ctl';

Deinstalling Oracle 11g Binaries and Database

With 11.2 the Oracle Universal Installer no longer removes Oracle software. Use the new deinstallation tool called deinstall available on the installation media before installation as well as in the Oracle home directory after installation.

Step-by-Step

1. Run this tool from ORACLE_HOME first.

  • cd $ORACLE_HOME/deinstall
  • ./deinstall
  • When prompted for the database name enter the *SID* you want to remove.
    • NB This will remove the database binaries too.
  • When asked Do you still want to modify the details of SID database(s)? [n]: Answer N
    • NB You would answer Y if you wanted to amend the database configuration.
  • The tool should now complete okay after performing several tasks. See example output below.

NOTES

An error will occur if there are any missing deinstall files at which point the tool prompts you to download the standalone version available in the deinstall directory on the installation media

Example Output

The following output is example output for removing a standalone database and the related binaries.

moc.niamodym.tsohym|elcaro#moc.niamodym.tsohym|elcaro:> ./deinstall
Checking for required files and bootstrapping …
Please wait …
Location of logs /u01/app/oracle/oraInventory/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############

######################## CHECK OPERATION START ########################
Install check configuration START

Checking for existence of the Oracle home location /u01/app/oracle/SID/product/11.2.0
Oracle Home type selected for de-install is: SIDB
Oracle Base selected for de-install is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oracle/oraInventory

Install check configuration END

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oracle/oraInventory/logs/netdc_check627197374662265908.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oracle/oraInventory/logs/databasedc_check6468731932053553666.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured in this Oracle home [SID]: SID

###### For Database 'SID' ######

Single Instance Database
The diagnostic destination location of the database: /u01/app/oracle/SID/admin/SID/trace/diag/rdbms/SID
Storage type used by the Database: FS
Database file location: /u03/oradata/SID/users/d1,/u03/oradata/SID/tools/d1,/u03/oradata/SID/indx/d1,/u03/oradata/SID/system/d1,/u03/oradata/SID/sysaux/d1,/u04/oradata/SID/undo/d1
Flash recovery area location: /u10/oradata/SID/flash/d1/SID
database spfile location: /u01/app/oracle/SID/product/11.2.0/dbs/spfileSID.ora

The details of database(s) SID have been discovered automatically. Do you still want to modify the details of SID database(s)? [n]:

Database Check Configuration END

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /u01/app/oracle/oraInventory/logs/emcadc_check.log

Checking configuration for database SID
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /u01/app/oracle/oraInventory/logs//ocm_check3867.log
Oracle Configuration Manager check END

######################### CHECK OPERATION END #########################

####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for de-install is: /u01/app/oracle/SID/product/11.2.0
Inventory Location where the Oracle home registered is: /u01/app/oracle/oraInventory
The following databases were selected for de-configuration : SID
Database unique name : SID
Storage used : FS
No Enterprise Manager configuration to be updated for any database(s)
No Enterprise Manager ASM targets to update
No Enterprise Manager listener targets to migrate
Checking the config status for CCR
Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/u01/app/oracle/oraInventory/logs/deinstall_deconfig2009-11-03_10-45-31-AM.out'
Any error messages from this session will be written to: '/u01/app/oracle/oraInventory/logs/deinstall_deconfig2009-11-03_10-45-31-AM.err'

######################## CLEAN OPERATION START ########################

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /u01/app/oracle/oraInventory/logs/emcadc_clean.log

Updating Enterprise Manager ASM targets (if any)
Updating Enterprise Manager listener targets (if any)
Enterprise Manager Configuration Assistant END
Database de-configuration trace file location: /u01/app/oracle/oraInventory/logs/databasedc_clean6686076943326692780.log
Database Clean Configuration START SID
This operation may take few minutes.
Database Clean Configuration END SID

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/oracle/oraInventory/logs/netdc_clean7861096860567065254.log

De-configuring Local Net Service Names configuration file…
Local Net Service Names configuration file de-configured successfully.

De-configuring backup files…
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END

Oracle Configuration Manager clean START
OCM clean log file location : /u01/app/oracle/oraInventory/logs//ocm_clean3867.log
Oracle Configuration Manager clean END
Oracle Universal Installer clean START

Detach Oracle home '/u01/app/oracle/SID/product/11.2.0' from the central inventory on the local node : Done

Delete directory '/u01/app/oracle/SID/product/11.2.0' on the local node : Done

The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/oracle/agent10g'.

The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by central inventory.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END

Oracle install clean START

Clean install operation removing temporary directory '/tmp/install' on node 'myhost'

Oracle install clean END

######################### CLEAN OPERATION END #########################

####################### CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : SID
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
Successfully detached Oracle home '/u01/app/oracle/SID/product/11.2.0' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/SID/product/11.2.0' on the local node.
Oracle Universal Installer cleanup was successful.

Oracle install successfully cleaned up the temporary directories.
#######################################################################

############# ORACLE DEINSTALL & DECONFIG TOOL END #############

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License