Obtaining Information about the SGA - Clearing the Buffer Cache

0 comments

Obtaining Information about the SGA

Obtaining Information about the SGA - Clearing the Buffer Cache

 

select value from v$parameter where upper(name)='MEMORY_TARGET';
select value/1024/1024 mb
from v$parameter where upper(name) = 'SGA_MAX_SIZE'
-- size taken by a memory component
select pool, round(sum(BYTES)/1024/1024) MB
from V$SGASTAT
group by pool
select name , value/1024/1024 MB
from v$parameter
where upper(name) in (
'DB_CACHE_SIZE','DB_RECYCLE_CACHE_SIZE','DB_KEEP_CACHE_SIZE', '
DB_2k_CACHE_SIZE', 'DB_8k_CACHE_SIZE', 'DB_16k_CACHE_SIZE')
-- 10g
SELECT COMPONENT , CURRENT_SIZE/1024/1024 MB
FROM V$SGA_DYNAMIC_COMPONENTS
WHERE CURRENT_SIZE <>0
-- Oracle 11g
SELECT COMPONENT, ROUND(CURRENT_SIZE/1024/1024) CURRENT_SIZE ,
ROUND(MIN_SIZE/1024/1024) MIN, ROUND(MAX_SIZE/1024/1024) MAX
FROM V$MEMORY_DYNAMIC_COMPONENTS;
-- To know how Oracle has modified the memory area sizes by time
select START_TIME, END_TIME, STATUS, COMPONENT, OPER_TYPE, OPER_MODE,
PARAMETER, INITIAL_SIZE/1024/1024 INITIAL_SIZE_MB,
TARGET_SIZE/1024/1024 TARGET_SIZE_MB, FINAL_SIZE/1024/1024 FINAL_SIZE_MB
from V$MEMORY_RESIZE_OPS
order by START_TIME, END_TIME

Clearing the Buffer Cache

ALTER SYSTEM FLUSH SHARED_POOL;
ALTER SYSTEM FLUSH BUFFER_CACHE ;


Read More »

Managing Oracle Database Instance - Product Release Number - Obtaining License Information - Obtaining Information about the Instance Processes

0 comments

Managing Oracle Database Instance
Managing Oracle Database Instance - Product Release Number - Obtaining License Information - Obtaining Information about the Instance Processes

Product Release Number

Oracle Database Release Number Format
SELECT * FROM PRODUCT_COMPONENT_VERSION;
SELECT * FROM V$VERSION
1.2.3.4.5
1 Major database release number
2 Maintenance release number
3 application server release number
4 component specific release number
5 platform specific release number

Obtaining License Information

-- Number of users and CPU/Processors
select L.SESSIONS_MAX, L.SESSIONS_WARNING, L.SESSIONS_CURRENT,
L.SESSIONS_HIGHWATER,
L.USERS_MAX, L.CPU_COUNT_CURRENT, L.CPU_SOCKET_COUNT_CURRENT,
L.CPU_COUNT_HIGHWATER,
L.CPU_CORE_COUNT_CURRENT, L.CPU_CORE_COUNT_HIGHWATER,
L.CPU_SOCKET_COUNT_HIGHWATER
from v$license l;
-- Database Edition
select banner from v$version where BANNER like '%Edition%';
-- Oracle Partitioning installed
select decode(count(*), 0, 'No', 'Yes')
from dba_part_tables
where owner not in ('SYSMAN', 'SH', 'SYS', 'SYSTEM') and rownum = 1;
-- Oracle Spatial installed:
select decode(count(*), 0, 'No', 'Yes')
from all_sdo_geom_metadata where rownum = 1;
-- Oracle RAC installed:
select decode(count(*), 0, 'No', 'Yes')
from v$active_instances where rownum <= 2;

Managing the Instance Architecture

Obtaining Information about the Instance Processes

ps –ef | grep ora
select name, description from V$BGPROCESS order by 1;

 


Read More »

Installing Oracle 11g R2 on Enterprise Linux 5.5 with ASM

0 comments

Installing Oracle 11g R2 on Enterprise Linux 5.5 with ASM

Installing Oracle 11g R2 on Enterprise Linux 5.5 with ASM

 

Note: for any installation, you should check the Release Notes documenation before taking

any practical step.

Installation Environment

 Emulation software: VMWare Workstation 7 for Windows

 OS: Oracle Enterprise Linux 5.5 for x86 64-bit

Required Software

 Oracle Database 11g Release 2 for Linux x86 64-bit

 Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux x86 64-bit

Used Hardware

 In the VMWare: create one virtual machine with the following specs:

o 2.5 GB RAM

o One ethernet card configured as bridged or host-only in VMware

o CPU Count: 2

o Disk1: 34 GB on SCSI 0:0 used to install the OS and software

o Disk2: of 12 GB. It will be used for +Data. Set it on controller SCSI 1:1

o Disk3: of 6 GB. It will be used for +Flash. Set it on controller SCSI 1:2

Installation Plan

1. Preinstallation tasks

 Hardware requirements

 Software requirements

 Environment configuration

2. Oracle Grid Infrastructure installation

3. Oracle Grid Infrastructure Patching

4. Oracle Database 11g R2 Software Installation

5. Oracle Database 11g R2 Software Patching

6. Install EM Agent in cluster nodes (if required)

7. ASM Diskgroups Creation

8. Database Creation

9. Complete postinstallation tasks

10. Useful postinstallation tasks

1. Preinstallation tasks

 Install Oracle Enterprise Linux in the first local hardisk. Install nothing in the remaining

disks.

Note: for a production system, consider becoming an Oracle Unbreakable Linux customer

and register your server on the Unbreakable Linux Network.

o Configure the swap area in the local hardisk to have 6 GB disk space.

o Give the ethernet card IP 192.168.4.105 the hostname srv07

o Insall the following packages:

 Desktop Environments

o GNOME Desktop Environment

 Applications

o Graphical Internet (optional)

o Editors (optional)

 Development

o Development Libraries

o Development Tools

 Servers

o Do not select anything in this group.

 Base System

o Administration Tools

o System Tools

 Add the package 'sysstat' by clicking on the Details link

and selecting "sysstat - The sar an iostat system

monitoring commands." from the Optional Packages list.

 X Window System

 Complete the installation

 Install further packages:

# to know distribution and version of Linux

cat /etc/issue

# to know kernel version (and its errata level) (2.6.18-194.el5)

uname -r

# to list missed packages:

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

compat-libstdc++-33 \

elfutils-libelf \

elfutils-libelf-devel \

gcc \

gcc-c++ \

glibc \

glibc-common \

glibc-devel \

glibc-headers \

ksh \

libaio \

libaio-devel \

libgcc \

libstdc++ \

libstdc++-devel \

make \

sysstat \

unixODBC \

unixODBC-devel

# for missed packages, install them:

rpm -Uvh elfutils-libelf-0.137-3.el5.i386.rpm

rpm -ivh elfutils-libelf-devel-static-0.137-3.el5.i386.rpm elfutils-libelfdevel-

0.137-3.el5.i386.rpm

rpm -Uvh kernel-headers-2.6.18-194.el5.x86_64.rpm

rpm -Uvh glibc-headers-2.5-49.x86_64.rpm

rpm -Uvh glibc-devel-2.5-49.i386.rpm

rpm -Uvh glibc-devel-2.5-49.x86_64.rpm

rpm -Uvh libgomp-4.4.0-6.el5.x86_64.rpm

rpm -Uvh gcc-4.1.2-48.el5.x86_64.rpm

rpm -Uvh gcc-c++-4.1.2-48.el5.x86_64.rpm

rpm -Uvh libstdc++-devel-4.1.2-48.el5.x86_64.rpm

rpm -Uvh gcc-c++-4.1.2-48.el5.x86_64.rpm

rpm -Uvh libaio-devel-0.3.106-5.i386.rpm

rpm -Uvh libaio-devel-0.3.106-5.x86_64.rpm

rpm -Uvh unixODBC-2.2.11-7.1.i386.rpm

rpm -Uvh unixODBC-2.2.11-7.1.x86_64.rpm

rpm -Uvh unixODBC-devel-2.2.11-7.1.i386.rpm

rpm -Uvh unixODBC-devel-2.2.11-7.1.x86_64.rpm

# Oracle ASM Libaray and drivers can be downloaded from here

# to know the kernel verion: uname -rm

# In this case we need:

# library and tools

rpm -Uvh oracleasm-support-2.1.3-1.el5.x86_64.rpm

rpm -Uvh oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm

rpm -Uvh oracleasmlib-2.0.4-1.el5.x86_64.rpm

# SELINUX must be disabled

cat /etc/selinux/config | grep SELINUX=

vi /etc/selinux/config

SELINUX=disabled

shutdown -h now -r

 Check the hardware requirements

# Hardware Requirements (in cluster nodes)

# At least 1.5 GB of physical memory but practically 1.5 is not fine

grep MemTotal /proc/meminfo

# swap space: same as the amount of physical memory

grep SwapTotal /proc/meminfo

# to display swap and memory in one command:

free

# if you don't have enought swap,

# you can add swap space by creating a temporary swap file.

# let's say about 500MB:

dd if=/dev/zero of=tempswap bs=1k count=500000

chmod 600 tempswap

mke2fs tempswap

mkswap tempswap

swapon tempswap

# 1 GB disk space in /tmp

df -h /tmp

# 8 GB of disk space for Oracle software

df

The size of the shared memory should be at least the greater of

MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.

To determine the amount of shared memory available, enter the following

command:

df -h /dev/shm/

# to adjust the shared memory file system size:

umount tmpfs

mount -t tmpfs shmfs -o size=1200m /dev/shm

 Create the required network configuration:

ping srv07

# Network names Resolution

cat /etc/hosts

127.0.0.1 srv07 localhost.localdomain localhost

 Create and configure the required OS users and groups

Note: When I tried using differenct OS users and groups for Grid Infrastrucutre and ASM,

I got error later in DBCA.

# Grid Infrastructure (GI) and the Oracle RDBMS home will

# be installed using different users:

/usr/sbin/groupadd -g 501 oinstall

/usr/sbin/groupadd -g 502 dba

/usr/sbin/groupadd -g 504 asmadmin

/usr/sbin/useradd -u 502 -g oinstall -G dba,asmadmin oracle

# set passwords

passwd oracle

# make sure nobody user exists (if not there, create it useradd nobody)

id nobody

# define the env variables for oracle user

vi /home/oracle/.bash_profile

# Oracle Settings

export EDITOR=vi

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=srv07; export ORACLE_HOSTNAME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_SID=oradb; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/jdk/jre/lib/:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

export CLASSPATH

# shell startup file

vi /etc/profile

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

# for C shell

vi /etc/csh.login

if ( $USER = "oracle" || $USER = "grid" ) then

limit maxproc 16384

limit descriptors 65536

endif

 Configure kernel parameters and shell limits

Note: If you make a mistake with a parameter setting and your system does not start,

then you must start Linux in the single-user runlevel (runlevel 1). At this runlevel, the

/etc/sysctl.conf file is not run.

# Kernel Parameters

# to tune thme, refer to metalink document 169706.1

# Append the following to the /etc/sysctl.conf file as the root user:

vi /etc/sysctl.conf

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576

fs.file-max = 6815744

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

# to take immediate effect

/sbin/sysctl -p

# User Shell Limits

# memlock is used to increase the per-process max locked memory

vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

vi /etc/pam.d/login

session required pam_limits.so

 Create partitions in the disks:

Note: On a real life storage, you would create a single whole-disk partition with exactly 1 MB

offset on each LUN to be used as ASM Disk. In fdisk: u (to change units from cylinder to

sectors), n, p, 1, 2048, w.

# as a root, for the disks /dev/sdb .. /dev/sdd

# confirm they are seen:

ls /dev/sd*

#partition the disks:

fdisk /dev/sdb

# answers: "n", "p", "1", "Return", "Return", "p" and "w"

Note: if the following message appears after the "w" command:

WARNING: Re-reading the partition table failed with error 16: Device or

resource busy, then you can avoid restarting the machine by the following

command: partprobe

# to make sure partions are created

ls -lX /dev/sd*

 Configure ASM drivers:

# as root (to be done in all nodes)

oracleasm configure -i

Default user to own the driver interface []: oracle

Default group to own the driver interface []: asmadmin

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

Fix permissions of Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

# Load the kernel module using the following command:

/usr/sbin/oracleasm init

# If you have any problems, make sure you have the correct

# version of the driver (may require Internet connection):

/usr/sbin/oracleasm update-driver

# mark the shared disks: (one node)

/usr/sbin/oracleasm createdisk DISK1 /dev/sdb1

/usr/sbin/oracleasm createdisk DISK2 /dev/sdc1

# check the disks are marked and seen:

/usr/sbin/oracleasm listdisks

#If you need to unmark a disk that was used in a createdisk command:

/usr/sbin/oracleasm deletedisk DISK1

/usr/sbin/oracleasm deletedisk DISK2

 Create the required directories for the Oracle software:

# to know if there is an existing oracle inventory

# from its output, ORACLE_BASE will be parent of oraInventory

more /etc/oraInst.loc

# to identify existing Oracle home directories

more /etc/oratab

# Oracle Inventory Directory

# as a root

mkdir -p /u01/app/oraInventory

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

chmod -R 775 /u01/app/oraInventory

# Grid Infrastructure Home Directory

mkdir -p /u01/11.2.0/grid

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

chmod -R 775 /u01/11.2.0/grid

# Oracle Base Directory

mkdir -p /u01/app/oracle

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

chmod -R 775 /u01/app/oracle

#needed to ensure that dbca is able to run after the rdbms installation

mkdir /u01/app/oracle/cfgtoollogs

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

chmod -R 775 /u01/app/oracle

# Oracle RDBMS Home Directory

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

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

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

2. Oracle Grid Infrastructure installation

# software staging folder

mkdir -p /u01/app/stage/ora11gr2gridinfra

chown -R oracle:oinstall /u01/app/stage/ora11gr2gridinfra

chmod -R 775 /u01/app/stage/ora11gr2gridinfra

mkdir -p /u01/app/stage/ora11gr2db

chown -R oracle:oinstall /u01/app/stage/ora11gr2db

chmod -R 775 /u01/app/stage/ora11gr2db

# as oracle: copy Grid software files to /u01/app/stage/ora11gr2db

# as root:

chmod -R 775 /u01/app/stage/ora11gr2gridinfra

# lunch OUI from the clusterware ( as oracle)

cd /u01/app/stage/ora11gr2gridinfra

./runInstaller

Installation Option

>Select radio button 'Install and Configure Grid Infrastructure for a

Standalone Server'

>Next

Product Language

>Accept 'English' as language'

>Next

Creat ASM Disk Group

>Disk Group Name: Data (12GB disk: DISK1)

>Redundancy: external

>Next

NOTE: If you see an empty screen for you candidate disks it is likely that

ASMLib has not been properly configured or installed. Try reconfigure them.

If you are sure that ASMLib has been properly configured click on 'Change

Discovery Path' and provide the correct destination.

ASM Password

>Specify and conform the password you want to use

>Next

Privileged OS Groups

>Assign the correct OS groups for OS authentication (mostly default is OK)

>Next

Installation Location

>ORACLE_BASE: /u01/app/oracle

Software location: /u01/11.2.0/grid

>Next

Create Inventory

>Specify the locations: /u01/app/oraInventory

>Next

Perform Prerequisite Checks

>Check that status of all checks is Succeeded

>Next

Summary

>Finish

Execute Configuration Scripts

>Run the scripts as instructed in the screen

>OK

>Next

Message: The installation of the Grid Infrastructure was successfull.

>Close

3. Oracle Grid Infrastructure Patching

Apply patch set, if there is any.

4. Oracle Database 11g R2 Software Installation

# as oracle: copy DB software files into /u01/app/stage/ora11gr2db

# as root:

chmod -R 775 /u01/app/stage/ora11gr2db

-- start OUI

su - oracle

cd /u01/app/stage/ora11gr2db

./runInstaller

Follow the steps.

Install database software only.

When executing root.sh, select "y" for ovewriting questions.

5. Oracle Database 11g R2 Software Patching

6. Install EM Agent in cluster nodes (if required)

7. ASM Diskgroups Creation

# as grid user: start the ASM Configuration Assistant (ASMCA)

su - oracle

cd /u01/11.2.0/grid/bin

./asmca

>Disk Groups tab

>Create button

>Disk Group Name: FLASH

>Redundancy: External

>DISK2

>OK

>Exit

>Yes

8. Database Creation

# as oracle

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

./dbca

follow the steps to create a database with sid: oradb

The DBCA may pop up the following message in the end of db creation:

"Error securing Database control, Database Control has been brought up in nonsecure

mode. To secure the Database Control execute the following commands:

... "

# check Oracle processes:

ps -eo pid -o command | grep ora_ | grep -v grep

9. Postinstallation tasks

# backup the root.sh script

cp /u01/app/oracle/product/11.2.0/db_1/root.sh ~/root.sh.bak

cont>>

10. General Useful Postinstallation Tasks in Linux

 Consider using rlwrap utility with SQL*Plus and RMAN:

o Using rlwrap Utility with RMAN in Unix-Based Systems

o Using rlwrap Utility with SQL*Plus in Unix-Based Systems

/* Make crs_stat -t more readable */

/* copy the following script into ~/scripts/crstat.sh */

#!/usr/bin/ksh

#

# Sample 10g CRS resource status query script

#

# Description:

# - Returns formatted version of crs_stat -t, in tabular

# format, with the complete rsc names and filtering keywords

# - The argument, $RSC_KEY, is optional and if passed to the script, will

# limit the output to HA resources whose names match $RSC_KEY.

# Requirements:

# - $ORA_CRS_HOME should be set in your environment

# suggested scrip name: crstat.sh

RSC_KEY=$1

QSTAT=-u

AWK=/usr/bin/awk # if not available use /usr/bin/awk

# Table header:echo ""

$AWK \

'BEGIN {printf "%-45s %-10s %-18s\n", "HA Resource", "Target", "State";

printf "%-45s %-10s %-18s\n", "-----------", "------", "-----";}'

