You are on page 1of 57

INSTALL ORACLE 10GR2 ON SOLARIS 10

(X86-64)


MARCH 23, 2007




This document contains information that is the property of DTA, Inc. and is furnished for the sole purpose of implementing
a Database Administration Task on behalf of DTA. No part of this publication is to be used for any other purpose, and is
not to be reproduced, copied, disclosed, transmitted, stored in a retrieval system, or translated into any human or
computer language, in any form, by any means, in whole or in part, without the prior express written consent of DTA inc.
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved.



Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 2 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



TABLE OF CONTENTS

STEP 1: SUPER-USER PRE-INSTALLATION TASKS ....................................... 3
STEP 2: ORACLE PRE-INSTALLATION CHECKLIST................................... 10
STEP 3: INSTALL ORACLE 10.2.0.1 SOFTWARE............................................ 12
STEP 4: APPLY ORACLE 10.2.0.2 PATCH SET ................................................ 23
STEP 5: APPLY PATCH 4770693 .......................................................................... 30
STEP 6: CREATE DATABASE.............................................................................. 32
STEP 7: POST INSTALL TASKS .......................................................................... 50
5.1 GRANT SYSDBA TO SYSTEM USER ................................................................... 50
5.2 CREATE INDEX TABLESPACE AND RESIZE USERS TABLESPACE .................... 50
5.3 RESIZE UNDOTBS1 AND TEMP TABLESPACES ............................................... 50
5.4 CREATE AUTOSTART SCRIPT FOR ORACLE........................................................ 51
5.5 SYSTEM STARTUP/SHUTDOWN........................................................................... 51
5.6 ACCOUNTS FOR SLE.......................................................................................... 56
5.6.1 Linux User And Group.............................................................................. 56
5.7 ORACLE ACCOUNT FOR SLE.............................................................................. 56
5.8 CHANGE THE ORACLE PARAMETERS................................................................. 56

Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 3 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



STEP 1: Super-User Pre-Installation Tasks
This step will take approximately 4 Hours

Login as the root user and do the following steps:
1. Oracle 10.2.0.X has been certified to work with 64-Bit versions of Solaris 8, 9 and 10
It is important that the kernel version for Solaris is Solaris 8 or higher.

To determine whether the system architecture can run the software, enter:
# /bin/isainfo kv

Expected output: 64-bit amd64 kernel modules

2. Download and uncompress Oracle 10.2.0.1 file or have the CDs ready.
These files can be downloaded from:
http://www.oracle.com/technology/software/products/database/oracle10g/index.html

Oracle Database 10g Release 2 (10.2.0.1) for Solaris (X86-64) 64-Bit
10201_database_solx86_64.zip

Oracle Database 10g Release 2 10.2.0.2 Patch Set for Solaris (X86-64) 64-Bit
p4547817_10202_solaris86-64.zip

Oracle Database 10g Release 2 Companion CD (10.2.0.1) for Solaris
10201_companion_solx86_64.zip

Patch 4770693 - INTERMITTENT ORA-07445 DURING SR ON SOLAMD64
p4770693_10202_Solaris86-64.zip

3. Sample mount points:
/ - 2 GB
/boot 200MB
/tmp 1 GB
/usr 10 GB
/home Minimum accepted
/u01 10 GB
/u02 The rest of available disk space
4. Copy the bash shell to the /sbin directory
# cp /usr/bin/bash /sbin/bash
5. Do the following:
Make sure you know the value of ORACLE_SID
Make sure you know the mount point where you are going to do the install
Check for space on that mount point (free space 5 GB at least)
Make sure you know the location of ORACLE_BASE and ORACLE_HOME
Kommentar [ST1]: Page: 3
To get the kernel revision use the
command: uname -r
Kommentar [ST2]: Page: 3
Below are the Download Directions
to gunzip and extract the cpio
archives.
Kommentar [ST3]: Page: 3
Download this file only if database
upgrade requires install components
from the companion CD
Kommentar [ST4]: Page: 3
Our usage databases are generally
named sle0. However, we should
use the value specified in the
Install Request Form.
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 4 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Have the system admin On-Call OR know the root user password.

6. Ensure that you have at least 1GB of RAM and 2GB of swap space and 400MB of Free
space in the /tmp directory and 4GB of free disk space for oracle install. The swap space
should be two times the size of RAM.

7. Verify that the following Software Packages are installed:
FOR SOLARIS 9
# pkginfo i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms
SUNWsprot \ SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs
SUNWxwfnt

FOR SOLARIS 10

# pkginfo i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms
SUNWsprot \ SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
SUNWgcmn SUNWgccruntime SUNWgcc SUNWctpls SUNWmfrun


