Bounce Cron Daemon

[root@rac22 etc]# find / -name service

/sbin/service
[root@rac22 etc]# /sbin/service crond status
crond (pid  3813) is running…
[root@rac22 etc]# /sbin/service crond stop
Stopping crond: [  OK  ]
[root@rac22 etc]# /sbin/service crond start
Starting crond: [  OK  ]

Installing 32bit RPMs on a 64bit machine with Yum

cat /etc/yum.conf

[root@rac22 etc]# cat /etc/yum.conf

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
 
# Note: yum-RHN-plugin doesn’t honor this.
metadata_expire=1h
 
# Default.
# installonly_limit = 3
 
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
#
# exclude=kernel*: Added by Savvis Hosting Engineering
# Prevents kernel from automatically being updated during final OS
# prep/patching by HIT.
#
#exclude=kernel*
 
 
[root@rac22 etc]# yum install glibc-devel.i386

Loaded plugins: rhnplugin, security
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package glibc-devel.i386 0:2.5-65.el5_7.1 set to be updated
–> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================================================================
 Package                      Arch                  Version                         Repository                             Size
================================================================================================================================
Installing:
 glibc-devel                  i386                  2.5-65.el5_7.1                  rhel-x86_64-server-5                  2.0 M
 
Transaction Summary
================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)
 
Total download size: 2.0 M
Is this ok [y/N]: y
Downloading Packages:
glibc-devel-2.5-65.el5_7.1.i386.rpm                                                                      | 2.0 MB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : glibc-devel                                                                                              1/1
 
Installed:
  glibc-devel.i386 0:2.5-65.el5_7.1                                                                                            
 
Complete!

Parse OSWatcher Logs for cpu utilization

$/opt/app/oracle/util/OSW/osw/archive/oswtop
+ASM1 > grep -i “^top” $(ls -l |grep “May  3″ |awk {‘print $9′}) >/tmp/load_02MAY11.txt
 
rac22:/tmp
+ASM1 > tail load_02MAY11.txt
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:55:29 up 2 days,  1:19,  4 users,  load average: 5.05, 9.17, 12.54
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:55:59 up 2 days,  1:19,  4 users,  load average: 5.60, 8.88, 12.34
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:56:29 up 2 days,  1:20,  4 users,  load average: 5.17, 8.46, 12.09
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:56:59 up 2 days,  1:20,  4 users,  load average: 4.65, 8.02, 11.82
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:57:29 up 2 days,  1:21,  4 users,  load average: 6.02, 7.99, 11.69
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:57:59 up 2 days,  1:21,  4 users,  load average: 4.96, 7.55, 11.42
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:58:29 up 2 days,  1:22,  4 users,  load average: 4.41, 7.17, 11.18
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:58:59 up 2 days,  1:22,  4 users,  load average: 4.66, 6.98, 10.98
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:59:29 up 2 days,  1:23,  4 users,  load average: 4.32, 6.66, 10.75
rac22.visctech.com_top_11.05.02.2200.dat:top – 22:59:59 up 2 days,  1:23,  4 users,  load average: 3.87, 6.33, 10.51


Using logrotate to manage log files

We are leveraging the logrotate linux executable to rotate ASM log files, database alert log files, and listener log files.  With log rotate we have the option to compress the previous version of the log file, keep X amount of copied of the log file, rotate the log file on a hourly/daily/weekly/monthly  intervals, etc.

rac22:/apps/oracle/general/sh

DBATOOLS3 – oracle: cat log_rotate.rac22.ksh
export CONF=/tmp/alertlog.conf
cat <<!! >$CONF
/apps/oracle/diag/rdbms/dbatools/DBATOOLS3/trace/alert_DBATOOLS3.log {
weekly
copytruncate
rotate 4
compress
}
!!
 
logrotate -s $SH/log_rotate_status -f $CONF
 
export CONF=/tmp/alert_asm.conf
cat <<!! >$CONF
/apps/oracle/diag/asm/+asm/+ASM3/trace/alert_+ASM3.log {
weekly
copytruncate
rotate 4
compress
}
!!
logrotate -s $SH/log_rotate_status -f $CONF
 
export CONF=/tmp/listener.conf
cat <<!! >$CONF
/apps/oracle/diag/tnslsnr/rac22/listener/trace/listener.log {
weekly
copytruncate
rotate 4
compress
}
!!
logrotate -s $SH/log_rotate_status -f $CONF
 