# Table body:

$ORA_CRS_HOME/bin/crs_stat $QSTAT | $AWK \

'BEGIN { FS="="; state = 0; }

$1~/NAME/ && $2~/'$RSC_KEY'/ {appname = $2; state=1};

state == 0 {next;}

$1~/TARGET/ && state == 1 {apptarget = $2; state=2;}

$1~/STATE/ && state == 2 {appstate = $2; state=3;}

state == 3 {printf "%-45s %-10s %-18s\n", appname, apptarget, appstate;

state=0;}'

# then add the following in the .bashrc of oracle user

# if the file was saved in ~/scripts/crstat.sh

alias crstat='~/scripts/crstat.sh'

/* Easy Acces to crs and db homes */

# it is common to access bin directories in clusterware and db homes

# add the following to .bashrc of oracle user

alias db='cd /u01/app/oracle/product/11.2.0/db_1/bin'

# add the following to .bashrc of grid user

alias crs='cd /u01/app/oracle/crs/bin'



Read More »

Installing Oracle 11g R2 on Enterprise Linux 5

0 comments

Installing Oracle 11g R2 on Enterprise Linux 5

Installing Oracle 11g R2 on Enterprise Linux 5

 

Note: for any installation, you should check the Release Notes documenation before taking any practical step.

Installation Environment

 Emulation software: VMWare Workstation 7 for Windows

 OS: Red Hat Enterprise Linux 5.2 for x86

