Wednesday, January 30, 2008

Connecting to ASM remotely

Configure the listener.ora


SID_LIST_LISTENER_LINUX1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc) (ORACLE_HOME = /opt/oracle/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = +ASM)
(SID_NAME = +ASM1)
(ORACLE_HOME = /opt/oracle/app/oracle/product/10.2.0/db_1)
)
)


Add a tnsnames.ora entry


ASM1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = +ASM)
(UR = A)
)
)


How to connect to ASM instance from a remote client (Oracle Net) [ID 340277.1]

Revoking privileges from public

If some privileges has been revoked from public grant them before running catcpu.sql and later revoke. (Patch apply)

Read OracleMetaLink Note 131752.1 about revoking privileges from public

Startup Upgrade RAC

To start up an instance in a RAC environment in upgrade mode

1. create a separate pfile from spfile
2. set cluster_database = false
3. edit or remove any other cluster related parameters
4. start the instance with startup upgrade pfile='pfile_name'

Useful when applying CPU Jan 2008.

Tuesday, January 29, 2008

Cluster Verify Utility

Checking the Operating System Requirements Setup with CVU

runcluvfy.sh comp sys -n node_list -p {crsdatabase}-osdba osdba_group -orainv orainv_group -verbose
eg: runcluvfy.sh comp sys -n racserver1,racserver2 -p crs -osdba crs -orainv oinstall

CVU to Determine if Installation Prerequisites are Complete

runcluvfy.sh stage -pre crsinst -n node_list

eg: runcluvfy.sh stage -pre crsinst -n racserver1,racserver2

Checking for Available Shared Storage with CVU

Requires cvuqdisk-1.0.1-1.rpm installed on all nodes. This rpm is available in the clusterware installation.
  • To check for all shared file systems available across all nodes
runcluvfy.sh comp ssa -n node_list

eg: runcluvfy.sh comp ssa -n racserver1,racserver2
  • To check the shared accessibility of a specific shared storage
runcluvfy.sh comp ssa -n node_list -s storageID_list

eg: runcluvfy.sh comp ssa -n racserver1,racserver2 -s /dev/sdb1

Verifying System Readiness for installing Oracle Database with CVU

runcluvfy.sh stage -pre dbinst -n node1,node2 -verbose

eg: runcluvfy.sh stage -pre dbinst -n racserver2,racserver1

Verifying Requirements for DBCA

runcluvfy.sh stage -pre dbcfg -n node1,node2 -d Oracle_home_path

eg: runcluvfy.sh stage -pre dbcfg -n racserver1,racserver2 -d $ORACLE_HOME

Verifying Node Connection

runcluvfy.sh comp nodecon -n node1,node2

eg: runcluvfy.sh comp nodecon -n racserver1,racserver2

Verify Hardware and OS setup

runcluvfy.sh stage -post hwos -n node1,node2

eg: runcluvfy.sh stage -post hwos -n racserver1,racserver2

Clusterware diagnostics

runcluvfy.sh stage -post crsinst -n racserver1,racserver2


Tracing CVU
export CV_TRACELOC=/tmp/cvutrace # directory for trace files
export SRVM_TRACE=true
export SRVM_TRACE_LEVEL=1

runcluvfy.sh stage -post crsinst -n racserver1,racserver2
tracefiles will be generated in /tmp/cvutrace

file var/log/nessages Flooded with "su(pam_unix)session opened/closed for user oracle

Metalink Doc ID : 415665.1

The problem is reported in Bug 5722352

Solution

Obtain patch for unpublished Bug 5679560 from MetaLink and apply it

Or:

1. take a backup copy of /etc/init.d/init.cssd

2. edit /etc/init.d/init.cssd

Replace code section:

$SU $ORACLE_USER -c "$ECHO \$TZ > /tmp/oratz.$$ " > /dev/null 2>&1
NEWTZ=`$SED 's/^[ \t]*//;s/[ \t]*$//' < /tmp/oratz.$$`
$RMF /tmp/oratz.$$
if [ ! -z "$NEWTZ" ]; then
TZ=$NEWTZ;
export TZ;
fi


with:

TZCHANGE=/tmp/TZCHANGE
if [ -f $TZCHANGE ]then
$SU $ORACLE_USER -c "$ECHO \$TZ > /tmp/oratz.$$ " > /dev/null 2>&1
NEWTZ=`$SED 's/^[ \t]*//;s/[ \t]*$//' < /tmp/oratz.$$`
$RMF /tmp/oratz.$$
if [ ! -z "$NEWTZ" ]; then
TZ=$NEWTZ;
export TZ;
fi
$RMF $TZCHANGE
fi

puschitz.com

Site for resolving most of oracle installation errors.

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

Creating a Udev Permissions File for Oracle Clusterware

The procedure to create a permissions file to grant oinstall group members write
privileges to block devices is as follows:

1. Log in as root.

2. Change to the /etc/udev/permissions.d directory:
# cd /etc/udev/permissions.d