export CONF=/tmp/extproc_listener.conf
cat <<!! >$CONF
/apps/oracle/diag/tnslsnr/rac22/extproc_listener/trace/extproc_listener.log {
monthly
copytruncate
rotate 4
compress
}
!!
logrotate -s $SH/log_rotate_status -f $CONF
 
 
export CONF=/tmp/alertlog.conf
cat <<!! >$CONF
/apps/oracle/diag/rdbms/gridrac/GRIDRAC3/trace/alert_GRIDRAC3.log {
weekly
copytruncate
rotate 4
compress
}
!!
logrotate -s $SH/log_rotate_status -f $CONF

dbca delete database in silent mode

$ cat del_DBATOOLS_dbca.txt
dbca -silent -deleteDatabase -sourceDB DBATOOLS -sysDBAUserName sys -sysDBAPassword xxx4DBA

RMANDR – oracle: ksh del_DBATOOLS_dbca.txt

Connecting to database
4% complete
9% complete
14% complete
19% complete
23% complete
28% complete
47% complete
Updating network configuration files
52% complete
Deleting instance and datafiles
76% complete
100% complete
Look at the log file “/apps/oracle/cfgtoollogs/dbca/DBATOOLS.log” for further details.

RAC with NFS


In the table below 

  • Binaries is the shared mount points where the Oracle Home and CRS_HOME is installed.
  • Datafiles includes Online Logs, Controlfile and Datafiles
  • nfsvers and vers are identical on those OS platforms that has nfsvers.  The ver option is an alternative to the nfsvers option. It is included for compatibility with other operating systems,

Operating System

Mount options for Binaries Mount options for Oracle Datafiles Mount options for CRS Voting Disk and OCR
Sun Solaris *

rw,bg,hard,nointr,rsize=32768,
wsize=32768,proto=tcp,noac,

vers=3,suid

rw,bg,hard,nointr,rsize=32768,
wsize=32768,proto=tcp,noac,
forcedirectio, vers=3,suid
rw,bg,hard,nointr,rsize=32768,
wsize=32768,proto=tcp,vers=3,
noac,forcedirectio
AIX (5L) **

rw,bg,hard,nointr,rsize=32768,
wsize=32768,proto=tcp,

vers=3,timeo=600

cio,rw,bg,hard,nointr,rsize=32768,
wsize=32768,proto=tcp,noac,
vers=3,timeo=600

cio,rw,bg,hard,intr,rsize=32768,
wsize=32768,tcp,noac,
vers=3,timeo=600

HPUX 11.23 ***  – rw,bg,vers=3,proto=tcp,noac,
hard,nointr,timeo=600,
rsize=32768,wsize=32768,suid
rw,bg,vers=3,proto=tcp,noac,
forcedirectio,hard,nointr,timeo=600,
rsize=32768,wsize=32768,suid
rw,bg,vers=3,proto=tcp,noac,
forcedirectio,hard,nointr,timeo=600
,rsize=32768,wsize=32768,suid
Windows Not Supported Not Supported Not Supported
Linux x86
#
****

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp, vers=3,
timeo=600, actimeo=0

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,actimeo=0,
vers=3,timeo=600

rw,bg,hard,nointr,rsize=32768,
wsize=32768,tcp,actimeo=0,
vers=3,timeo=600

Linux x86-64 #
****
rw,bg,hard,nointr,rsize=32768,
 wsize=32768,tcp,vers=3,
timeo=600, actimeo=0
rw,bg,hard,nointr,rsize=32768, 
wsize=32768,tcp,actimeo=0, 
vers=3,timeo=600
rw,bg,hard,nointr,rsize=32768, 
wsize=32768,tcp,vers=3,
timeo=600,actimeo=0
Linux – Itanium rw,bg,hard,nointr,rsize=32768, 
wsize=32768,tcp,vers=3,
timeo=600, actimeo=0
rw,bg,hard,nointr,rsize=32768, 
wsize=32768,tcp,actimeo=0, 
vers=3,timeo=600
rw,bg,hard,nointr,rsize=32768, 
wsize=32768,tcp,vers=3,
timeo=600,actimeo=0

* NFS mount option “forcedirectio” is required on Solaris platforms when mounting the OCR/CRS files when using Oracle 10.1.0.4 or 10.2.0.2 or later (Oracle unpublished bug 4466428) 
** AIX is only supported with NAS on AIX 5.3 TL04 and higher with Oracle 10.2.0.1 and later (NetApp) 
*** NAS devices are only supported with HPUX 11.23 or higher ONLY 
**** As per BUG 11812928, the ‘intr’ & ‘nointr’ are deprecated in OEL 5.6 kernels and up including Oracle Linux 6. It is harmless to still include it, but the “NFS: ignoring mount option: nointr” will appears. This message can be ingnored.