Required Software

 Oracle Database 11g Release 2 for Linux x86 32-bit

Used Hardware

 In the VMWare: create one virtual machine with the following specs:

o 2.0 GB RAM

o One ethernet cards: can be configured as bridged or host-only in VMware.

o One local hardisk with 32 GB on SCSI 0:0. It will be used for software installation.

o One local hardisk with 20 GB on SCSI 1:0. It will be used for Oracle Database data

files.

o One local hardisk with 20 GB on SCSI 1:1. It will be used for Oracle Database flash

recovery.

o CPU Count: 2 (optional)

Installation Plan

1. Preinstallation tasks:

o Hardware requirements

o Software requirements

o Environment configuration

2. Oracle Database 11g Software Installation

3. Apply Patchset

4. Configure Listeners

5. Create Database

6. Postinstallation tasks

1. Preinstallation tasks

 Install Oracle Enterprise Linux in the first local hardisk. Install nothing in the remaining

disks.

Note: for a production system, consider becoming an Oracle Unbreakable Linux customer
and register your server on the Unbreakable Linux Network.

o Give the ethernet card IP 192.168.4.100 and the hostname srv100.mydomain.com.

Define a gateway. If it does not exist, make it same as the host IP address.

o Insall the following packages:

 Desktop Environments

o GNOME Desktop Environment

 Applications

