Thursday, September 13, 2012

Installing Oracle Database 10g Release


* Downloading Oracle10g Software and Burning Oracle10g CDs
* Checking Memory and Swap Space
* Checking /tmp Space
* Checking Software Packages (RPMs)
* Checking Kernel Parameters
* Sizing Disk Space for Oracle10g
* Creating Oracle User Accounts
* Setting Shell Limits for the Oracle User
* Creating Oracle Directories
    Optimal Flexible Architecture (OFA) for 10g (10.1.0.2)
* Setting Oracle Environments
* Installing Oracle10g
    Installing Oracle10g on a Remote Linux Server
    Starting Oracle Universal Installer
    Using Oracle Universal Installer
    Updates after Running Oracle Universal Installer
* Oracle Post-installation Tasks
    Startup and Shutdown of the Oracle10g Database
    Shutdown of other Oracle 10g Background Processes
* Tips and Hints for Oracle10g on Linux
* Oracle10g/Linux Errors and Problems
* References

   Downloading Oracle10g Software and Burning Oracle10g CDs
Download Oracle 10g (32-bit and 64-bit) for Linux from OTN to install linux 10g oracle:
http://otn.oracle.com/software/products/database/oracle10g/index.html

NOTE: To install a Oracle Database 10g (without RAC) you only need to download the database file ship.db.lnx32.cpio.gz, or 10201_database_linux_x86_64.cpio etc.

Compute a cyclic redundancy check (CRC) checksum for the downloaded files and compare the checksum numbers against the numbers posted on OTN s website. For example:
cksum ship.db.lnx32.cpio.gz
Uncompress the downloaded file(s):
gunzip ship.db.lnx32.cpio.gz

   Checking Memory and Swap Space
Oracle says that the system must have at least 512MB of RAM and 1GB of swap space or twice the size of RAM. And for systems with more than 2 GB of RAM, the swap space can be between one and two times the size of RAM. You might also want to check out Sizing Swap Space.
For test sake I tried to install an Oracle Database 10g (Type: General Purpose Database) on a little PC with 256MB of RAM and 1 GB of swap space. I was able to get a 10g database up and running on this little PC without a problem.

To check the size of physical memory, execute:
grep MemTotal /proc/meminfo
To check the size of swap space, execute:
grep SwapTotal /proc/meminfo

You also can add temporary swap space to your system by creating a temporary swap file instead of using a raw device. Here is the procedure:
su - root
dd if=/dev/zero of=tmpswap bs=1k count=900000
chmod 600 tmpswap
mkswap tmpswap
swapon tmpswap
To disable the temporary swap space execute the following commands:
su - root
swapoff tmpswap
rm tmpswap

   Checking /tmp Space
According to Oracle''s documentation, the Oracle Universal Installer (OUI) requires up to 400 MB of free space in the /tmp directory. But OUI checks if /tmp is only greater than 80 MB.

To check the space in /tmp, run:
$ df /tmp
If you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:
su - root
mkdir /<AnotherFilesystem>/tmp
chown root.root /<AnotherFilesystem>/tmp
chmod 1777 /<AnotherFilesystem>/tmp
export TEMP=/<AnotherFilesystem>           # used by Oracle
export TMPDIR=/<AnotherFilesystem>         # used by Linux programs like the linker "ld"
When you are done with the Oracle installation, shutdown Oracle and remove the temporary /tmp directory:
su - root
rmdir /<AnotherFilesystem>/tmp
unset TEMP
unset TMPDIR

   Checking Software Packages (RPMs)
General

Before you install an Oracle Database 10g you need to check the system for required RPMs. On my systems I usually install a minimum list of RPMs which usually requires the installation of additional packages for Oracle databases. Always ensure to use the latest RPMs and kernels!


For 10g R2 (32-bit) on RHEL 4 x86, the document Oracle Database Release Notes 10g Release 2 (10.2) for Linux x86 lists the following required package versions or higher:
  binutils-2.15.92.0.2-10.EL4
  compat-db-4.1.25-9
  control-center-2.8.0-12
  gcc-3.4.3-9.EL4
  gcc-c++-3.4.3-9.EL4
  glibc-2.3.4-2
  glibc-common-2.3.4-2
  gnome-libs-1.4.1.2.90-44.1
  libstdc++-3.4.3-9.EL4
  libstdc++-devel-3.4.3-9.EL4
  make-3.80-5
  pdksh-5.2.14-30
  sysstat-5.0.5-1
  xscreensaver-4.18-5.rhel4.2