# These mount options are for Linux kernels 2.6 and above for older kernels please check Note 279393.1

Due to Unpublished bug 5856342, it is necessary to use the following init.ora parameter when using NAS with all versions of RAC on Linux (x86 & X86-64 platforms) until 10.2.0.4. This bug is fixed and included in 10.2.0.4 patchset.
filesystemio_options = DIRECTIO

 Single Instance

 

Operating System

Mount options for Binaries Mount options for Oracle Datafiles
Sun Solaris *
(8, 9, 10)

rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,proto=tcp,suid

rw,bg,hard,rsize=32768,wsize=32768,vers=3,[forcedirectio or llock],nointr,proto=tcp,suid
AIX (5L) **

rw,bg,hard,rsize=32768,wsize=32768,vers=3,intr,timeo=600,proto=tcp

rw,bg,hard,rsize=32768,wsize=32768,vers=3,cio,intr,timeo=600,proto=tcp

HPUX 11.23 **** rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,proto=tcp,suid rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,proto=tcp, suid, forcedirectio
Windows Not Supported Not Supported
Linux x86
#
rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,actimeo=0*
Linux x86-64 # rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp,actimeo=0*
Linux – Itanium rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp

 

* actime=0 or noac can be used


Oracle Exadata Press Release

Oracle did a press release for one of my clients for successfully implementing Oracle Exadata:

http://www.oracle.com/us/corporate/press/1497415 

I am the founding partner and President of Viscosity Technology, and we are mentioned on the second paragraph.

 


Public Yum Server

Configure your server for Yum (Yellowdog Updater Modified):

There’s no more need to look for CDs from your pile of CDs or from the clutter of your desk. Earlier in 2009, Oracle launched their public yum server which offers a free and convenient way to install packages from the Enterprise Linux and Oracle VM. Obviously, the Yum server if offered without support.

We will show you how to setup your Red Hat or Oracle Enterprise Linux to use Oracle’s public Yum repository. In this example, we only focus on 64-bit Red Hat 5 Update 3.

[root@rac01 ~]# cd /etc/yum.repos.d/
[root@rac01 yum.repos.d]# ls -ltr
total 0
[root@rac01 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo
--11:27:04--  http://public-yum.oracle.com/public-yum-el5.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1402 (1.4K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[=========================================================>] 1,402       --.-K/s   in 0s     

11:27:04 (83.6 MB/s) - `public-yum-el5.repo' saved [1402/1402]

Edit the file public-yum-el5.repo with your choice of editor such as vi. Change enabled=0 to enabled=1 for the following sections since we are on RH5 U3

Portions of your yum.repos.d file should look something like this:

[el5_u3_base]
name=Enterprise Linux $releasever U3 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/3/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

[el5_addons]
name=Enterprise Linux $releasever - $basearch - addons
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

[el5_oracle_addons]
name=Enterprise Linux $releasever - $basearch - oracle_addons
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/oracle_addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

Install missing RPM needed to install Oracle

Here’s an example of downloading the compat-db RPM and installing the package

[root@rac01 yum.repos.d]# yum install compat-db
Loaded plugins: security
Setting up Install Process
Parsing package install arguments
Package compat-db-4.2.52-5.1.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package compat-db.i386 0:4.2.52-5.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================
 Package                Arch              Version                  Repository                Size
==================================================================================================
Installing:
 compat-db              i386              4.2.52-5.1               el5_u3_base              1.7 M

Transaction Summary
==================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)         

Total download size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
compat-db-4.2.52-5.1.i386.rpm                                              | 1.7 MB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : compat-db                                         [1/1] 

Installed: compat-db.i386 0:4.2.52-5.1
Complete!

Posted by Charles Kim, Oracle ACE Director

Viscosity Technology Tags:


Disable Dynamic Resource Mastering

Disable DRM in 11g Release 1

alter system set “_gc_undo_affinity”=FALSE scope=spfile sid=’*';
alter system set “_gc_policy_time”=0 scope=spfile sid=’*';

In 10g
alter system set “_gc_undo_affinity”=FALSE scope=spfile sid=’*';

alter system set “_gc_affinity_time”=0 scope=spfile sid=’*';


Create Seeded Database with dbca

Create a golden image of your database and create a template of that database for future database provisioning

Create Seeded Database with dbca

With proper planning and infrastructure, you should be able to provision a new database in matter of minutes rather than days.  You can create a template of a golden image of your database with all the corporate standards, auditing requirements and security compliance components.