o Graphical Internet (optional)

o Editors (optional)

 Development

o Development Libraries

o Development Tools

 Servers

o Do not select anything in this group.

 Base System

o Administration Tools

o System Tools

 Add the package 'sysstat' by clicking on the Details link

and selecting "sysstat - The sar an iostat system

monitoring commands." from the Optional Packages list.

 X Window System

 Complete the installation

 RHEL 5 Bug: After the Installation compelets, RHEL 5.2 and below will hang on booting

when it reaches to "starting udev" line. To solve this problem, shutdown the Vmware

machine and change the CPU count and Core Count to only one. Implement the changes

below, then shutdown the machine, set CPU count back to 2 and startup the machine.

put the kernel command line parameters at the end of the "kernel" line:

vi /boot/grub/grub.conf

add divider=10 clocksource=acpi_pm

For example: kernel /vmlinuz-2.6.18 .. clock=acpi_pm divider=10

 For Vmware machines, install VMWare tools.

 Install further packages:

# to know distribution and version of Linux (Red Hat Ent. 5.2 used)
cat /etc/issue
# to know kernel version (and its errata level) (2.6.18-92 or newer)
uname -r
# to list missed packages:
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \

gcc-c++ \

glibc \

glibc-common \

glibc-devel \

glibc-headers \

ksh \

libaio \

libaio-devel \

libgcc \

libstdc++ \

libstdc++-devel \

make \

sysstat \

unixODBC \

unixODBC-devel

# for missed packages, install them:

rpm -Uvh libaio-devel-0.3.106-3.2.i386.rpm

rpm -Uvh unixODBC*

# SELINUX must be disabled

cat /etc/selinux/config | grep SELINUX=

vi /etc/selinux/config

SELINUX=disabled

shutdown -h now -r

 Check the hardware requirements

# Hardware Requirements (in cluster nodes)

# At least 1.0 GB of physical memory

grep MemTotal /proc/meminfo

# swap space: same as the amount of physical memory

grep SwapTotal /proc/meminfo

# to display swap and memory in one command:

free

# if you don't have enought swap,

# you can add swap space by creating a temporary swap file.

# let's say about 500MB:

dd if=/dev/zero of=tempswap bs=1k count=500000

chmod 600 tempswap

mke2fs tempswap

mkswap tempswap

swapon tempswap

# 1 GB disk space in /tmp

df -h /tmp

# 4 GB of disk space for Oracle software

df

The size of the shared memory should be at least the greater of

MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.

To determine the amount of shared memory available, enter the following

command:

df -h /dev/shm/

# to adjust the shared memory file system size:

umount tmpfs

mount -t tmpfs shmfs -o size=1200m /dev/shm

 Create the required network configuration:

ping srv100

ping srv100.mydomain.com

# Network names Resolution

# configure /etc/hosts if no domain server is used

cat /etc/hosts

127.0.0.1 srv100.mydomain.com srv100 localhost.localdomain

localhost

 Create and configure the required OS users and groups

# all group and user ids on all the nodes must have identical id

# Grid Infrastructure (GI) and the Oracle RDBMS home will

# be installed using different users:

# oracle inventory group

/usr/sbin/groupadd -g 501 oinstall

/usr/sbin/groupadd -g 502 dba