Also ensure to install the libaio-0.3.96 RPM or a newer version! Otherwise the OUI prerequisite check will fail.

To check the RPMs, run:
  rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs \
         libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio


Installing the RPMs


10g R2 on RHEL AS 4 (x86_64)

On my RHEL AS 4 x86_64 system I installed the following RPMs and dependencies:
  rpm -Uvh gcc-3.4.4-2.x86_64.rpm \
           gcc-c++-3.4.4-2.x86_64.rpm \
           libstdc++-devel-3.4.4-2.x86_64.rpm \
           cpp-3.4.4-2.x86_64.rpm \
           glibc-devel-2.3.4-2.13.x86_64.rpm \
           glibc-headers-2.3.4-2.13.x86_64.rpm \
           glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm

  rpm -Uvh gnome-libs-1.4.1.2.90-44.1.x86_64.rpm \
           compat-db-4.1.25-9.x86_64.rpm \
           ORBit-0.5.17-14.x86_64.rpm \
           gtk+-1.2.10-33.x86_64.rpm \
           imlib-1.9.13-23.x86_64.rpm \
           libpng10-1.0.16-1.x86_64.rpm \
           gdk-pixbuf-0.22.0-16.el4.x86_64.rpm \
           libungif-4.1.3-1.x86_64.rpm

  rpm -Uvh sysstat-5.0.5-1.x86_64.rpm

Note that you also need to install the following i386 and x86_64 RPMs if not already installed, otherwise you will get various different error messages.
For a detailed list of error messages, see Oracle10g/Linux Errors and Problems.
  rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm \
           xorg-x11-libs-6.8.2-1.EL.13.20.i386.rpm \
           xorg-x11-Mesa-libGL-6.8.2-1.EL.13.20.i386.rpm \
           expat-1.95.7-4.i386.rpm \
           fontconfig-2.2.3-7.i386.rpm \
           freetype-2.1.9-1.i386.rpm \
           zlib-1.2.1.2-1.2.i386.rpm
  rpm -Uvh libaio-0.3.103-3.x86_64.rpm

  rpm -Uvh compat-libstdc++-33-3.2.3-47.3.x86_64.rpm

  rpm -Uvh glibc-devel-2.3.4-2.13.i386.rpm \
           libgcc-3.4.4-2.i386.rpm

I
10g R2 on RHEL AS 4 (x86)

On my RHEL AS 4 x86 system I had to install the following RPMs and dependencies to meet the software requirements:
   rpm -Uvh gcc-3.4.4-2.i386.rpm \
            gcc-c++-3.4.4-2.i386.rpm \
            libstdc++-devel-3.4.4-2.i386.rpm \
            glibc-devel-2.3.4-2.13.i386.rpm \
            glibc-headers-2.3.4-2.13.i386.rpm \
            glibc-kernheaders-2.4-9.1.98.EL.i386.rpm

   rpm -Uvh gnome-libs-1.4.1.2.90-44.1.i386.rpm \
            compat-db-4.1.25-9.i386.rpm \
            ORBit-0.5.17-14.i386.rpm \
            gtk+-1.2.10-33.i386.rpm \
            imlib-1.9.13-23.i386.rpm \
            libpng10-1.0.16-1.i386.rpm \
            gdk-pixbuf-0.22.0-16.el4.i386.rpm \
            libungif-4.1.3-1.i386.rpm \
            alsa-lib-1.0.6-5.RHEL4.i386.rpm \
            audiofile-0.2.6-1.i386.rpm \
            esound-0.2.35-2.i386.rpm

   rpm -Uvh sysstat-5.0.5-1.i386.rpm

   rpm -Uvh libaio-0.3.103-3.i386.rpm

   rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm

   rpm -Uvh compat-libstdc++-33-3.2.3-47.3.i386.rpm

I don''t know why the control-center RPM and the xscreensaver RPM are listed as requirements. On my system I did not install these RPMs since I''m against installing desktop stuff on servers. When I installed 10g R2 I did not experience any problems when these RPMs were missing. When you want to install control-center RPM and the xscreensaver, then have fun. The list can be very long with all the dependencies like gnome-desktop, cdrecord etc..


I do not recommend to execute "runInstaller -ignoreSysPrereqs" since this will disable other checks you probably don''t want to.