8. Download and install the latest Recommended patch cluster from Suns support site:
http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access
OR
ftp://ftp.sun.com/patchroot/clusters/9_Recommended.zip
NOTE: Check the appropriate OS/Oracle combination on metalink for specific patch
requirements.
NOTE: Reboot the server after the installation completes.
reboot -- -r
NOTE: To determine whether an operating system patch is installed, enter a command
similar to the following:
# /usr/sbin/patchadd -p | grep pat ch_number
If an operating system patch is not installed, download it from the following Web site and
install it:
http://sunsolve.sun.com
9. The following local UNIX groups and user must exist on the system:
The dba group
The oracle user (the Oracle software owner)
If the oracle user exists, ensure that dba is the primary group and dba is also secondary
group for that user:
#id oracle
uid=502(oracle) gid=502(dba)
If necessary, enter the following commands to create the dba group:
# groupadd dba
Kommentar [ST5]: Page: 4
Check using the command
/usr/sbin/prtconf | grep I
Memory size
Kommentar [ST6]: Page: 4
/usr/sbin/swap s (Add used and
available to get total swap)
Kommentar [ST7]: Page: 4
df k /tmp
Kommentar [ST8]: Page: 4
To determine whether the dba group
exists, enter the following command:
# grep dba /etc/group
Kommentar [ST9]: Page: 4
To determine whether the oracle user
exists and belongs to the correct
groups, enter the following command:
# id oracle
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 5 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



If the oracle user does not exist, enter the following command to create it:
# /usr/sbin/useradd g dba d /u01/app/oracle s /usr/bin/bash c
oracle user for Oracle database oracle
If the oracle user exists, but its primary group is not dba enter the following command:
# /usr/sbin/usermod g dba G dba oracle
Enter the following command to set the password of the oracle user:
# passwd oracle
10. You can also create an "oracle" user account using admintool as follows:
Run admintool, select Edit -> Add from the menu bar and create an "oracle"
user. This "oracle" user owns the Oracle software and is required to run the Oracle
installer.
NOTE: The Oracle account must have dba as its primary group.
Select /usr/oracle (or whatever directory you choose to install the Oracle server and
database files) as the home directory path.
Kommentar [NLS10]: This
directory needs to be created and
chown oracle:dba afterwards
Kommentar [ST11]: Page: 4
Select userid that does not exist in
/etc/passwd and groupid from above
command for dba
Install Oracle 10gR2 on Solaris

The example admintool application below shows "/usr/oracle" as the home directory.

# admintool


11. Set the following kernel parameters in /etc/system
Note: If the current value for any parameter is higher than the value listed in this table,
do not change the value of that parameter.
forceload: sys/semsys
forceload: sys/shmsys
set noexec_user_stack=1
# Semaphore Settings For Oracl
set semsys:seminfo_semmni=100
e
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
CONFIDENTIAL DO NOT DISTRIBUTE Page 6 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 7 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767
# Shared Memory Settings For Oracle
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set rlim_fd_max=65536
To view the current values of these parameters, enter the following commands:
# grep noexec_user_stac /etc/system
# /usr/sbin/sysdef i | grep SEM
# /usr/sbin/sysdef i | grep SHM
12. After kernel settings are altered, reboot the machine with the following command:
# shutdown i6 g1 y
OR
# reboot -- -r
13. For every database mount point, add a directory to hold database files:
/<mount-point>/oradata/<ORACLE_SID>
Example:
# mkdir -p /u02/oradata/<ORACLE_SID>

14. After creating the directories, change the ownership on them to
user:Oracle group:dba
Example
# chown R oracle:dba /u02/oradata

15. Create the following directories:
# mkdir -p <${ORACLE_BASE}>/product/102
# mkdir -p <${ORACLE_BASE}>/admin
# mkdir -p <${ORACLE_BASE}>/admin/<ORACLE_SID>/adump
# mkdir -p <${ORACLE_BASE}>/admin/<ORACLE_SID>/bdump
# mkdir -p <${ORACLE_BASE}>/admin/<ORACLE_SID>/udump
# mkdir -p <${ORACLE_BASE}>/admin/<ORACLE_SID>/cdump
# mkdir -p <${ORACLE_BASE}>/admin/<ORACLE_SID>/pfile
NOTE: Typically ORACLE_BASE is set to /u01/app/oracle
16. After creating the directories, change the ownership on them to:
user:oracle group:dba
Example:
# chown R oracle:dba <${ORACLE_BASE}>
17. Verify that all the directories created have proper permissions, i.e. their owner is oracle and
their group is dba.
Example:
# ls -ltr /u02/*
# ls ltr /u01/app/oracle




Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 8 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



(The following is from
Oracle Clusterware and Oracle Real Application Clusters Installation Guide
10g Release 2 (10.2) for Solaris Operating System
And needs to be merged accordingly into the above)