/usr/sbin/useradd -u 502 -g oinstall -G dba oracle

# set passwords

passwd oracle

# make sure nobody user exists (if not there, create it useradd nobody)

id nobody

# define the env variables for oracle user

vi /home/oracle/.bash_profile

# Oracle evn vars

export EDITOR=vi

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=srv100.mydomain.com

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export ORACLE_SID=ora11gr2

export ORACLE_TERM=xterm

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

# shell startup file

vi /etc/profile

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

umask 022

fi

# for C shell

vi /etc/csh.login

if ( $USER = "oracle" || $USER = "grid" ) then

limit maxproc 16384

limit descriptors 65536

endif

 Configure kernel parameters and shell limits

Note: If you make a mistake with a parameter setting and your system does not start, then

you must start Linux in the single-user runlevel (runlevel 1). At this runlevel, the

/etc/sysctl.conf file is not run.

# Configuring kernel parameters and shell limits

# they can be tuned for a production db

# Append the following to the /etc/sysctl.conf file as the root user:

vi /etc/sysctl.conf

# kernel.shmmax not stated in 11g R2 (max: 4GB) (169706.1)

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576

fs.file-max = 6815744

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

# to take immediate effect

/sbin/sysctl -p

# User Shell Limits

# memlock is used to increase the per-process max locked memory

vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

vi /etc/pam.d/login

session required pam_limits.so

 Create the required directories for the Oracle database software:

# to know if there is an existing oracle inventory

# from its output, ORACLE_BASE will be parent of oraInventory

more /etc/oraInst.loc

# to identify existing Oracle home directories

more /etc/oratab

# Oracle Inventory Directory

# as a root

mkdir -p /u01/app/oraInventory

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

chmod -R 775 /u01/app/oraInventory

# Oracle Base Directory

mkdir -p /u01/app/oracle

#needed to ensure that dbca is able to run after the rdbms installation

mkdir -p /u01/app/oracle/cfgtoollogs

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

chmod -R 775 /u01/app/oracle

# Oracle RDBMS Home Directory

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

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

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

# staging area to hold software installation

mkdir -p /u01/stage11g/db

chown -R oracle:oinstall /u01/stage11g/db

chmod -R 775 /u01/stage11g/db

 Partition and mount the disks:

#define the disks to partition

fdisk -l | grep '^Disk'

# as a root, for the disks /dev/sdb and /dev/sdc

#partition the disks:

fdisk /dev/sdb

# answers: "n", "p", "1", "Return", "Return", "p" and "w"

Note: if the following message appears after the "w" command:

WARNING: Re-reading the partition table failed with error 16: Device or

resource busy, then you can avoid restarting the machine by the following

command: partprobe

# to make sure partions are created

ls -lX /dev/sd*

# format the paritions

mkfs.ext3 /dev/sdb1

mkfs.ext3 /dev/sdc1

# Mount the new disk

mkdir /u02

mount /dev/sdb1 /u02

mkdir /u03

mount /dev/sdc1 /u03

df -H

# Update /etc/fstab

vi /etc/fstab

/dev/sdb1 /u02 ext3 defaults 1 2

/dev/sdc1 /u03 ext3 defaults 1 2

# create folder for the db data

mkdir -p /u02/oradata/

chown -R oracle:oinstall /u02/oradata/

chmod -R 775 /u02/oradata/

# create folder for the flash area

mkdir -p /u03/oraflash/

chown -R oracle:oinstall /u03/oraflash/

chmod -R 775 /u03/oraflash/

 As oracle, copy software installation into /u01/stage11g/db

2. Oracle Database 11g Software Installation

-- start OUI

su - oracle

cd /u01/stage11g/db

./runInstaller

Follow the steps.

Install database software only.

3. Apply Patchset

4. Configure Listeners

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

./netca &

Add a new listener

Add Naming mtehods: Local Naming, EZConnect

5. Create Database

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

./dbca &

follow the steps to create a database with sid: ora11gr2

The DBCA may pop up the following message in the end of db creation:

"Error securing Database control, Database Control has been brought up in nonsecure

mode. To secure the Database Control execute the following commands:

... "

6. Postinstallation Tasks

 Verify OEM:

# verify that OEM is working

https://srv100.mydomain.com:1158/em

# restart the dbconsole if required

emctl status dbconsole

emctl stop dbconsole

emctl start dbconsole

# check Oracle processes:

ps -eo pid -o command | grep ora_ | grep -v grep

 Consider implementing automatic database startup. See: Automatically Starting Databases

 Consider implementing automatic EM Database Control startup. See: Implementing EM

Database Control Auto Startup

 Consider using rlwrap utility with SQL*Plus and RMAN:

o Using rlwrap Utility with RMAN in Unix-Based Systems

o Using rlwrap Utility with SQL*Plus in Unix-Based Systems

 For easy Oracle Home access:

echo "alias db='cd $ORACLE_HOME'" >> /home/oracle/.bashrc



Read More »

Installing Oracle 10g R2 on Enterprise Linux 4

0 comments

Installing Oracle 10g R2 on Enterprise Linux 4

Installing Oracle 10g R2 on Enterprise Linux 4

Installation Environment

 Emulation software: VMWare Server 2 on for Windows
 OS: Oracle Linux Enterprise 4.5 for x86: kernel 2.6.9

Required Software

 Oracle Database 10g Release 2 for Linux x86 32-bit

Used Hardware

 In the VMWare: create one virtual machine (oradb1) with the following specs:
o 2 GB RAM
o an ethernet card
o one local hardisk with 20 GB
Installation Plan
1. Preinstallation tasks:
o Hardware requirements
o Software requirements
o Environment configuration
2. Oracle Database 10g Software Installation
3. Apply Patchset 3 (10.2.0.4) for Clusterware and Database Software
4. Configure Listeners
5. Create Database
6. Postinstallation tasks
1. Preinstallation tasks
 Install Oracle Enterprise Linux in the first local hardisk. Install nothing in the remaining
disks.
Note: for a production system, consider becoming an Oracle Unbreakable Linux customer
and register your server on the Unbreakable Linux Network.