On RHEL AS 4 (for 10g R1), RH9, and FC 1 you have to change the /etc/redhat-release file to make Oracle 10g believe it''s running on a supported release.
Regarding RHEL AS 4, the installer for 10g 10.1.0.3 does not recognize RHEL AS 4 as a supported release but 10g R2 OUI does.

To change the /etc/redhat-release file, you can simply copy/paste the following commands:
su - root
cp /etc/redhat-release /etc/redhat-release.orig
cat > /etc/redhat-release << EOF
Red Hat Enterprise Linux AS release 3 (Taroon)
EOF
After you are done with the Oracle10g installation, undo the changes you made to /etc/redhat-release:
su - root
cp /etc/redhat-release.orig /etc/redhat-release

NOTE: On FC3 you don''t have to edit /etc/redhat-release since the OUI is not very clever. If OUI finds e.g. digit number "3" in the /etc/redhat-release file, you pass the "operating system version" check since it believes it''s a RHEL3 system.
   Checking Kernel Parameters
To see all kernel parameters, execute:
su - root
sysctl -a

For Oracle10g, the following kernel parameters have to be set to values greater than or equal to the recommended values which can be changed in the proc filesystem:
shmmax  = 2147483648     (To verify, execute: cat /proc/sys/kernel/shmmax)
shmmni  = 4096           (To verify, execute: cat /proc/sys/kernel/shmmni)
shmall  = 2097152        (To verify, execute: cat /proc/sys/kernel/shmall)   (for 10g R1)
shmmin  = 1              (To verify, execute: ipcs -lm |grep "min seg size")
shmseg  = 10             (It''s hardcoded in the kernel - the default is much higher)

semmsl  = 250            (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $1}')
semmns  = 32000          (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $2}')
semopm  = 100            (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $3}')
semmni  = 128            (To verify, execute: cat /proc/sys/kernel/sem | awk '{print $4}')

file-max = 65536         (To verify, execute: cat /proc/sys/fs/file-max)

ip_local_port_range = 1024 65000
                         (To verify, execute: cat /proc/sys/net/ipv4/ip_local_port_range)

NOTE: Do not change the value of any kernel parameter on a system where it is already higher than listed as minimum requirement.

On RHEL AS 4 x86, RHEL AS 3 U5 x86, RHEL AS 3 U5 x86_64, RHEL AS 2.1, RH9, FC1, FC3, and FC4 I had to increase the kernel parameters shmmax, semopm, and filemax to meet the minimum requirement. On RHEL AS 4 x86_64 I had to increase shmmax and semopm.

Oracle also recommends to set the local port range ip_local_port_range for outgoing messages to "1024 65000" which is needed for high-usage systems. This kernel parameter defines the local port range for TCP and UDP traffic to choose from.

I added the following lines to the /etc/sysctl.conf file which is used during the boot process:
kernel.shmmax=2147483648
kernel.sem=250 32000 100 128
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
Adding these lines to the /etc/sysctl.conf file will cause the system to change these kernel parameters after each boot using the /etc/rc.d/rc.sysinit script which is invoked by /etc/inittab. But in order that these new added lines or settings in /etc/sysctl.conf become effective immediately, execute the following command:
su - root
sysctl -p

Starting with 10g R2 some network settings must be adjusted as well which is checked by OUI. For more information on setting these parameters, see Changing Network Kernel Settings.

For more information on shmmax, shmmni, shmmin, shmseg, and shmall, see Setting Shared Memory.
For more information on semmsl, semmni, semmns, and semopm, see Setting Semaphores.
For more information on filemax, see Setting File Handles.
   Sizing Disk Space for Oracle10g
Oracle says that about 2.5 GB of disk space should be reserved for the Oracle software on Linux.

When I did an Oracle 10g Release 1 (10.1.0.3.0) "General Purpose Database" installation (not including any software from the Oracle Database 10g Companion CD), the Oracle software used about 1.3 GB of disk space, and the preconfigured "General Purpose Database" (datafiles, etc.) used about 710 MB of disk space.
$ du -m -s /u01
1963    /u01
$ du -m -s /u01/app/oracle/oradata
720     /u01/app/oracle/oradata
If you also install additional software from the Oracle Database 10g Companion CD, then add at least 1 GB of free disk space.

So if you install Oracle10g Enterprise Edition and additional software from the Oracle Database 10g Companion CD, then you need about 2.5 GB of disk for the Oracle software. And if you also want to add a preconfigured database on the same filesystem, make sure to add another 1 GB of disk space.