Configuring Kernel Parameters on Solaris 10
On Solaris 10 operating systems, verify that the kernel parameters shown in the
following table are set to values greater than or equal to the recommended value
shown. The table also contains the resource controls that replace the /etc/system
file for a specific kernel parameter. The procedure following the table describes how to
verify and set the values.
shmsys:shminfo_shmmax 4294967295
shmsys:shminfo_shmmin 1
shmsys:shminfo_shmmni 100
shmsys:shminfo_shmseg 10
Note: The following parameters are obsolete in Solaris 9:
shmsys:shminfo_shmmin
shmsys:shminfo_shmseg
Parameter Recommended Value
Configuring Kernel Parameters
Pre-Installation Tasks 2-33
On Solaris 10, use the following procedure to view the current value specified for
resource controls, and to change them if necessary:
1. To view the current values of the resource control, enter the following commands:
# id -p // to verify the project id
uid=0(root) gid=0(root) projid=1 (user.root)
# prctl -n project.max-shm-memory -i project user.root
# prctl -n project.max-sem-ids -i project user.root
2. If you must change any of the current values, then:
To modify the value of max-shm-memory to 6 GB:
# prctl -n project.max-shm-memory -v 6442450944 -r -i project user.root
To modify the value of max-sem-ids to 256:
# prctl -n project.max-sem-ids -v 256 -r -i project user.root
Use the following procedure to modify the resource control project settings, so that
they persist after a system restart:
Note: In Solaris 10, you are not required to make changes to the
/etc/system file to implement the System V IPC. Solaris 10 uses
the resource control facility for its implementation. However,
Oracle recommends that you set both resource control and
/etc/system/ parameters. Operating system parameters not
replaced by resource controls continue to affect performance and
security on Solaris 10 systems. For further information, contact
your Sun vendor.
Parameter Replaced by Resource Control
Recommended
value
noexec_user_stack NA 1
semsys:seminfo_semmns project.max-sem-ids 100
semsys:seminfo_semmns NA 1024
semsys:seminfo_semmsl process.max-sem-nsems 256
semsys:seminfo_semvmx NA 32767
shmsys:shminfo_shmmax project.max-shm-memory 4294967295
shmsys:shminfo_shmmin NA 1
shmsys:shminfo_shmmni project.max-shm-ids 100
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 9 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



shmsys:shminfo_shmseg NA 10
Note: When you use the command prctl (Resource Control) to
change system parameters, you do not need to restart the system for
these parameter changes to take effect. However, the changed
parameters do not persist after a system restart.
Checking UDP Parameter Settings
2-34 Oracle Database Oracle Clusterware and Oracle Real Application Clusters Installation Guide
1. By default, Oracle instances are run as the oracle user of the dba group . A
project with the name group.dba is created to serve as the default project for the
oracle user. Run the command id to verify the default project for the oracle user:
# su - oracle
$ id -p
uid=100(oracle) gid=100(dba) projid=100(group.dba)
$ exit
2. To set the maximum shared memory size to 2 GB, run the projmod command:
# projmod -sK "project.max-shm-memory=(privileged,2G,deny)" group.dba
Alternatively, add the resource control value
project.max-shm-memory=(privileged,2147483648,deny) to the last
field of the project entries for the Oracle project.
3. After these steps are complete, check the values for the /etc/project file using
the following command:
# cat /etc/project
The output should be similar to the following:
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
group.dba:100:Oracle default
project:::project.max-shmmemory=(privileged,2147483648,deny)
4. To verify that the resource control is active, check process ownership, and run the
commands id and prctl, as in the following example:
# su - oracle
$ id -p
uid=100(oracle) gid=100(dba) projid=100(group.dba)
$ prctl -n project.max-shm-memory -i process $$
process: 5754: -bash
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 2.00GB - deny

Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 10 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



STEP 2: Oracle Pre-Installation Checklist
This step will take approximately 1 Hour
Login as the oracle user and do the following steps:
1. Unzip the files for Oracle Database 10g Release 2 (10.2.0.1) for Solaris (Sparc) 64-Bit.
Do the following as the oracle user:
$ cd <File-Download-Location>
$ unzip 10201_database_solx86_64.zip
$ mv database 10201_database_solx86_64
$ mv Disk1 p4547817_10202_solaris86-64
$ mv README.html p4547817_10202_solaris86-64/

2. Check the umask setting by entering the following command:
$ umask
If the umask command does not return the value 022, then set it for the oracle user by
adding the following line to the.profile or .cshrc or .bash_profile file.
umask 022
Also execute the command umask 022 so it takes effect immediately in the shell window.
3. Edit the .profile or .bash_profile file (The profile is in the $HOME directory) for
the oracle user and set the following:
setenv ORACLE_BASE=/u01/app/oracle
setenv ORACLE_HOME=${ORACLE_BASE}/product/10.2.0
setenv ORACLE_OWNER=oracle
setenv ORACLE_SID=<SID>
setenv ORACLE_TERM=vt100

