OLL – Oracle Learning Library
At the Oracle training they also recommend the use of the Oracle Learning Library:
http://apex.oracle.com/pls/apex/f?p=44785:1
Snip ->
The Learning Library was designed to allow you to search for free online training content (OBEs, Demos and Tutorials) on OTN.
* Oracle by Example (OBE) tutorials provide hands-on, step-by-step instructions on how to implement various technology solutions to business problems. In addition to the following OBE tutorials, you can also access more product training at the Oracle University Knowledge Center.
* Demos provide an automated demonstration of a particular task with explanations on how the task is performed.
* Tutorials provide concept explanations, demos and step-by-step instructions for a particular product or topic.
<- Snap
Search and Download Oracle Database, Application Server, and Collaboration Suite Documentation
I attended a training for RAC / Grid Infrastructure at oracle and they recommended this nice link to find the documentation very quick.
Tahiti infrastructure provides many services for the documentation libraries linked from that page, such as Database, Application Server / Fusion Middleware, and Collaboration Suite / Beehive.
Oracle 11g – R2 11.2.02 – Grid Infrastructure Standalone Installation – PROTL-16: Internal Error
ERROR:
[root@tempdb lib]# /opt/apps/grid/product/11R2/grid/root.sh
Running Oracle 11g root script…
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/apps/grid/product/11R2/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /opt/apps/grid/product/11R2/grid/crs/install/crsconfig_params
Creating trace directory
PROTL-16: Internal Error
Failed to create or upgrade OLR
Failed to create or upgrade OLR at /opt/apps/grid/product/11R2/grid/crs/install/crsconfig_lib.pm line 6740.
/opt/apps/grid/product/11R2/grid/perl/bin/perl -I/opt/apps/grid/product/11R2/grid/perl/lib -I/opt/apps/grid/product/11R2/grid/crs/install /opt/apps/grid/product/11R2/grid/crs/install/roothas.pl execution failed
1st TRY:
[root@tempdb lib]# ../crs/install/roothas.pl
Using configuration parameter file: ../crs/install/crsconfig_params
Improper Oracle Clusterware configuration found on this host
Deconfigure the existing cluster configuration before starting
to configure a new Clusterware
run ‘/opt/apps/grid/product/11R2/grid/crs/install/roothas.pl -deconfig’
to configure existing failed configuration and then rerun root.sh
[root@tempdb lib]# /opt/apps/grid/product/11R2/grid/crs/install/roothas.pl -deconfig
Using configuration parameter file: /opt/apps/grid/product/11R2/grid/crs/install/crsconfig_params
Oracle Restart stack is not active on this node
Restart the SIHA stack (use /opt/apps/grid/product/11R2/grid/bin/crsctl start has) and retry
Failed to verify HA resources
[root@tempdb lib]# ../root.sh
Running Oracle 11g root script…
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/apps/grid/product/11R2/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /opt/apps/grid/product/11R2/grid/crs/install/crsconfig_params
Improper Oracle Clusterware configuration found on this host
Deconfigure the existing cluster configuration before starting
to configure a new Clusterware
run ‘/opt/apps/grid/product/11R2/grid/crs/install/roothas.pl -deconfig’
to configure existing failed configuration and then rerun root.sh
/opt/apps/grid/product/11R2/grid/perl/bin/perl -I/opt/apps/grid/product/11R2/grid/perl/lib -I/opt/apps/grid/product/11R2/grid/crs/install /opt/apps/grid/product/11R2/grid/crs/install/roothas.pl execution failed
REASON:
[root@tempdb ~]# ls -la /etc/oracle/
total 76
drwx—— 5 root root 4096 Apr 11 15:34 .
drwxr-xr-x 79 root root 12288 Apr 11 15:34 ..
drwxrwx— 2 grid oinstall 4096 Apr 11 15:34 lastgasp
-rw-r—– 1 grid oinstall 89 Apr 11 15:34 ocr.loc
-rw——- 1 root root 16 Apr 11 15:34 ocr.loc.orig
-rw-r—– 1 root oinstall 116 Apr 11 15:34 olr.loc
-rw——- 1 root root 0 Apr 11 15:34 olr.loc.orig
drwxrwx— 5 root oinstall 4096 Apr 11 15:34 oprocd
drwxr-x— 3 root oinstall 4096 Apr 11 15:34 scls_scr
So the permission for /etc/oracle/ seems _not_ ok.
FIX:
[root@tempdb etc]# chmod 755 /etc/oracle/
[root@tempdb etc]# ls -la oracle/
total 76
drwxr-xr-x 5 root root 4096 Apr 11 15:41 .
drwxr-xr-x 79 root root 12288 Apr 11 15:41 ..
drwxrwx— 2 grid oinstall 4096 Apr 11 15:41 lastgasp
-rw-r—– 1 grid oinstall 89 Apr 11 15:41 ocr.loc
-rw——- 1 root root 16 Apr 11 15:41 ocr.loc.orig
-rw-r—– 1 root oinstall 116 Apr 11 15:41 olr.loc
-rw——- 1 root root 0 Apr 11 15:41 olr.loc.orig
drwxrwx— 5 root oinstall 4096 Apr 11 15:41 oprocd
drwxr-x— 3 root oinstall 4096 Apr 11 15:41 scls_scr
2nd TRY:
[root@tempdb lib]# /opt/apps/grid/product/11R2/grid/crs/install/roothas.pl -deconfig -force
Using configuration parameter file: /opt/apps/grid/product/11R2/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
PROCL-26: Error while accessing the physical storage
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
/opt/apps/grid/product/11R2/grid/bin/acfsdriverstate: line 51: /lib/acfstoolsdriver.sh: No such file or directory
/opt/apps/grid/product/11R2/grid/bin/acfsdriverstate: line 51: exec: /lib/acfstoolsdriver.sh: cannot execute: No such file or directory
Failure in execution (rc=-1, 0, No such file or directory) for command 1 /etc/init.d/ohasd deinstall
Successfully deconfigured Oracle Restart stack
[root@tempdb lib]# ../root.sh
Running Oracle 11g root script…
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/apps/grid/product/11R2/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /opt/apps/grid/product/11R2/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user ‘grid’, privgrp ‘oinstall’..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
CRS-4664: Node tempdb successfully pinned.
Adding daemon to inittab
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies – this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
tempdb 2012/04/11 15:42:11 /opt/apps/grid/product/11R2/grid/cdata/tempdb/backup_20120411_154211.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
RESULT:
[root@tempdb etc]# ls -la oracle/
total 76
drwxr-xr-x 5 root root 4096 Apr 11 15:41 .
drwxr-xr-x 79 root root 12288 Apr 11 15:41 ..
drwxrwx— 2 grid oinstall 4096 Apr 11 15:41 lastgasp
-rw-r—– 1 grid oinstall 89 Apr 11 15:41 ocr.loc
-rw——- 1 root root 16 Apr 11 15:41 ocr.loc.orig
-rw-r—– 1 root oinstall 116 Apr 11 15:41 olr.loc
-rw——- 1 root root 0 Apr 11 15:41 olr.loc.orig
drwxrwx— 5 root oinstall 4096 Apr 11 15:41 oprocd
drwxr-x— 3 root oinstall 4096 Apr 11 15:41 scls_scr
RESOURCES:
https://forums.oracle.com/forums/thread.jspa?threadID=2222175
Oracle 11g – R2 11.2.0.2 – RMAN-03014 – RMAN-06004 – ORA-03113
Had a problem now, which a thought solved long time ago.
I am using RMAN with TSM to backup my RAC Cluster to a tape library and the recovery catalog is on my gridcontrol db server. Since a few days my full backup does not run without errors.
RMAN> RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> RMAN> RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup plus archivelog command at 09/27/2011 16:01:44 RMAN-03014: implicit resync of recovery catalog failed RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
Thats my full backup script:
#! /bin/ksh
#
####################################################################
#
# THE INPUT PARAMETERS ARE :
#
# $1 - Target DB
# $2 - RMAN owner
# $3 - RMAN password
# $4 - RMAN DB
#
# Script to full backup the database - incremental level 0
#
####################################################################
#
# Check arguments
#
echo on
if [[ $# -ne 4 ]]
then
echo "$0 Error on $HOST: \nUsage: $0 TARGET_DB RMAN_OWNER RMAN_PWD RMAN_DB"
exit 1
fi
###################
# RMAN variables #
###################
export SID=$1
export RMAN_OWNER=$2
export RMAN_PWD=$3
export RMAN_DB=$4
export LOGIN_PATH=$PATH
export LOGIN_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
. /home/oracle/scripts/etc/ora11$SID.sh
export HBlog=/home/oracle/$SID/rmanlogs/fullbackup${SID}.`date +%d%m%y%H%M%S`.log
export HBdellog=/home/oracle/$SID/rmanlogs/fullbackup${SID}.`date +%d%m%y%H%M%S`.del.log
export emailsubfail=$HOSTNAME.$ORACLE_SID.`date +%d%m%y%H%M%S`.FullBackup.Failure
export emailsubok=$HOSTNAME.$ORACLE_SID.`date +%d%m%y%H%M%S`.FullBackup.OK.[info]
export mailreciever="hosting@foo.com"
rman target / catalog ${RMAN_OWNER}/${RMAN_PWD}@${RMAN_DB} log ${HBlog} \
<<SQL
show all;
run
{
allocate channel 't_1' type 'sbt_tape';
set limit channel 't_1' maxopenfiles 8;
crosscheck archivelog all;
backup force tag "${ORACLE_SID}_0T" incremental level 0 check logical
database force format '%d_%T_%U_0T'
plus archivelog format '%d_%T_%U_0Tarch';
sql "alter database backup controlfile to trace";
sql "alter database backup controlfile to trace as ''/home/oracle/$SID/cf.bak'' reuse";
sql "create pfile=''/home/oracle/$SID/pfile-ora11g-$SID.ora'' from spfile";
# resync catalog;
release channel 't_1';
}
exit
SQL
wait 5
oraerror=`cat $HBlog | grep "ORA-"`
rmanerror=`cat $HBlog | grep "RMAN-"`
echo $oraerror
echo $rmanerror
if [ -z "$oraerror" -a -z "$rmanerror" ]
then
echo "No Errors"
rman target / catalog ${RMAN_OWNER}/${RMAN_PWD}@${RMAN_DB} log ${HBdellog} \
<<DELSQL
run
{
allocate channel 't_1' type 'sbt_tape';
crosscheck archivelog all;
delete noprompt archivelog all backed up 2 times to device type 'sbt_tape' completed before 'sysdate - 2';
# resync catalog;
release channel 't_1';
}
report obsolete;
delete noprompt obsolete;
# list backup;
exit
DELSQL
wait 5
oradelerror=`cat $HBdellog | grep "ORA-"` | grep -v -e "ORA-19921:"
rmandelerror=`cat $HBdellog | grep "RMAN-"` | grep -v -e "RMAN-06900:" -e "RMAN-06901:"
echo $oradelerror
echo $rmandelerror
if [ -z "$oradelerror" -a -z "$rmandelerror" ]
then
echo "No Errors"
mailx -s $emailsubok $mailreciever
# cat $HBlog $HBdellog |mailx -s $emailsubok $mailreciever
else
echo "Errors Found !!!!"
cat $HBlog $HBdellog |mailx -s $emailsubfail $mailreciever
fi
else
echo "Errors Found !!!!"
cat $HBlog |mailx -s $emailsubfail $mailreciever
fi
What have changed in the last days? You know the answer – nothing i would say, but wait, the only thing is that my college changed the location for the backup files from an fc san to an iscsi san (via an ibm svc), so the datafile backup need a little bit longer – from 1h20 to more than 3h:
.
.
input archived log thread=2 sequence=45749 RECID=80629 STAMP=762970611
channel t_1: starting piece 1 at 27-SEP-11
channel t_1: finished piece 1 at 27-SEP-11
piece handle=RAC1_20110927_8qmnk1vj_1_1_0Tarch tag=RAC11_0T comment=API Version 2.0,MMS Version 5.5.2.0
channel t_1: backup set complete, elapsed time: 00:00:25
Finished backup at 27-SEP-11
Starting backup at 27-SEP-11
channel t_1: starting incremental level 0 datafile backup set
channel t_1: specifying datafile(s) in backup set
.
.
channel t_1: starting piece 1 at 27-SEP-11
channel t_1: finished piece 1 at 27-SEP-11
piece handle=RAC1_20110927_8rmnk20g_1_1_0T tag=RAC11_0T comment=API Version 2.0,MMS Version 5.5.2.0
channel t_1: backup set complete, elapsed time: 03:03:57
Finished backup at 27-SEP-11
Starting backup at 27-SEP-11
current log archived
channel t_1: starting archived log backup set
channel t_1: specifying archived log(s) in backup set
.
.
Damn …
Try to find out via google, but “There’s many ways of skinning a cat” … so i thought i am running in a tcp timeout which is 2h per default on our linux boxes.
I tried to change the /proc/sys/net/ipv4/tcp_keepalive_time from 7200 to 500 on rac and gridcontrol (recovery catalog server) and started the backup again, but hours later i got the same error msg:
RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
Still on search i found now a working solution for me – because i had in my sqlnet.ora on my gridcontrol server which held the recovery catalog database these settings:
## NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
## Timeout Parameters
##
## Specially for tsm connection aka long running but idle backups via rman/tivoli
##
SQLNET.INBOUND_CONNECT_TIMEOUT = 15 # Timeout in seconds -> 0=infinty (60 = default)
SQLNET.SEND_TIMEOUT = 7200 # Timeout in seconds (none = default)
SQLNET.RECV_TIMEOUT = 7200 # Timeout in seconds (none = default)
SQLNET.EXPIRE_TIME = 5 # Idle time in minutes (none = default)
Changed to
## NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
## Timeout Parameters
##
## Specially for tsm connection aka long running but idle backups via rman/tivoli
##
SQLNET.INBOUND_CONNECT_TIMEOUT = 15 # Timeout in seconds -> 0=infinty (60 = default)
#SQLNET.SEND_TIMEOUT = 7200 # Timeout in seconds (none = default)
#SQLNET.RECV_TIMEOUT = 7200 # Timeout in seconds (none = default)
SQLNET.EXPIRE_TIME = 5 # Idle time in minutes (none = default)
Restarted the listener service and activated the fullbackup script again on my rac node … and viola,
.
.
input archived log thread=1 sequence=34972 RECID=80665 STAMP=762983213
channel t_1: starting piece 1 at 27-SEP-11
channel t_1: finished piece 1 at 27-SEP-11
piece handle=RAC1_20110927_8smnkcpn_1_1_0Tarch tag=RAC11_0T comment=API Version 2.0,MMS Version 5.5.2.0
channel t_1: backup set complete, elapsed time: 00:00:45
Finished backup at 27-SEP-11
Starting Control File and SPFILE Autobackup at 27-SEP-11
piece handle=c-638987237-20110927-00 comment=API Version 2.0,MMS Version 5.5.2.0
Finished Control File and SPFILE Autobackup at 27-SEP-11
sql statement: alter database backup controlfile to trace
sql statement: alter database backup controlfile to trace as ''/home/oracle/rac11/cf.bak'' reuse
sql statement: create pfile=''/home/oracle/rac11/pfile-ora11g-rac11.ora'' from spfile
released channel: t_1
RMAN>
Recovery Manager complete.
I hope that is the proper solution in this case, because i am not sure if i should activate the timeout again with higher values to support this feature and also support my longer backup time – any suggestions?
REFERENCES:
Rman ORA-03113 Error From Recovery Catalog Database [ID 1263456.1]
Subversion – pre-commit hook – prevents updating files in a tag and prevent adding files to a tag
pre-commit hook
# Committing to tags is not allowed
# This prevents updating files in a tag and prevent adding files to a tag.
$SVNLOOK changed -t "$TXN" "$REPOS" | grep "^[AUD_]. .*/tags/.*/." && /bin/echo 'Cannot update tags!' 1>&2 && exit 2
Oracle 11g – R2 11.2.0.2 Quick Installation Guide for test and development
Usage
This is a straight forward installation guide for ORACLE 11gR2 11.2.0.2 (64bit linux) without GRID and ASM for testing/sw-developement purposes
Installation
Precondition: Centos 5.5 64bit – Use Base Installation without any fancy stuff
user root
pw whateveryouwant
Used ip’s for this configuration
10.123.123.123 – oracle.foo.bar.com
Do some sanity
yum update
chkconfig bluetooth off
chkconfig cpuspeed off
chkconfig cups off
chkconfig kudzu off
chkconfig pcscd off
chkconfig smartd off
chkconfig yum-updatesd off
yum install sysstat
yum install ntp
Edit the /etc/ntp/step-tickers file and insert your timeserver, only one entry, not more
chkconfig ntpd on
Edit the /etc/sysconfig/ntpd file and add the ‘-x’ parameter
# Drop root to id ‘ntp:ntp’ by default.
OPTIONS=”-x -u ntp:ntp -p /var/run/ntpd.pid”
# Set to ‘yes’ to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no
# Additional options for ntpdate
NTPDATE_OPTIONS=””
Disable/configure the firewall and disable/configure selinux rules
system-config-securitylevel-tui
eth configuration
[root@oracle ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
BROADCAST=10.123.255.255
HWADDR=00:1c:29:98:ee:31
IPADDR=10.123.123.123
NETMASK=255.255.0.0
NETWORK=10.123.0.0
ONBOOT=yes
GATEWAY=10.123.123.254
TYPE=Ethernet
[root@oracle ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracle.foo.bar.com
[root@oracle ~]# cat /etc/resolv.conf
search foo.bar.com
nameserver 8.8.8.8
nameserver 8.8.4.4
Need some status output script for better life at login as admin or root
#
# created by muda
#
clear
echo -e “\nWelcome user $USER – you are logged on $HOSTNAME”
echo -e “\nServer Information: ” ; uname -a
echo “”
#
# Ifconfig stuff
#
echo -e “IP Information:”
for NIC_ID in $(ls /etc/sysconfig/network-scripts/ifcfg-eth* | cut -d”-” -f3 ); do
for SERVER_IP in $(cat /etc/sysconfig/network-scripts/ifcfg-${NIC_ID}|grep -iw ipaddr| cut -d”=” -f2 ); do
echo “” >/dev/null
echo -e “The IP of ${NIC_ID} is: ${SERVER_IP}”
done
done
for SERVER_GW in $(cat /etc/sysconfig/network |grep -iw gateway | cut -d”=” -f2 ); do
##for SERVER_GW in $(cat /etc/sysconfig/network-scripts/ifcfg-${NIC_ID} |grep -iw gateway | cut -d”=” -f2 ); do
echo “” >/dev/null
echo -e “The Standard Gateway IP is: ${SERVER_GW}”
done
##
echo “” >/dev/null
echo -e “Routing: $(/sbin/ip -o route |grep -iw default)”
echo -e “\nUsers logged on: ” ; w -h
echo -e “\nLast (4) logged in users: ” ; last -4 -a
echo -e “\nCurrent date: ” ; date
echo -e “\nMachine stats: ” ; uptime
echo -e “\nMemory stats: ” ; free
echo “”
#
# Filesystem Usage
#
echo -e “\nFilesystem \t Usage(%) \t Status\n”
for FILESYSTEM in $(df -P |grep ‘^/’ | grep -v ‘none’ | grep -v ‘proc’ | awk ‘{print $1;}’ ); do
for USAGE in $(df -P | grep “${FILESYSTEM}” | awk ‘{print $5}’ ); do
USAGE_NEW=${USAGE%%%}
done
printf “%-40s %-10s %-10s” ${FILESYSTEM} ${USAGE_NEW}
if [ $USAGE_NEW -gt 90 ] ; then
echo “=== CRITICAL ===”
elif [ $USAGE_NEW -gt 75 ] ; then
echo “=== WARNING ===”
else
echo “ok”
fi
done
Add this in /etc/bashrc to run /etc/muda.status at logon
After:
# are we an interactive shell?
if [ “$PS1” ]; then
Insert:
## some stuff by muda ##
[ “$UID” = “0” -o “$USER” = “admin” ] && . /etc/muda.status
Check /etc/hosts that you don’t have any other names for 127.0.0.1 / ::1 than localhost
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
Add this in your sshd config authentication section to allow root connects with ssh keys
# Authentication:
LoginGraceTime 30
PermitRootLogin without-password
StrictModes yes
MaxAuthTries 3
PermitEmptyPasswords no
Recommended packages for oracle installation (version can be higher)
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)
Installed packages for this installation
yum install binutils compat-libstdc++-33 elfutils-libelf-devel.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc-devel libaio-devel sysstat unixODBC unixODBC-devel
yum install xauth libXtst libXtst-devel libXp-devel pdksh ntp sysstat xclock
Install user and groups for oracle
# add groups
groupadd -g 3100 oinstall
groupadd -g 3300 dba
groupadd -g 3301 oper
groupadd -g 3302 dsm
# add user
useradd -m -u 3101 -g oinstall -G dba,oper,dsm -d /home/oracle -s /bin/bash -c “Oracle Software Owner” oracle
#check user grid and oracle
id oracle
uid=3101(oracle) gid=3100(oinstall) groups=3100(oinstall),3300(dba),3301(oper),3302(dsm) context=root:system_r:unconfined_t:SystemLow-SystemHigh
Set some enviroment for oracle
# /home/oracle/.bash_profile
# —————————————————
# OS User: oracle
# Application: Oracle Database Software Owner
# Version: Oracle 11g release 2
# —————————————————
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
alias ls=”ls -FA”
# —————————————————
# ORACLE_SID
# —————————————————
# Specifies the Oracle system identifier (SID) for
# the Oracle instance running on this node.
# Each RAC node must have a unique ORACLE_SID.
# (i.e. racdb1, racdb2,…)
# —————————————————
ORACLE_SID=orademo; export ORACLE_SID
# —————————————————
# ORACLE_UNQNAME
# —————————————————
# In previous releases of Oracle Database, you were
# required to set environment variables for
# ORACLE_HOME and ORACLE_SID to start, stop, and
# check the status of Enterprise Manager. With
# Oracle Database 11g release 2 (11.2) and later, you
# need to set the environment variables ORACLE_HOME
# and ORACLE_UNQNAME to use Enterprise Manager.
# Set ORACLE_UNQNAME equal to the database unique
# name.
# —————————————————
ORACLE_UNQNAME=orademo; export ORACLE_UNQNAME
# —————————————————
# JAVA_HOME
# —————————————————
# Specifies the directory of the Java SDK and Runtime
# Environment.
# —————————————————
#JAVA_HOME=/usr/local/java; export JAVA_HOME
# —————————————————
# ORACLE_BASE
# —————————————————
# Specifies the base of the Oracle directory structure
# for Optimal Flexible Architecture (OFA) compliant
# database software installations.
# —————————————————
ORACLE_BASE=/opt/apps/database; export ORACLE_BASE
# —————————————————
# ORACLE_HOME
# —————————————————
# Specifies the directory containing the Oracle
# Database software.
# —————————————————
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db1; export ORACLE_HOME
# —————————————————
# ORACLE_PATH
# —————————————————
# Specifies the search path for files used by Oracle
# applications such as SQL*Plus. If the full path to
# the file is not specified, or if the file is not
# in the current directory, the Oracle application
# uses ORACLE_PATH to locate the file.
# This variable is used by SQL*Plus, Forms and Menu.
# —————————————————
#ORACLE_PATH=/u01/app/common/oracle/sql; export ORACLE_PATH
# —————————————————
# SQLPATH
# —————————————————
# Specifies the directory or list of directories that
# SQL*Plus searches for a login.sql file.
# —————————————————
# SQLPATH=/u01/app/common/oracle/sql; export SQLPATH
# —————————————————
# ORACLE_TERM
# —————————————————
# Defines a terminal definition. If not set, it
# defaults to the value of your TERM environment
# variable. Used by all character mode products.
# —————————————————
#ORACLE_TERM=xterm; export ORACLE_TERM
# —————————————————
# NLS_DATE_FORMAT
# —————————————————
# Specifies the default date format to use with the
# TO_CHAR and TO_DATE functions. The default value of
# this parameter is determined by NLS_TERRITORY. The
# value of this parameter can be any valid date
# format mask, and the value must be surrounded by
# double quotation marks. For example:
#
# NLS_DATE_FORMAT = “MM/DD/YYYY”
#
# —————————————————
#NLS_DATE_FORMAT=”DD-MON-YYYY HH24:MI:SS”; export NLS_DATE_FORMAT
# —————————————————
# TNS_ADMIN
# —————————————————
# Specifies the directory containing the Oracle Net
# Services configuration files like listener.ora,
# tnsnames.ora, and sqlnet.ora.
# —————————————————
#TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
# —————————————————
# ORA_NLS11
# —————————————————
# Specifies the directory where the language,
# territory, character set, and linguistic definition
# files are stored.
# —————————————————
#ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
# —————————————————
# PATH
# —————————————————
# Used by the shell to locate executable programs;
# must include the $ORACLE_HOME/bin directory.
# —————————————————
#PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
#PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
#PATH=${PATH}:/u01/app/common/oracle/bin
PATH=${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH
# —————————————————
# LD_LIBRARY_PATH
# —————————————————
# Specifies the list of directories that the shared
# library loader searches to locate shared object
# libraries at runtime.
# —————————————————
#LD_LIBRARY_PATH=$ORACLE_HOME/lib
#LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
#LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
#export LD_LIBRARY_PATH
# —————————————————
# CLASSPATH
# —————————————————
# Specifies the directory or list of directories that
# contain compiled Java classes.
# —————————————————
#CLASSPATH=$ORACLE_HOME/JRE
#CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
#CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
#CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
#export CLASSPATH
# —————————————————
# THREADS_FLAG
# —————————————————
# All the tools in the JDK use green threads as a
# default. To specify that native threads should be
# used, set the THREADS_FLAG environment variable to
# “native”. You can revert to the use of green
# threads by setting THREADS_FLAG to the value
# “green”.
# —————————————————
#THREADS_FLAG=native; export THREADS_FLAG
# —————————————————
# TEMP, TMP, and TMPDIR
# —————————————————
# Specify the default directories for temporary
# files; if set, tools that create temporary files
# create them in one of these directories.
# —————————————————
#export TEMP=/tmp
#export TMPDIR=/tmp
# —————————————————
# UMASK
# —————————————————
# Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing
# the Oracle software installation creates files
# with 644 permissions.
# —————————————————
umask 022
Create the directory for the oracle installation
mkdir -p /opt/apps/
chmod -R 775 /opt/apps/
chown -R oracle:oinstall /opt/apps/
Set new values for oracle /etc/security/limits.conf
oracle soft nproc 8192
oracle hard nproc 16384
oracle soft nofile 8192
oracle hard nofile 65536
Put the limits settings in your /etc/pam.d/
insert into /etc/pam.d/login
session required pam_limits.so
insert into /etc/pam.d/su
session required pam_limits.so
Activate new ulimits for oracle
*insert into /etc/profile
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
*insert into /etc/csh.login
if ( \$USER == “oracle” ) then
limit maxproc 16384
limit descriptors 65536
endif
Add values in /etc/sysctl.conf
### ORACLE SECTION ###
# Controls the maximum number of shared memory segments system wide
kernel.shmmni = 4096
# Sets the following semaphore values:
# SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value
kernel.sem = 250 32000 100 128
# Sets the maximum number of file-handles that the Linux kernel will allocate
fs.file-max = 6815744
# Defines the local port range that is used by TCP and UDP
# traffic to choose the local port
net.ipv4.ip_local_port_range = 9000 65500
# Default setting in bytes of the socket “receive” buffer which
# may be set by using the SO_RCVBUF socket option
net.core.rmem_default=262144
# Maximum setting in bytes of the socket “receive” buffer which
# may be set by using the SO_RCVBUF socket option
net.core.rmem_max=4194304
# Default setting in bytes of the socket “send” buffer which
# may be set by using the SO_SNDBUF socket option
net.core.wmem_default=262144
# Maximum setting in bytes of the socket “send” buffer which
# may be set by using the SO_SNDBUF socket option
net.core.wmem_max=1048576
# Maximum number of allowable concurrent asynchronous I/O requests requests
fs.aio-max-nr=1048576
Make them active
sysctl -p
Fix when using more then 2.4 gb mem for oracle
fix this before install the database:
* hint about 11gR2 and tmpfs
ORA-00845 – MEMORY_TARGET not supported on this system
This error is common, and it occurs most frequently when the Linux /dev/shm mount point isn’t large enough. Specifically, your SGA and PGA are sized such that there isn’t enough space in /dev/shm for the instance to start.
So, to fix it:
mount -t tmpfs shmfs -o size=1300m /dev/shm
where 1300m is whatever size that will at least cover your MEMORY_TARGET parameter.
Once you’ve got a value for /dev/shm set that works, you can add it to /etc/fstab, such that it’ll be a permanent change. Edit /etc/fstab, and add the following line, adjusting the size to fit your environment:
shmfs /dev/shm tmpfs size=1300m 0 0
eg: at oracle.foo.bar.com
mount -t tmpfs shmfs -o size=4500m /dev/shm
and changed in fstab:
tmpfs /dev/shm tmpfs size=4500m 0 0
Install the db software only at first
Step1: Configure Security Updates
Step2: Install Options – Install database software only
Step3: Grid Options – Single Instance database installation
Step4: Product Languages – English (only)
Step5: Database Edition – Enterprise Edition
Choose Components – No OLAP / No Data Mining RDBMS Files / No Partitioning / No Real Application Testing
Step6: Installation Location
Oracle Base: /opt/apps/database
Software Location: /opt/apps/database/product/11.2.0/db1
Step7: Create Inventory: /opt/apps/oraInventory
oraInventory Group Name: oinstall
Step8: Operating System Groups: Database Administrator = dba + Database Operator = oper
Step9: Prerequisite Checks
Step10: Summary
Step11: Install Product
Install the listener service
run ‘netca’ as user oracle to create the first listener
Install/Configure the db software
run ‘dbca’ as user oracle to create your first database
step1: create database
step2: custom database
step3: global database name: orademo.foo.bar.com
sid: orademo
step4: select ‘configure enterprise manager’
step5: use same passwords for administrative accounts: !admin4orademo#
step6: storage type: filesystem
use database file locations from template
step7: unselect fast recovery area: (as it is)
diselect ‘enable archiving
step8: no oracle multimedia, no oracle application express, no orcale text
step9: use admm, 1000 processes, 8k block size, use unicode, dedicated server mode
step10: create database
Fix some low values at our db
sqlplus /nolog
connect / as sysdba
alter system set session_cached_cursors=200 scope=spfile;
alter system set log_buffer=10485760 scope=spfile;
alter system set processes=1000 scope=spfile;
alter system set sessions=1000 scope=spfile;
shutdown immediate
startup
exit
Fix the password aging/life_time at our db
ALTER PROFILE DEFAULT LIMIT
FAILED_LOGIN_ATTEMPTS UNLIMITED
PASSWORD_LIFE_TIME UNLIMITED
;
RESOURCES: http://www.db-source.com/tag/expiredgrace/
Change in /etc/oratab the entry for you db to ‘Y’
eg: orademo:/opt/apps/database/product/11.2.0/db1:Y
Disable require tty for sudoers in ‘/etc/sudoers’
e.g. #Defaults: requiretty
start/stop scripts for oracle and enterprise manager
[root@oracle init.d]# cat oracle
#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance
ORA_HOME=”/opt/apps/database/product/11.2.0/db1″
ORA_OWNER=”oracle”
# if the executables do not exist — display error
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo “Oracle startup: cannot start”
exit 1
fi
# depending on parameter — startup, shutdown, restart
# of the instance and listener or usage display
case “$1” in
start)
# Oracle listener and instance startup
echo -n “Starting Oracle: ”
/usr/bin/sudo -i -u $ORA_OWNER “$ORA_HOME/bin/dbstart $ORA_HOME”
#/usr/bin/sudo -E -u $ORA_OWNER -s “. /home/oracle/.bash_profile ;$ORA_HOME/bin/dbstart $ORA_HOME”
touch /var/lock/subsys/oracle
echo “OK”
;;
stop)
# Oracle listener and instance shutdown
echo -n “Shutdown Oracle: ”
/usr/bin/sudo -i -u $ORA_OWNER “$ORA_HOME/bin/dbshut $ORA_HOME”
#/usr/bin/sudo -E -u $ORA_OWNER -s “. /home/oracle/.bash_profile ;$ORA_HOME/bin/dbshut $ORA_HOME”
rm -f /var/lock/subsys/oracle
echo “OK”
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo “Usage: $0 start|stop|restart|reload”
exit 1
esac
exit 0
[root@oracle init.d]# cat oracle-emc
#!/bin/bash
#
# Run-level Startup script for the Oracle Enterprise Manager Console
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle Enterprise Manager Console
ORA_HOME=”/opt/apps/database/product/11.2.0/db1″
ORA_OWNER=”oracle”
ORA_SID=”orademo”
# if the executables do not exist — display error
if [ ! -f $ORA_HOME/bin/emctl -o ! -d $ORA_HOME ]
then
echo “Oracle Enterprise Manager Console startup: cannot start”
exit 1
fi
# depending on parameter — startup, shutdown, restart
# of the enterprise console manager or status display
case “$1” in
start)
# Oracle Enterprise Console Manager startup
echo -n “Starting Oracle Enterprise Manager Console in 30 seconds: ”
sleep 30
sudo -i -u $ORA_OWNER “$ORA_HOME/bin/emctl start dbconsole”
#sudo -E -u $ORA_OWNER -s “. /home/oracle/.bash_profile ; $ORA_HOME/bin/emctl start dbconsole”
touch /var/lock/subsys/oracle-emctl-${ORA_SID}
echo “OK”
;;
stop)
# Oracle Enterprise Console Manager shutdown
echo -n “Shutdown Oracle Enterprise Manager Console: ”
sudo -i -u $ORA_OWNER “$ORA_HOME/bin/emctl stop dbconsole”
#sudo -E -u $ORA_OWNER -s “. /home/oracle/.bash_profile ; $ORA_HOME/bin/emctl stop dbconsole”
rm -f /var/lock/subsys/oracle-emctl-${ORA_SID}
echo “OK”
;;
reload|restart)
$0 stop
$0 start
;;
status)
# Oracle Enterprise Console Manager status
echo -n “Status Oracle Enterprise Manager Console: ”
sudo -i -u $ORA_OWNER “$ORA_HOME/bin/emctl status dbconsole”
#sudo -E -u $ORA_OWNER -s “. /home/oracle/.bash_profile ; $ORA_HOME/bin/emctl status dbconsole”
;;
*)
echo “Usage: $0 start|stop|restart|reload|status”
exit 1
esac
exit 0
Enable the scripts
[root@oracle init.d]# chmod +x oracle*
[root@oracle init.d]# chkconfig –add oracle
[root@oracle init.d]# chkconfig –add oracle-emc
VMWARE – ESXi 4.1 – cloning vm disks with vmkfstools
Cloning and converting virtual machine disks with vmkfstools
1. Create your VM image what you will clone or use as template for future use (Test1)
2. Create a new VM with the same configuration as the maschine you will clone (CloneFromTest1)
3. Login via SSH to your ESXi 4.1 server
4. Go to your '/vmfs/volumes/datastore/CloneFromTest1/'
5. Delete the *.vmdk files from your new VM image (CloneFromTest1)
6. Use the vmkfstools the clone your VM (Test1)
eg: # vmkfstools -i /vmfs/volumes/datastore1/Test1/Test1.vmdk /vmfs/volumes/datastore1/CloneFromTest1/CloneFromTest1.vmdk
7. Check the configuration settings from 'CloneFromTest1' again (memory size/cpu count/...)
8. Start/Boot your 'CloneFromTest1' image
HINT: I had some kernel panic with my 'CloneFromTest1' image, so it did the clone process again with this parameters:
# vmkfstools -v -x -i /vmfs/volumes/datastore1/Test1/Test1.vmdk /vmfs/volumes/datastore1/CloneFromTest1/CloneFromTest1.vmdk
I find out that the adapter type which i had at my 'Test1' VM was differend at my 'CloneFromTest1':
DISKLIB-DDB : "adapterType" = "lsilogic" (was "buslogic")
So i checked my master VM what adapter type i need to select and fix at my clone VM after the clone process ... i am not sure now, it's a failure or is a feature?
RESOURCES: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1028042
Vmware KB: 1028042
VMWARE – ESXi 4.1 – enable ssh access for a privileged user
Using Tech Support Mode in ESXi 4.1
To enable local or remote TSM from the vSphere Client:
1. Select the host and click the Configuration tab.
2. Click Security profile > Properties.
3. Click Local Tech Support or Remote Tech Support (SSH) and click Options.
4. Choose the desired startup policy and click Start, then click OK.
5. Verify that the daemon selected in step 3 shows as running in the Services Properties window.
My Configuration:
1. I have created a user called 'administrator' via the vSphere Client at the 'Local Users & Groups' Tab
2. Give him to the 'root' group and give him a password
3. Login via ssh to your esx server with your original root account
4. Edit the /etc/passwd file entry for our 'administration' user and change '/sbin/nologin' to '/sbin/ash'
5. Create a directory called '/home/administrator' and give the permissions for this directory to user 'administrator'
RESOURCES: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1017910
Vmware KB: 1017910