NOTE: If you don''t put Oracle10g on a separate filesystems, then make sure the root filesystem "/" has enough disk space. You can check the free space of the root filesystem with the following command:
df -h /

   Using Automatic Storage Management (ASM)
For more information on installing and configuring ASM, see Installing and Configuring Automatic Storage Management (ASM) and Disks. And for information on how to make use of ASM disk groups when running OUI, see Installing Oracle Database 10g with Real Application Cluster (RAC).
   Creating Oracle User Accounts
To create the oracle account and groups, execute the following commands:
su - root
groupadd dba          # group of users to be granted SYSDBA system privilege
groupadd oinstall     # group owner of Oracle files
useradd -c "Oracle software owner" -g oinstall -G dba oracle
passwd oracle
For more information on the "oinstall" group account, see When to use "OINSTALL" group during install of oracle.
  
   Creating Oracle Directories
For Oracle10g you only need to create the directory for $ORACLE_BASE:
su - root
mkdir -p /u01/app/oracle
chown oracle.oinstall /u01/app/oracle

But if you want to comply with Oracle''s Optimal Flexible Architecture (OFA), then you don''t want to place the database files in the /u01 directory but in another directory/filesystem/disk like /u02. This is not a requirement but if you want to comply with OFA, then you might want to create the following directories as well:
su - root
mkdir -p /u02/oradata/orcl
chown oracle.oinstall /u02/oradata/orcl
In this example, "orcl" stands for the name of the database which will also be the name of the instance. This is typically the case for single instance databases.


Optimal Flexible Architecture (OFA) for 10g R1 (10.1.0.2)

The OFA standard is a guideline created by Oracle to ensure reliable Oracle installations. For Oracle 10g Database, the OFA recommended Oracle home path has changed.

The home path for the first 10g (10.1.0) database installation on a system would be:
  /u01/app/oracle/product/10.1.0/db_1
If you would install a second Oracle 10g Database 10g (10.1.0) on the same system, the Oracle home directory would be as follows:
  /u01/app/oracle/product/10.1.0/db_2
If the Oracle10g software is not owned by the user oracle but by the user "oraowner", then the path of the Oracle home directory would be:
  /u01/app/oraowner/product/10.1.0/db_1
  /u01/app/oraowner/product/10.1.0/db_2
The standard directory name for Oracle10g is "app":
  /u01/app/oracle/product/10.1.0/db_1

Oracle recommends to use mount points such as /u01, /u02, etc. which complies with the OFA guidelines. But others can be used, for example:
  /disk_1/app/oracle/product/10.1.0/db_1

The subtree for database files not stored in ASM disk groups should be named as follows:
  /u02/oradata/<db_name_1>
  /u02/oradata/<db_name_2>
  /u03/oradata/<db_name_1>
  /u03/oradata/<db_name_2>
The mount point /u01 should be used for the Oracle software only. /u02, /u03, /u04 etc. should be used for the database files. The db_name stands for the DB_NAME initialization parameter which is typically the same as the SID name for single instance databases.
   Setting Oracle Environments
Since the Oracle Universal Installer (OUI) "runInstaller" is run from the oracle account, some environment variables must be configured for this account before OUI is started.

Execute the following commands for the Bash shell which is the default shell on Red Hat Linux (to verify your shell run: echo $SHELL):
su - oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl

NOTE: If ORACLE_BASE is used, then Oracle recommends that you don''t set the ORACLE_HOME environment variable but that you choose the default path suggested by the OUI. You can set and use ORACLE_HOME after you finished running OUI.

Also, the environment variables ORACLE_HOME and TNS_ADMIN should not be set. If you''ve already set these environment variables, you can unset them by running the following commands:
unset ORACLE_HOME
unset TNS_ADMIN

To have these environment variables set automatically each time you login as oracle, you can add these environment variables to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Red Hat Linux. To do this you could simply copy/paste the following commands to make these settings permanent for your oracle''s Bash shell:
su - oracle
cat >> ~oracle/.bash_profile << EOF
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl
EOF

   Installing Oracle10g
Installing Oracle10g on a Remote Linux Server

If you don''t install Oracle on your local system but on a remote server, then you need to relink X to your local desktop. The easiest way to do this is to use the "X11 forwarding" feature of ssh. This means that you don''t have to run xhost and set the DISPLAY environment variable.