# The following line is not mandatory if X11 is configuring your
# DISPLAY variable automatically.
export DISPLAY=:0.0

export
PATH=$ORACLE_HOME/bin:/usr/ccs/bin:/usr/local/bin:/usr/local/sbin:/usr/bi
n:/usr/sbin:/usr/openwin/bin:/usr/ucb:/etc

# LD_LIBRARY_PATH and LD_LIBRARY_PATH_64 must be unset to do the install

The current shell environment can be updated by running the following command:
$ . ./.profile or $ . ./.bash_profile
4. Make sure system executables point to the /usr/ccs/bin directory.
As the oracle user, the system executables (make, ar, ld, nm) should point to the
/usr/ccs/bin directory. If not, move /usr/ccs/bin to the beginning of the PATH
environment variable setting.
Type the following command on Unix prompt:
$ /usr/bin/which make ar ld nm
You will see output as follows.
/usr/ccs/bin/make
/usr/ccs/bin/ar
/usr/ccs/bin/ld
Kommentar [ST12]: The Display
variable would be set differently if
you were planning a Remote Oracle
install
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 11 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



/usr/ccs/bin/nm

Close the window and log back in as the oracle user.
Install Oracle 10gR2 on Solaris

STEP 3: Install Oracle 10.2.0.1 Software
This step will normally take approximately 1 Hour but depends on machine speed
1. Make sure the xterm session is using the profile for 10g version.
$ env | grep ORA
ORACLE_OWNER=oracle
ORACLE_SID=<SID>
ORACLE_BASE=/u01/app/oracle
ORACLE_TERM=xterm
ORACLE_HOME=/u01/app/oracle/product/10.2.0

WARNING: The setting of ORACLE_HOME variable is critical. If there
is an existing Oracle installation on the machine then set
ORACLE_HOME variable to a NEW directory. DO NOT OVERWRITE an
existing Oracle installation.
ORACLE_HOME=/u01/app/oracle/product/10.2.0

The output especially variable, ORACLE_HOME, ORACLE_BASE, PATH, CLASSPATH
should contain all 10g paths.

CONFIDENTIAL DO NOT DISTRIBUTE Page 12 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



2. It not already set, set the value of the DISPLAY environment variable to the IP address of
your workstation
setenv DISPLAY=workstation_name:0.0
Verify the setting of the DISPLAY variable:
$ /usr/openwin/bin/xcalc
Kommentar [ Sanjay T13]: If this
install is a part of an upgrade of an
existing 10.1 installation then set the
Oracle Home to a NEW location. Do not
overwrite the current ORACLE_HOME.
Kommentar [ Sanjay T14]: If this
install is a part of an upgrade of an
existing 10.1 installation to then set the
Oracle Home to a NEW location. Do not
overwrite the current ORACLE_HOME.
Kommentar [Sanjay Ti15]: This
can also be the IP of the work station.



Install Oracle 10gR2 on Solaris

3. As the oracle user run the Oracle universal installer. Do not run the installer as root user.
$ cd /<path-to-install-Location>/10201_database_solx86_64
$ ./runInstaller
Click on Advanced Installation, then click on Next:

4. Click Next on the Inventory directory screen.
Note: This screen comes up only for first installation on the machine and will not be displayed for
installation being done for an upgrade.
CONFIDENTIAL DO NOT DISTRIBUTE Page 13 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


CONFIDENTIAL DO NOT DISTRIBUTE Page 14 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


5. On the Select Installation Type screen click on Standard Edition (or Enterprise Edition)
depending on the Oracle license of the customer. Then click on Next.

6. On the Specify Home Details screen, click on Next.
CONFIDENTIAL DO NOT DISTRIBUTE Page 15 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 16 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

7. The Product Specific Prerequisite Check screen will appear. Make sure your server
passes all checks. Then click Next.

CONFIDENTIAL DO NOT DISTRIBUTE Page 17 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


8. The Select Configuration Option screen will appear. Select Install database Software
Only. Then click Next.


CONFIDENTIAL DO NOT DISTRIBUTE Page 18 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

9. On the Summary screen, click on Install.


10. The Oracle installation will now proceed. The Install window will appear.
CONFIDENTIAL DO NOT DISTRIBUTE Page 19 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


CONFIDENTIAL DO NOT DISTRIBUTE Page 20 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

During the installation, you will have to run 2 scripts. As root, run the 2 scripts listed below:
# /u01/app/oracle/oraInventory/orainstRoot.sh
CONFIDENTIAL DO NOT DISTRIBUTE Page 21 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