o Give the ethernet card IP 192.168.4.21 and the hostname oradb1.mydomain.com.
Define a gateway. If it does not exist, make it same as the host IP address.
o Insall the following packages:
 Desktop Environments
o GNOME Desktop Environment

 Desktop
o X Window System
o Gnome
 Applications
o Graphical Internet (optional)
 Servers
o Do not select anything in this group.
 Development
o Development Tools
 System
o Administration Tools
o System Tools
 Add the package 'sysstat' by clicking on the Details link
and selecting "sysstat - The sar an iostat system
monitoring commands." from the Optional Packages list.
 Miscellaneous
o Do not select anything in this group.
 Complete the installation
 Install further packages:
# to know distribution and version of Linux
cat /etc/issue
# to know kernel version (and its errata level)
uname -r
# from CD 3
rpm -Uvh libaio*
rpm -Uvh openmotif21-2.1.30-11.RHEL4.6.i386.rpm
rpm -Uvh openmotif-2.2.3-10.1.el4.i386.rpm
# those packages downloaded from http://rpm.pbone.net
rpm -e compat-libstdc++-296-2.96-132.7.2
rpm -Uvh compat-libstdc++-7.3-2.96.128.i386.rpm
rpm -Uvh compat-libstdc++-devel-7.3-2.96.128.i386.rpm
rpm -Uvh compat-gcc-7.3-2.96.128.i386.rpm
rpm -Uvh compat-gcc-c++-7.3-2.96.128.i386.rpm
# confirm the required packages are installed:
rpm -qa|grep gccrpm
-qa|grep glibcrpm
-qa|grep compat-dbrpm
-qa|grep compat-gccrpm
-qa|grep compat-gcc-c++-
rpm -qa|grep compat-libstdc++-
rpm -qa|grep compat-libstdc++-develrpm
-qa|grep control-center-2.8.0
rpm -qa|grep openmotif21-
rpm -qa|grep setarch-
# SELINUX must be disabled

cat /etc/selinux/config | grep SELINUX=
vi /etc/selinux/config
SELINUX=disabled
shutdown -h now -r
 Check the hardware requirements
# Hardware Requirements
# At least 2 GB of physical memory
grep MemTotal /proc/meminfo
# swap space: twice the amount of physical memory
grep SwapTotal /proc/meminfo
# if you don't have enought swap,
# you can add swap space by creating a temporary swap file.
# let's say about 500MB:
dd if=/dev/zero of=tempswap bs=1k count=500000
chmod 600 tempswap
mke2fs tempswap
mkswap tempswap
swapon tempswap
# 400 MB disk space in /tmp
df -k /tmp
# 4 GB of disk space for Oracle software
df
The size of the shared memory should be at least the greater of
MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.
To determine the amount of shared memory available, enter the following
command:
df -h /dev/shm/
# to adjust the shared memory file system size:
umount tmpfs
mount -t tmpfs shmfs -o size=1200m /dev/shm
 Create the required network configuration:
# Network names Resolution
# configure /etc/hosts if no domain server is used
cat /etc/hosts
127.0.0.1 localhost.localdomain oradb1.mydomain.com localhost
oradb1
 Create and configure the required OS users and groups
# inventory group
groupadd -g 501 oinstall
groupadd -g 502 dba
# oracle software owner user
/usr/sbin/useradd -u 200 -g oinstall -G dba oracle
passwd oracle
# make sure nobody user exists (if not there, create it useradd nobody)
id nobody
# The oracle User Environment
# in /home/oracle/.bash_profile
# export DISPLAY if required
export ORACLE_BASE=/u01/app/oracle
if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
export EDITOR=vi
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=ora10g
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export NLS_DATE_FORMAT="mm/dd/yyyy hh24:mi:ss"
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
# User Shell Limits
# memlock is used to increase the per-process max locked memory
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft memlock 3145728
oracle hard memlock 3145728
 Configure kernel parameters and shell limits
Note: If you make a mistake with a parameter setting and your system does not start, then
you must start Linux in the single-user runlevel (runlevel 1). At this runlevel, the
/etc/sysctl.conf file is not run.
# Configuring kernel parameters and shell limits
# they can be tuned for a production db
# Append the following to the /etc/sysctl.conf file as the root user:
vi /etc/sysctl.conf
kernel.sem = 250 32000 100 128
# maximum size may be given to SGA (max 4GB)
# kernel.shmmax = 536870912 (512 M)
# following is 1 GB
kernel.shmmax =1073741824
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304

net.core.wmem_default = 262144
net.core.wmem_max = 262144
# to take immediate effect
/sbin/sysctl -p
 Configure hangcheck-timer kernel module:
# check hangcheck-timer Module Configuration
# with this module, if the kernel hangs, the machine will reboot
# verify the module is loaded
/sbin/lsmod | grep -i hang
# if not loaded, load it
vi /etc/modprobe.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
# execute and add in the file
vi /etc/rc.local
/sbin/modprobe hangcheck-timer
 Create the required directories for the Oracle database software:
# to know if there is an existing oracle inventory
# from its output, ORACLE_BASE will be parent of oraInventory
more /etc/oraInst.loc
# to identify existing Oracle home directories
more /etc/oratab
# in the example above, /u01 should be owned by the root user
# and writable by group oinstall
cd /
chown -R oracle:oinstall /u01
chmod -R 775 /u01/oracle
mkdir -p /u01/app/oracle/product/10.2.0/db_1
mkdir /u01/stage
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/oracle
chown oracle:oinstall /u01/stage
 As oracle, copy software installation into /u01/stage10g/db
 Disable screensavers on host & guest machines.
o In Oracle Linux: Applications-> Preferences-> Screen Saver-> Mode: Disable Screen
Saver
o Do the same after logging off and logging on again as oracle user.
 Restart the machine.

2. Oracle Database 10g Software Installation

-- start OUI
su - oracle
cd /u01/stage10g/db
./runInstaller
Follow the steps.
Install database software only.
3. Apply Patchset 3 (10.2.0.4) for Clusterware and Database Software
# extract 10g Release 2 (10.2.0.4) Patch Set 3 for Linux x86 to