Here is an example how to make use of the "X11 forward" feature of ssh. Simply run the following command from your local desktop:
$ ssh -X oracle@oracle_remote_server_name
Now when you try to run any GUI tool on the remote server, it will automatically be relinked to your local desktop. If this is not working, verify that the ForwardX11 setting is not set to "no" in /etc/ssh/ssh_config on the remote server:
su - root
# grep ForwardX11 /etc/ssh/ssh_config | grep -v "^#"
        ForwardX11 yes
#
If you are using telnet, however, you will have to set DISPLAY manually, see my other article Starting runInstaller for more information.


Starting Oracle Universal Installer

Insert the Oracle CD that contains the image of the downloaded file ship.db.lnx32.cpio, or change to the directory that contains the image directory Disk1.

If you install Oracle10g from a CD, mount the CD by running the following commands in another terminal:
su - root
mount /mnt/cdrom
For RHEL AS 4, RHEL AS 3, and FC3 you have to execute:
su - root
mount /media/cdrom

Before you execute runInstaller, make sure the Oracle environment variables are set, see Setting Oracle Environments. You can verify the settings by running the set command:
su - oracle
oracle$ set

To execute runInstaller from the mounted CD, run the following command as the oracle user:
oracle$ /mnt/cdrom/runInstaller
On RHEL AS 4, RHEL AS 3, and FC3 run the following command:
oracle$ /media/cdrom/runInstaller


Using Oracle Universal Installer (OUI)

The following example shows how to install x86 Oracle 10g Release 1 Database Software and a "General Purpose" database:
(Note, the screens and questions will look different if you install 10g R2 or 64-bit 10g R1 database)
 - Welcome Screen:
                     - Basic Installation:       Checked it which is the default
                     - Oracle Home Location:     Use default: /u01/app/oracle/product/10.1.0/db_1
                     - Installation Type:        I used the default: Enterprise Edition
                     - UNIX DBA Group:           Use default: dba
                     - Create Starter Databases: I checked it for this example which is the default
                       - Global Database Name:     orcl
                       - Database password:        Type in the password for SYS, SYSTEM, SYSMAN, and DBSNMP accounts
                     - Advanced Installation:    For this article I did not check it
                     Click Next

 - Specify Inventory directory and credentials:
                     - Full path of the inventory directory: Use default: /u01/app/oracle/oraInventory
                     - Specify Operating System group name:  Use default: oinstall
                     Click Next

 - A window pops up to run the orainstRoot.sh script:
                     Run the script in another terminal:
                       su - root
                       # /u01/app/oracle/oraInventory/orainstRoot.sh
                       Creating the Oracle inventory pointer file (/etc/oraInst.loc)
                       Changing groupname of /u01/app/oracle/oraInventory to oinstall.
                       #
                     Click Continue

 - Product-specific Prerequisite Checks:
                     Verify that all checks have been passed.
                     Make sure that the status of each Check is set to "Succeeded".
                     On RHEL AS 4 ignore the warnings for binutils, gcc, and openmotif and proceed.
                     If a check failed, see Oracle10g Installation Errors on Linux.
                     Note that the "Retry" button doesn''t work after you fixed one of the failed checks.
                     Click Next

 - Select Database Configuration:
                     I selected "General Purpose".
                     Click Next

 - Specify Database Configuration Options:
                     - Global Database Name: I used "orcl".
                     - SID: I used "orcl".
                     Click Next

 - Select Database Management Option:
                     I selected "Use Database Control for Database Management".
                     Click Next

 - Specify Database File Storage Option:
                     I selected "File System".
                     - File System
                       - Specify Database file location: /u01/app/oracle/oradata/
                           If you want to comply with OFA, you might want to select another mount point
                           than '/u01', e.g. /u02/oradata.
                     Click Next

 - Specify Backup and Recovery Options:
                     For my test installation I selected "Do no enable Automated Backups".
                     Click Next

 - Specify Database Schema Passwords:
                     Make sure that the password(s) don''t start with a digit number! Otherwise you
                     will later get error message(s) like "ORA-00988 missing or invalid password".
                     Click Next

 - Summary:          Click Install

                     If Enterprise manager configuration fails due to port allocation problems,
                     check out Oracle10g/Linux Errors and Problems.


                     When a window pops up to run the root.sh script, execute the script
                     in another terminal as root:

                       su - root
                       # /u01/app/oracle/product/10.1.0/db_1/root.sh
                       Running Oracle10 root.sh script...
                       \nThe following environment variables are set as:
                           ORACLE_OWNER= oracle
                           ORACLE_HOME=  /u01/app/oracle/product/10.1.0/db_1

                       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 ...

                       \nCreating /etc/oratab file...
                       Adding entry to /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.
                       /var/opt/oracle does not exist. Creating it now.
                       /etc/oracle does not exist. Creating it now.
                       Successfully accumulated necessary OCR keys.
                       Creating OCR keys for user 'root', privgrp 'root'..
                       Operation successful.
                       Oracle Cluster Registry for cluster has been initialized

                       Adding to inittab
                       Checking the status of Oracle init process...
                       Expecting the CRS daemons to be up within 600 seconds.
                       CSS is active on these nodes.
                               mars
                       CSS is active on all nodes.
                       Oracle CSS service is installed and running under init(1M)
                       #

                     Click OK

 - End of Installation:
                     Click Exit