# /u01/app/oracle/product/10.2.0/root.sh

Kommentar [ Sanjay T16]: For the
upgrade only this script needs to run

The output will look as follows:
# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to dba.
The execution of the script is complete

# /u01/app/oracle/product/10.2.0/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]: [enter]
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Install Oracle 10gR2 on Solaris

Creating /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/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.



11. When the install is complete, click on Exit ..

... and click on Yes.

CONFIDENTIAL DO NOT DISTRIBUTE Page 22 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

STEP 4: Apply Oracle 10.2.0.2 patch set

This step will normally take approximately 1 Hour but depends on machine speed
Login as oracle user and do the following steps:

1. Make sure the xterm session is using the profile for 10g version.
$ env | grep ORA
ORACLE_OWNER=oracle
ORACLE_SID=<SID>
ORACLE_BASE=/u01/app/oracle
ORACLE_TERM=xterm
ORACLE_HOME=/u01/app/oracle/product/10.2.0

CONFIDENTIAL DO NOT DISTRIBUTE Page 23 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



WARNING: The setting of ORACLE_HOME variable is critical. If there
is an existing Oracle installation on the machine then set
ORACLE_HOME variable to a NEW directory. DO NOT OVERWRITE an
existing Oracle installation.
ORACLE_HOME=/u01/app/oracle/product/10.2.0

The output especially variable, ORACLE_HOME, ORACLE_BASE, PATH, CLASSPATH
should contain all 10g paths.

2. Set the value of the DISPLAY environment variable to the IP address of your workstation

It not already set, set the value of the DISPLAY environment variable to the IP address of
your workstation

setenv DISPLAY=workstation_name:0.0

Verify the setting of the DISPLAY variable:
Kommentar [ Sanjay T17]: If this
install is a part of an upgrade of an
existing 10.1 installation then set the
Oracle Home to a NEW location. Do not
overwrite the current ORACLE_HOME.
Kommentar [ Sanjay T18]: If this
install is a part of an upgrade of an
existing 10.1 installation to then set the
Oracle Home to a NEW location. Do not
overwrite the current ORACLE_HOME.
Kommentar [Sanjay Ti19]: This
can also be the IP of the work station.
$ /usr/openwin/bin/xcalc



Install Oracle 10gR2 on Solaris


3. As the oracle user run the Oracle universal installer. Do not run the installer as root user.

$ cd /<path-to-install-Location>/p4547817_10202_solaris86-64
$ ./runInstaller

1. On the Installation Method screen, choose the Advanced Installation option and click
Next.



2. On the Specify Home Details screen, VERIFY that Path text box points to the Oracle
10gR2 home directory. Then click on Next.
CONFIDENTIAL DO NOT DISTRIBUTE Page 24 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris




CONFIDENTIAL DO NOT DISTRIBUTE Page 25 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


3. On the Summary screen, click on Install.

CONFIDENTIAL DO NOT DISTRIBUTE Page 26 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris



4. The Oracle installation will now proceed. The Install window will appear.


CONFIDENTIAL DO NOT DISTRIBUTE Page 27 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

5. When prompted, run the root.sh script as the root user.


The output will look as follows:

# /u01/app/oracle/product/10.2.0/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0