/u01/stage10g/patch10.2.0.4/Disk1
mkdir /u01/stage10g/patch10.2.0.4
cd /u01/stage10g/patch10.2.0.4/Disk1
./runInstaller
Select path of ORACLE_HOME ->Next
4. Configure Listeners
cd /u01/app/oracle/product/10.2.0/db_1/bin
./netca &
Add a new listener
-- optionally, use net manager to manually register the database:
./netmgr
5. Create Database
cd /u01/app/oracle/product/10.2.0/db_1/bin
./dbca &
follow the steps to create a customized database of SID "ora10g" and Global
nmae "ora10g.oradb1".
Do not use specific templates (non-Custom).
The DBCA may pop up the following message in the end of db creation:
"Error securing Database control, Database Control has been brought up in nonsecure
mode. To secure the Database Control execute the following commands:
... "
# check the Oracle processes:
ps -eo pid -o command | grep ora_ | grep -v grep
6. Postinstallation Tasks
 Verify OEM:
# verify that OEM is working
http://oradb1:1158/em
# restart the dbconsole if required
emctl status dbconsole
emctl stop dbconsole
emctl start dbconsole
 Verify iSQL*Plus:
# in the browser
http://oradb1:5560/isqlplus
# if not running:
isqlplusctl start
 Consider implementing automatic database startup. See: Automatically Starting Databases
 Consider implementing automatic EM Database Control startup. See: Implementing EM
Database Control Auto Startup
 Consider using rlwrap utility with SQL*Plus and RMAN:
o Using rlwrap Utility with RMAN in Unix-Based Systems
o Using rlwrap Utility with SQL*Plus in Unix-Based Systems
 For easy Oracle Home access:

echo "alias db='cd $ORACLE_HOME'" >> /home/oracle/.bashrc


Read More »

Oracle Database Installation Optimal Flexible Architecture

0 comments

Oracle Database Installation Optimal Flexible Architecture

Oracle Database Installation Optimal Flexible Architecture

 The OFA is a set of recommendations from Oracle Corporation aimed at simplifying
management of complex software and databases often running under multiple versions of
software.

 

 OFA Guidelines
o Arrange at least four mount points that have names like /u01, /u02, /u03, and so
on.
o If the Oracle software owner is "oracle", make /u01/app/oracle your ORACLE_BASE
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
o Make Oracle_HOME $ORACLE_BASE/product/version/{db|client|companion}_[n].


Examples:
/u01/app/oracle/product/11.1.0/db_1
/u01/app/oracle/product/11.1.0/client_1
/u01/app/oracle/product/10.1.0.2.0/db_1
o Install Flash Recovery Area in $ORACLE_BASE/flash_recovery_area in a mount point
different from db files.
o Administrative Files are to be created in ORACLE_BASE/admin/dbname
o Store Oracle DB files in the mounted points.
# mkdir /mount_point/oradata
# chown oracle:oinstall /mount_point/oradata
# chmod 775 /mount_point/oradata
/u01/oradata/prod1/control01.ctl
/u05/oradata/prod1/control02.ctl
/u02/oradata/prod1/redo01.log
/u04/oradata/prod1/redo02.log
data file has this format:
/u20/oradata/prod/system01.dbf

 

Oracle Products Installed with the 11.1 Release

 

 The following products are installed by default with database server 11g:

o Oracle Application Express
o Oracle Warehouse Builder
o Oracle Configuration Manager: Tool that collects and uploads configuration
information to the Oracle configuration repository
o Oracle SQL Developer
o Oracle Database Vault: Tool that enables you to secure business data


Read More »

Oracle Database Installation Estimating Disk and Memory Requirements Consideration

0 comments
Oracle Database Installation  Estimating Disk and Memory Requirements Consideration

Oracle Database Installation  Estimating Disk and Memory Requirements Consideration

  •  Make sure the storage vendor is listed in the Oracle Storage Compatibility Program (OSCP).

  •  Allocate swap space that is about two to three times your Oracle RAM allocation.

  •  On Estimating the RAM:

    o OS RAM: 20 percent of total RAM for MS-Windows, 10% of RAM for UNIX

    o Each Oracle connection consumes two megabytes of RAM + sort_area_size + hash_area_size

     

     If dynamic memory sizing is not used:

  •  Shared_pool_size: If all the SQL statements that sent to ORACLE are using bind variable adequately, then 300M is enough in most cases

  •  Large_pool_size: For dedicated Oracle server: 20-30M

  • Java_pool_size=10M

  •  Data buffer: All the rest RAM should be allocated to Data buffer.


Read More »

DBA RAC Tips Best Practice Guidelines for Standalone and RAC Databases

1 comments
DBA  RAC Tips Best Practice Guidelines for Standalone and RAC Databases

DBA  RAC Tips : Best Practice Guidelines for Standalone and RAC Databases

  •  Use SPFILE

  •  Use temporary tablespaces

  •  Register all instances with remote listeners

  •  Use Database Resource Manager

  •  Use resumable space allocation

  •  Use Automatic Segment Space Management

  •  Use locally managed tablespaces

  •  Use Automatic Undo Management

  •  Enable block checking

  •  Enable Flashback Database

  •  Enable ARCHIVELOG mode and use a flash recovery area

  •  Use auto-tune checkpointing

  •  Log checkpoints to the alert log

  •  Multiplex production and standby redo logs

  •  Set CONTROL_FILE_RECORD_KEEP_TIME long enough

  •  Create two or more control files


Read More »

CREATE ORACLE DATABASE MANUALLY ON LINUX STEP BY STEP PROCESS

0 comments

CREATE ORACLE DATABASE MANUALLY ON LINUX   STEP BY STEP  PROCESS

CREATE ORACLE DATABASE MANUALLY ON LINUX   STEP BY STEP  PROCESS

CREATE ORACLE DATABASE MANUALLY ON LINUX   STEP BY STEP  PROCESS

 


In this article shows you steps to create a database manually on Linux.

Step 1:

First create all the necessary directories. Followings are my directories:

testdb1]$ ls

admin backup archive

admin]$ ls

adump bdump cdump udump

Step 2:

Next prepare the database creation script. Following is my script "testdb1.sql"

CREATE DATABASE "testdb1"

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXDATAFILES 100

MAXINSTANCES 1

MAXLOGHISTORY 292

LOGFILE

GROUP 1 '/d02/monish/testdb1/redo1.log' SIZE 10M,

GROUP 2 '/d02/monish/testdb1/redo2.log' SIZE 10M,

GROUP 3 '/d02/monish/testdb1/redo3.log' SIZE 10M

DATAFILE

'/d02/monish/testdb1/system.dbf' size 100m,

'/d02/monish/testdb1/usr04.dbf' size 10m

sysaux datafile '/d02/monish/testdb1/sysaux.dbf' size 100m

undo tablespace undotbs

datafile '/d02/monish/testdb1/undo.dbf' size 50m

CHARACTER SET US7ASCII

;

Step 3:

Prepare the init file. Like this one [inittestdb1.ora]

*.audit_file_dest='/d02/monish/testdb1/admin/adump'

*.background_dump_dest='/d02/monish/testdb1/admin/bdump'

*.compatible='10.2.0.3.0'

*.control_files='/d02/monish/testdb1/control01.ctl',

'/d02/monish/testdb1/control02.ctl','/d02/monish/testdb1/control03.ctl'

*.core_dump_dest='/d02/monish/testdb1/admin/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='testdb1'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=indiaXDB)'

*.job_queue_processes=10

*.log_archive_dest_1='LOCATION=/d02/monish/testdb1/archive'

*.log_archive_format='%t_%s_%r.dbf'

*.open_cursors=300

*.pga_aggregate_target=200278016

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=601882624

*.undo_management='AUTO'

*.undo_tablespace='UNDOTBS'

*.user_dump_dest='/d02/monish/testdb1/admin/udump'

*.db_recovery_file_dest='/d02/monish/testdb1/backup'

*.db_recovery_file_dest_size=2147483648

Step 4:

Now perform the following steps:

$ export ORACLE_SID=testdb1

$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Thu May 22 17:35:28 2008

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup pfile=/u01/app/oracle/product/10.2.0/db_1/dbs/inittestdb1.ora nomount

ORACLE instance started.

Total System Global Area 603979776 bytes

Fixed Size 1263176 bytes

Variable Size 167774648 bytes

Database Buffers 427819008 bytes

Redo Buffers 7122944 bytes

SQL> @testdb1.sql

Database created.

Step 5:

So your database is create. Now just run the catalog.sql and catproc.sql scripts.

You will find the in $ cd $ORACLE_HOME/rdbms/admin

SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql

SQL> @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc.sql

SQL> select name from v$database;

NAME

---------

TESTDB1

Okay, now your database is ready to use.


Read More »

Hello world

1 comments
Test post for this blog just to test

hello



Read More »

Please Review the new template

0 comments
Please Review the new template
...
Please Review the new template
...
Please Review the new template
...
Please Review the new template
...
Please Review the new template
...
Please Review the new template
...

Read More »

Labels

Oracle Database Administrator (3) database analyst (3) jobs oracle dba (3) database administration (2) dba certification (2) dba resume (2) dba training (2) for oracle (2) how to be an oracle dba (2) job oracle dba (2) jobs in oracle dba (2) oracle 8 (2) oracle administration (2) oracle database dba (2) oracle dba (2) oracle dba interview (2) oracle dba questions (2) oracle free (2) oracle tutorials (2) sql dba (2) Automatically Starting Databases in Unix (1) Autostart of Database in Windows (1) Autostart of Database in Windows and Automatically Starting Databases in Unix (1) Best Operating System for Oracle DBA Practice Suggestions (1) CREATE ORACLE DATABASE MANUALLY ON LINUX STEP BY STEP PROCESS (1) DBA RAC Tips Best Practice Guidelines for Standalone and RAC Databases (1) Data Dictionary and Dynamic Performance Views (1) Database Administration Authentication (1) Installing Oracle 10g R2 on Enterprise Linux (1) Installing Oracle 11g R2 on Enterprise Linux 5 (1) Installing Oracle 11g R2 on Enterprise Linux 5.5 with ASM (1) Managing Oracle Database Instance (1) Obtaining Information about the Instance Processes (1) Obtaining Information about the SGA - Clearing the Buffer Cache (1) Oracle Database Installation Estimating Disk and Memory Requirements Consideration (1) Oracle Database Installation Optimal Flexible Architecture (1) Product Release Number - Obtaining License Information - Obtaining Information about the Instance Processes (1) Quiescing a Database - Suspending a Database - Dropping a Database- Managing Initialization Files - Managing Parameters in SPFILE (1) about (1) about oracle dba (1) data entry work from home (1) database (1) database administrator (1) database administrator oracle (1) database management (1) database oracle (1) dba in oracle (1) dba jobs (1) dba online (1) dba oracle (1) download oracle (1) how to be a dba (1) how to be a oracle dba (1) in oracle (1) interview questions on oracle dba (1) interview questions oracle dba (1) job for oracle dba (1) jobs for oracle dba (1) learn oracle (1) manually database (1) oracle 10g (1) oracle 10g download (1) oracle 11g (1) oracle 11g download (1) oracle 11i (1) oracle 9i (1) oracle apex (1) oracle application server (1) oracle apps dba (1) oracle architecture (1) oracle base (1) oracle careers (1) oracle certification (1) oracle certified associate (1) oracle consulting (1) oracle courses (1) oracle database (1) oracle database 10g (1) oracle database 11g (1) oracle database administration (1) oracle database download (1) oracle db (1) oracle dba interview questions (1) oracle dba job (1) oracle dba jobs (1) oracle developer (1) oracle discoverer (1) oracle express (1) oracle forms (1) oracle in (1) oracle job (1) oracle jobs (1) oracle oca (1) oracle reports (1) oracle server (1) oracle software (1) oracle training (1) oracle tutorial (1) oracle university (1) oracle with (1) oracle xe (1) sql server (1) support oracle (1) toad for oracle (1) what is oracle (1) what is oracle database (1) what is oracle dba (1) work from home data entry (1)