Updates after Running Oracle Universal Installer

After Oracle10g has been installed, make sure that ORACLE_HOME, PATH, and LD_LIBRARY_PATH are set for the oracle account.

Note that the path for ORACLE_HOME might be different on your system!
Also note that LD_LIBRARY_PATH is needed for some Oracle binaries such as sysresv!

For 10g R1 (10.1.0.3) I added the following lines to the ~oracle/.bash_profile file:
export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
For 10g R2 (10.2.0.1.0) I added the following lines to the ~oracle/.bash_profile file:
export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
After that run the following command to set all environment variables in ~oracle/.bash_profile:
$ . ~oracle/.bash_profile
This commmand will add the environment variables to the ~oracle/.profile and source in the file for the current shell by executing ". ~oracle/.bash_profile".

NOTE: Do not add a trailing "/" on the ORACLE_HOME environment variable. Otherwise you will get the error "ORACLE not available" when you try to connect to sys, see Oracle10g/Linux Errors and Problems for more information.
   Oracle Post-installation Tasks
Before you continue, make sure you followed the steps at Updates after Running Oracle Universal Installer.


Startup and Shutdown of the Oracle10g Database

To startup the database:
oracle$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup
To shutdown the database:
oracle$ sqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown
The slash connects you to the schema owned by SYS. In the above example you will be connected to the schema owned by SYS with the privilege SYSDBA. SYSDBA gives you the following privileges:
  - sysoper privileges WITH ADMIN OPTION
  - create database
  - recover database until


Shutdown of other Oracle 10g Background Processes

If you installed a preconfigured database using OUI, then several Oracle background processes are now running on your server. Execute the following command to see the background processes:
ps -ef

To shutdown the Oracle background processes after an Oracle Database 10g installation, you can execute the following commands:
?  iSQL*Plus
To stop iSQL*Plus, run:
su - oracle
isqlplusctl stop
?  Database Management Processes
During the installation of Oracle 10g, OUI offered two Database Management Options:

If you selected "Database Control for Database Management", then the Oracle Enterprise Manager Database Control (Database Control) can be shutdown with the following command which stops both the agent and the Oracle Containers for Java (OC4J) management service:
su - oracle
emctl stop dbconsole
If you selected "Grid Control for Database Management" which is used for full "Grid Control" installations, then the Oracle Management Agent (standalone agent) for the Oracle Enterprise Manager Grid Control (Grid Control) can be stopped with the following command:
su - oracle
emctl stop agent
?  Oracle Net Listener
To stop the listener, run:
su - oracle
lsnrctl stop
?  Cluster Synchronization Services (CSS)
To shutdown Oracle CSS daemon, run:
su - root
/etc/rc.d/init.d/init.cssd stop

   Tips and Hints for Oracle10g on Linux
?  To reinstall Oracle10g after a failed installation attempt, you might want to execute the following commands.
Make sure you first used the De-installation option in OUI.
su - root

export ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1
. $ORACLE_HOME/bin/localconfig delete    # stops the Oracle CSS daemon and deletes configuration

rm -rf /u01/app/oracle/*

rm -f /etc/oraInst.loc /etc/oratab
rm -rf /etc/oracle
rm -f /etc/inittab.cssd
rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv
Make also sure to unset and uncomment ORACLE_HOME from ~oracle/.bash_profile.


No comments:

Post a Comment

Best Blogger TipsGet Flower Effect