Enter the full pathname of the local bin directory: [/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 /var/opt/oracle/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.



CONFIDENTIAL DO NOT DISTRIBUTE Page 28 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


6. On the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal
Installer.



7. Click Yes.



CONFIDENTIAL DO NOT DISTRIBUTE Page 29 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 30 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



STEP 5: Apply Patch 4770693
This step will normally take approximately 1/2 Hour
Login as oracle user and do the following steps:

1. Extract the contents for the patch in thedba directory:

$ cd $HOME/thedba
$ unzip p4770693_10202_Solaris86-64.zip
$ cd 4770693

$ # Verify Opatch is installed, and patch 4770693
$ # is not yet installed
$ $ORACLE_HOME/OPatch/opatch lsinventory

$ $ORACLE_HOME/OPatch/opatch apply

$ORACLE_HOME/OPatch/opatch apply
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..


Oracle Home : /u01/app/oracle/product/10.2.0
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /u01/app/oracle/product/10.2.0/oui
Log file location :
/u01/app/oracle/product/10.2.0/cfgtoollogs/opatch/opatch-
2007_Jan_31_21-34-28-CET_Wed.log

ApplySession applying interim patch '4770693' to OH
'/u01/app/oracle/product/10.2.0'
Invoking fuser to check for active processes.
Invoking fuser on "/u01/app/oracle/product/10.2.0/bin/oracle"

OPatch detected non-cluster Oracle Home from the inventory and
will patch the local system only.


Please shutdown Oracle instances running out of this ORACLE_HOME
on the local system.
(Oracle Home = '/u01/app/oracle/product/10.2.0')

Is the local system ready for patching?

Do
y
you want to proceed? [y|n]
User Responded with: Y
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 31 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Backing up files and inventory (not for auto-rollback) for the
Oracle Home
Backing up files affected by the patch '4770693' for restore.
This might take a while...
Backing up files affected by the patch '4770693' for rollback.
This might take a while...

Patching component oracle.rdbms, 10.2.0.2.0...
Updating archive file
"/u01/app/oracle/product/10.2.0/lib/libserver10.a" with
"lib/libserver10.a/ksl.o"
Running make for target ioracle
ApplySession adding interim patch '4770693' to inventory

The local system has been patched and can be restarted.


OPatch succeeded.
Install Oracle 10gR2 on Solaris

STEP 6: Create Database
1. Go to $ORACLE_HOME/bin directory, run Database Configuration Assistant
$ ./dbca

1. On the Welcome screen, click Next.


2. On the Operations screen, select Create a Database option, click Next.
CONFIDENTIAL DO NOT DISTRIBUTE Page 32 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 33 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

3. On the Database Templates screen, choose Custom Database option. Click Next.


CONFIDENTIAL DO NOT DISTRIBUTE Page 34 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

5. On the Database Identification screen:
SID: The SID should already be filled in with the value of the environment variable
ORACLE_SID. In this example, the environment variable ORACLE_SID is set to vqrdb
Global Database Name: <ORACLE SID >.<domain-name>
The domain-name is company domain e.g. ellacoya.com. The entry should look like
vqrdb.<client domain name>.com
Then click Next.
CONFIDENTIAL DO NOT DISTRIBUTE Page 35 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

6. On the Database Management Option screen, uncheck Configure the Database with
Enterprise Manager and click Next.


CONFIDENTIAL DO NOT DISTRIBUTE Page 36 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

7. On the Database Credential screen, select: Use the same password for all the accounts.
Select Next.
CONFIDENTIAL DO NOT DISTRIBUTE Page 37 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


8. On the Database File Storage Option screen, select File System, then click Next.


CONFIDENTIAL DO NOT DISTRIBUTE Page 38 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

9. On the Specify Locations screen, click Use Common Location for All Database
Files. In the Database Files Location field, type /u02/oradata


CONFIDENTIAL DO NOT DISTRIBUTE Page 39 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

10. On the Recovery Options screen, click Next.


CONFIDENTIAL DO NOT DISTRIBUTE Page 40 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

11. On Database Components screen, uncheck all checkboxes. Note: For a Data Warehouse
installation, you should choose the Oracle Database Mining and Oracle OLAP options.
CONFIDENTIAL DO NOT DISTRIBUTE Page 41 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

12. Click Standard Database Components. Uncheck Oracle Intermedia, then click on OK,
then click on Next.

CONFIDENTIAL DO NOT DISTRIBUTE Page 42 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


13. On Initialization Parameter screen, click the Sizing tab and change the Block Size to 8192
Bytes:

CONFIDENTIAL DO NOT DISTRIBUTE Page 43 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris


14. Still on the Initialization Parameter screen, click the Character Sets tab and change the
Database Character Set to UTF8 and leave other options to their default and then click
Next.



CONFIDENTIAL DO NOT DISTRIBUTE Page 44 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

15. On Database Storage screen, click Next.


16. On Creation Options screen, choose the Create Database and Generate Database
Creation Scripts options. Then click Finish.
CONFIDENTIAL DO NOT DISTRIBUTE Page 45 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris







17. On the Confirmation screen, Click OK.
CONFIDENTIAL DO NOT DISTRIBUTE Page 46 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris



18. On the Database Configuration Assistant screen, click OK.
CONFIDENTIAL DO NOT DISTRIBUTE Page 47 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 48 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved





19. Be patient while the installer is underway:

Install Oracle 10gR2 on Solaris


20. On the Database Creation Complete screen, Click Exit.
CONFIDENTIAL DO NOT DISTRIBUTE Page 49 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 50 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



STEP 7: Post Install Tasks
5.1 Grant sysdba to SYSTEM user
1. Login as SYS user using sqlplus and run the following command:
SQL> grant sysdba to SYSTEM ;
5.2 Create INDEX Tablespace And Resize USERS Tablespace
1. Login as SYS user using SQL*Plus and run the following command:

SQL> CREATE TABLESPACE indx LOGGING
DATAFILE '<full_path_to_oradata_dir>/indx01.dbf'
SIZE 1000M REUSE AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;

2. Resize the USERS tablespace:
SQL> ALTER DATABASE DATAFILE
'<full_path_to_oradata_dir>/users01.dbf' RESIZE 20000M;

NOTE: Set INDX and USERS tablespace sizes according to client specs.
5.3 Resize UNDOTBS1 and TEMP Tablespaces
Size the UNDOTBS1 and TEMP tablespaces accordingly. In general, we calculate this as
a rough estimate of the database capacity (max size).

When sizing the UNDOTBS1 tablespace, the rule of thumb is to set this as 64GB per 1TB
in terms of database capacity. So if the database capacity is 250GB for example, we would
size the UNDOTBS1 tablespace to roughly 16GB. To conduct this, login as SYS user
using SQL*Plus and run the following command:

SQL> ALTER DATABASE DATAFILE
'<full_path_to_oradata_dir>/undotbs01.dbf' RESIZE 16000M;

This same approach holds for the TEMP tablespace with the exception of setting 80GB
(instead of 64GB) per 1TB. Assuming the database capacity is still 250GB, we would
allocate roughly 20GB:

SQL> ALTER DATABASE DATAFILE
'<full_path_to_oradata_dir>/temp01.dbf' RESIZE 20000M;

Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 51 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved




5.4 Create Autostart Script For Oracle
1. Edit /var/opt/oracle/oratab as follows:
Database entries appear in the following format:
ORACLE_SID:ORACLE_HOME:{Y/N}
where Y or N specifies whether or not to use the dbstart and dbshut automation scripts for
the database. Change the last field of each database that will be automatically started to Y.
Below is a sample /var/opt/oracle/oratab file:
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifiers and home
# directories of the database respectively. The third field indicates
# to the dbstart utility that the database should, "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
sle0:/u01/app/oracle/product/10.2.0:Y


5.5 System Startup/Shutdown

1. You need to EDIT the files $ORACLE_HOME/bin/dbstart and
$ORACLE_HOME/bin/dbshut and make some modifications:

Set all occurrences of ORATAB to:
ORATAB=/var/opt/oracle/oratab

In dbstart and dbshut, set ORACLE_HOME_LISTNER=$ORACLE_HOME.
This allows 10gR2 to automatically start the listener process.
Otherwise, you may get error messages upon Oracle startup, but
they are not serious.

Cha tart script from nge line 258 in dbs
COUNT=$((COUNT+1))
TO
#COUNT=$(
COUNT+=1
(COUNT+1))


Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 52 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved




2. Verify that you can start/stop the DB using the Oracle programs dbstart and dbshut. The
database should already be running since the Oracle installer starts it. Run these programs
as oracle.
3. To shut down the already running DB
$ dbshut
$
4. To start up the DB
$ dbstart
Processing Database instance "sle0": log file
/u01/app/oracle/product/10.2.0/startup.log
$
5. If all looks good, shut down the database again in preparation for the following steps.
$ dbshut ...
6. Go back to your root shell. These steps will not require X. We'll be creating 3 scripts. The
first 2 scripts are wrappers that start/stop the DB instance and DB listener. The third script will
be called by Solaris during boot and shutdown.
Create the file /usr/local/bin/orainst with the following contents
#!/sbin/sh
#

ORACLE_HOME=/u01/app/oracle/product/10.2.0
case "$1" in
'start')
$ORACLE_HOME/bin/dbstart
;;
'stop')
$ORACLE_HOME/bin/dbshut
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0

7. Create the file /usr/local/bin/oralsnr with the following contents:
#!/sbin/sh
#

ORACLE_HOME=/u01/app/oracle/product/10.2.0
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_HOME LD_LIBRARY_PATH
Kommentar [NLS20]: Note that in
10gR2, Oracle no longer prints
database shutdown output to the
console. It basically pauses for a
few seconds and then just returns
the shell prompt.
Kommentar [NLS21]: Similar to
#3, Oracle instead redirects
startup console output to a log file,
$ORACLE_HOME/startup.log
If you need to troubleshoot Oracle
startup problems, consult this file.
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 53 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved




case "$1" in
'start')
$ORACLE_HOME/bin/lsnrctl start
;;

'stop')
$ORACLE_HOME/bin/lsnrctl stop
;;

*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0

8. Make the scripts executable:
# chmod +x /usr/local/bin/oralsnr
# chmod +x /usr/local/bin/orainst

9. Test the startup scripts. Make sure that you are logged in as root and that you do not have
ORA* or LD_* environment variables set.
# env|grep LD_
# env|grep ORA
# su - oracle -c "/usr/local/bin/orainst start"
# su - oracle -c "/usr/local/bin/oralsnr start"
10. To check that Oracle is running, become the Oracle User and connect/disconnect from
the database.
# su - oracle
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
$ sqlplus system/ellacoya

SQL*Plus: Release 10.2.0.2.0- Production on Sat Oct 2 22:30:42 2004

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0- 64bit
Production
With the Partitioning, OLAP and Data Mining options