3. Start a text editor, such as vi, and enter the partition information where you want
to place the OCR and voting disk files, using the syntax

device[partitions]:root:oinstall:0640.

Note that Oracle recommends that you place the OCR and the voting disk files on separate physical disks. For example, to grant oinstall members access to SCSI disks to place OCR files on sda1 and sdb2, and to grant the Oracle Clusterware owner (in this example crs) permissions to place voting disks on sdb3, sdc1 and sda2, add the following information to the file:

# OCR disks
sda1:root:oinstall:0640
sdb2:root:oinstall:0640

# Voting disks
sda2:crs:oinstall:0640
sdb3:crs:oinstall:0640
sdc1:crs:oinstall:0640

4. Save the file:
On Asianux 2, Enterprise Linux 4, and Red Hat Enterprise Linux 4 systems, save
the file as 49-oracle.permissions.
On Asianux 3, Enterprise Linux 5, Red Hat Enterprise Linux 5, and SUSE
Enterprise Server 10 systems, save the file as 51-oracle.permissions.

Eg. Setting raw devices permissions

#vote disks
raw/raw1:oracle:oinstall:0644
raw/raw2:oracle:oinstall:0644
raw/raw3:oracle:oinstall:0644

# ASM SPfile
raw/raw4:oracle:oinstall:0640

#OCR
raw/raw5:root:oinstall:0640
raw/raw6:root:oinstall:0640

Checking required RPMs for RHEL 4 (ES/AS) x64

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils compat-db control-center gcc gcc-c++ glibc glibc-common glibc-devel gnome-libs libaio libaio-devel libgcc libstdc++ libstdc++-devel make pdksh sysstat xorg-x11-deprecated-libs xscreensaver compat-gcc-32-c++

Thursday, January 24, 2008

Mission Control Parameters

Mission Control Parameters for JRockit

-Xmanagement:port=7091,ssl=false,authenticate=false

Sunday, January 20, 2008

Recreating of the OCCI libraries (genoccish) fails

Recreating of the OCCI libraries (genoccish) fails with errors similar to:cp: cannot stat `/DISCARD/': No such file or directory
cp: cannot stat `/DISCARD/': No such file or directory
/usr/bin/ld: Warning: size of symbol `std::basic_string >::~basic_string()' changed from 168 in $ORACLE_HOME/lib32/libocci10.a(occiConnectionImpl.o) to 52 in $ORACLE_HOME/lib32/libocci10.a(occiConnectionImpl.o)
/usr/bin/ld: Warning: size of symbol `std::basic_string >::~basic_string()' changed from 52 in $ORACLE_HOME/lib32/libocci10.a(occiConnectionImpl.o) to 168 in $ORACLE_HOME/lib32/libocci10.a(occiConnectionImpl.o)
/usr/bin/ld: Warning: size of symbol `std::basic_string >::~basic_string()' changed from 168 in $ORACLE_HOME/lib32/libocci10.a(occiConnectionImpl.o) to 52 in $ORACLE_HOME/lib32/libocci10.a(occiConnectionImpl.o)
/usr/bin/ld: Warning: size of symbol `std::basic_string >::~basic_string


Workaround: Download and apply the patch for bug 5240469

But this may also not work some times. Most likely cause for this would be a missing RPM.

compat-gcc-32-c++ (x86_64)

Please make sure that ' /usr/bin/g++32' is a 64bit binary. The output should look similar to the following:
%file g++32g++32: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped
If the version is not 64bit,it is required to install the 64bit version of the compat package that contains this file:
%usr/bin> rpm -qf g++32 compat-gcc-32-c++-3.2.3-47.3
To check if this is a 64-bit rpm :-
%/usr/bin> rpm -q --queryformat "%{NAME} %{ARCH} \n" compat-gcc-32-c++
compat-gcc-32-c++ x86_64


metalink notes regarding this problem.

432885.1
379409.1
417319.1
428563.1
429830.1
397344.1

Thursday, January 17, 2008

Exporting sequences in RAC

Using exp on RAC can lead to inconsistencies when exporting sequences. This is because each instance cache number of values from the sequence locally and at the time of the exp the last value on the node used for the exp is considered.

To avoid this use statistics=compute in the exp command parameter list.

exp test/test file=test.dmp object_consistent=y consistent=y statistics=compute owner=test

Monday, January 14, 2008

TNS-12516 & TNS-12519

Client connections may intermittently fail with either of the following errors:

TNS-12516 TNS:listener could not find instance with matching protocol stack

TNS-12519 TNS:no appropriate service handler found Additionally, a TNS-12520 error may appear in the listener log.

TNS:listener could not find available handler for requested type of server The output of the lsnrctl services command may show that the service handler is in a "blocked" state.

e.g. '"DEDICATED" established:1 refused:0 state:blocked'

Fix

Increase the value for PROCESSES.

read metalink note :240710.1