SQL>exit
11. Test the shutdown scripts.
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 54 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



# su - oracle -c "/usr/local/bin/orainst stop"
# su oracle -c "/usr/local/bin/oralsnr stop"
12. Create the file /etc/init.d/dbora with the following contents:
#!/sbin/sh
#

OWNER=oracle

case "$1" in
'start')
su - $OWNER -c "/usr/local/bin/orainst start"
#su - $OWNER -c "/usr/local/bin/oralsnr start"
;;

'stop')
#su - $OWNER -c "/usr/local/bin/oralsnr stop"
su - $OWNER -c "/usr/local/bin/orainst stop"
;;

*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
13. Set the permissions for the script:
# chmod 744 /etc/init.d/dbora
14. Test the script:
# /etc/init.d/dbora start
15. Try connecting to the DB using the step outlined above. The connection should succeed.
Then shutdown the database:
# /etc/init.d/dbora stop
16. Try connecting to the DB using the step outlined above. The connection should fail.
17. Configure the system to start Oracle at runlevel 3 and to stop Oracle at runlevels 0, 1, and 2.
# cd /etc/rc3.d
# ln -s ../init.d/dbora S40dbora
# cd /etc/rc0.d
# ln -s ../init.d/dbora K30dbora
# cd /etc/rc1.d
# ln -s ../init.d/dbora K30dbora
# cd /etc/rc2.d
# ln -s ../init.d/dbora K30dbora
18. Reboot the system and check that Oracle is running by trying to connect as outlined above.
Kommentar [NLS22]: Comment
out the line for starting the
listener if your dbstart is already
doing that automatically
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 55 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



# reboot
...
If you can connect after the reboot, Oracle setup is complete.







Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 56 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



5.6 Accounts For SLE
5.6.1 Linux User And Group
1. Add the Ellacoya group:
# groupadd ellacoya
2. Add the Ellacoya user and set its password:
# useradd -g ellacoya -d /opt/ellacoya -c Ellacoya ellacoya
# passwd ellacoya
New Password:
Re-enter new Password:
passwd: password successfully changed for ellacoya
3. Change the Ellacoya mount to be owned by ellacoya.
# chown -R ellacoya:ellacoya /opt/ellacoya
5.7 Oracle Account for SLE
# su oracle
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
$ sqlplus system/ellacoya@sle0
SQL> create user ellarpt identified by ellarpt
default tablespace users;

User created.

SQL> grant resource, connect, create view, create table to ellarpt;

Grant succeeded.

SQL> create user ellasys identified by ellasys
default tablespace users;

User created.

SQL> grant resource, connect, create view to ellasys;

Grant succeeded.
5.8 Change The Oracle Parameters
Make changes to Oracle parameters as per recommendations in the document titled:
DatabaseParameterRecommendations_10g.xls.
For Ellacoyas Oracle parameters we use:
EllacoyaDBparametersRecomendations_Oracle10g.xls

When a database is using spfile then parameter changes can be made as follows:.
1. Login to the machine and cd to $ORACLE_HOME directory. Verify that the environment
variables ORACLE_HOME and ORACLE_SID are pointing to the ORACLE instance
whose parameters you want to change. Connect to SQL*Plus as SYS user and issue
following command :
Install Oracle 10gR2 on Solaris

CONFIDENTIAL DO NOT DISTRIBUTE Page 57 of 57
Unpublished Work Copyright

2001-2006 DTA, Inc. All Rights Reserved



SQL> CREATE PFILE FROM SPFILE;
This will create init<ORACLE_SID>.ora file in the directory ${ORACLE_HOME}/dbs.

2. Open the init<ORACLE_SID>.ora file in an editor like vi/emacs and modify the
appropriate parameters.

3. Shutdown the database.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down

4. Create the spfile file from the init<ORACLE_SID>.ora file as follows. Connect to
SQL*Plus as SYS user and issue following command:

SQL> CREATE SPFILE FROM PFILE;

This will create spfile<ORACLE_SID>.ora in the $ORACLE_HOME/dbs directory.

5. Startup the database.

SQL> startup

It is possible some of the new parameters mayve been set incorrectly and the
instance fails to start. Troubleshoot this by repeating steps 3 -> 2 -> 5 until the
instance generates output similar to the following:

ORACLE instance started.

Total System Global Area 3357513064 bytes
Fixed Size 734568 bytes
Variable Size 1644167168 bytes
Database Buffers 1711276032 bytes
Redo Buffers 1335296 bytes
Database mounted.
Database opened.

Check if spfile is in use, the value column should not be empty:
SQL> show parameter spfile

These steps are valid on a Unix/Linux machine running any version of Oracle 10g
database.

You might also like