Oracle Database Experts

By Charles Kim

August 27th, 2010

View your alert.log file in Oracle Database 11g

function ALERT {
export DB1=$ORACLE_SID
export DB=$(echo $ORACLE_SID|tr '[A-Z]' '[a-z]' |sed -e '$s/.$//')
export ASMDB=rdbms
if [ "$DB" = "+asm" ]; then export ASMDB=asm ; fi
if [ "$DB" = "+as" ]; then export ASMDB=asm ; export DB="+asm"; fi
[ -d "$ORACLE_BASE/diag/$ASMDB/$DB/$ORACLE_SID/trace" ] && view $ORACLE_BASE/diag/$ASMDB/$DB/$ORACLE_SID/trace/alert_$ORACLE_SID.log ||view $ORACLE_BASE/diag/$ASMDB/$DB1/$ORACLE_SID/trace/alert_$ORACLE_SID.log
}

Notes:
* Works in both RAC and non-RAC.
* Works for ASM and non-ASM instances.
* The ALERT function will open the alert log associated with your current ORACLE_SID

** Requirements:
1. ORACLE_BASE must already be set
2. Add this script to your .profile or .bash_profile depending on the shell you are using

Posted by Charles Kim, Oracle ACE Director

July 8th, 2010

Drop RAC Database

Frist set initialization parameter:
*.cluster_database=false

SQL> startup mount restrict exclusive;
ORACLE instance started.

Total System Global Area 4429185024 bytes
Fixed Size 2102032 bytes
Variable Size 1191185648 bytes
Database Buffers 3221225472 bytes
Redo Buffers 14671872 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

February 22nd, 2010

Execute runInstaller with the record option

The easiest and probably the most effective way to automate Oracle software installation is to use response files. You can either use the response files that is supplied with Oracle or create your own. To create your own response files, simply execute runInstaller with the record option. Near the end of the installation, instead of clicking on the Install option, cancel the installation and you will see the response file at your specified location.

runInstaller -record -destinationFile /tmp/crs.rsp
runInstaller -record -destinationFile /tmp/crs_up.rsp
runInstaller -record -destinationFile /tmp/asm.rsp
runInstaller -record -destinationFile /tmp/asm_up.rsp

December 27th, 2009
September 15th, 2009

Public Yum with Oracle

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

Technorati Tags:

September 9th, 2009

Automatic Diagnostic Repository (ADR) Command Line Interface

adrci is the new Oracle Database 11g Release 1 command line interface which is a component of the fault diagnosability infrastructure. adrci can help you view diagnostic data (traces, dumps, alert log), health monitor reports, and package incidents and problems to submit to Oracle support.

Let’s get started with the help command:

VISK > adrci -help
Syntax:
   adrci [-help] [script=script_filename]
         [exec = "one_command [;one_command;...]"]

Options      Description                     (Default)
-----------------------------------------------------------------
script       script file name                (None)
help         help on the command options     (None)
exec         exec a set of commands          (None)
-----------------------------------------------------------------

Here are initialization parameter for adrci:

SQL> show parameter diag

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
diagnostic_dest                      string      /apps/oracle

Data Deprecated           Init.ora Parameter           ADR location as of 11g
ADR_HOME                                               diagnotic_dest/diag/rdbms/lowerSID/upperSID
Core Dump                 CORE_DUMP_DEST               $ADR_HOME/cdump
Alert log data            BACKGROUND_DUMP_DEST         $ADR_HOME/trace/alert_upperSID.log
Alert Log XML file                                     $ADR_HOME/alert/log.xml
Background process trace  BACKGROUND_DUMP_DEST         $ADR_HOME/trace
User process trace        USER_DUMP_DEST               $ADR_HOME/trace

Start Here:

adrci> help

 HELP [topic]
   Available Topics:
        CREATE REPORT

adrci> show base
ADR base is "/apps/oracle"

adrci> show homes
ADR Homes:
diag/rdbms/visk4/VISK4
diag/clients/user_unknown/host_411310321_11
diag/clients/user_oracle/host_1204296188_11
diag/asm/+asm/+ASM
diag/tnslsnr/rac34/listener

Set Home to the database:
adrci> set home diag/rdbms/visk4/VISK4

Show alert (no arguments) - shows the alert log in the default editor:
adrci> show alert

ADR Home = /apps/oracle/diag/rdbms/visk4/VISK4:
*************************************************************************
Output the results to file: /tmp/alert_6731_30868_VISK4_1.ado

Show alert without setting your home - Prompts for a number that represents your home:
adrci> show alert

Choose the alert log from the following homes to view:

1: diag/rdbms/visk4/VISK4
2: diag/clients/user_unknown/host_411310321_11
3: diag/clients/user_oracle/host_1204296188_11
4: diag/asm/+asm/+ASM
5: diag/tnslsnr/rac34/listener
Q: to quit

Please select option: 1
Output the results to file: /tmp/alert_7068_30865_VISK4_1.ado

Please select option: Q
adrci>

Show last 30 lines of the alert log:

adrci> show alert -tail 30
Do an equvialent of a tail -f alert$ORACLE_SID.log file:
adrci> show alert -tail -f

Control-c to break

Show just ORA- messages:

adrci> set home diag/rdbms/visk4/VISK4
adrci> show alert -p "message_text like '%ORA-%'"

ADR Home = /apps/oracle/diag/rdbms/visk4/VISK4:
*************************************************************************

Something cool – display your alert in IE or Firefox:

adrci> set editor mozilla
adrci> show alert

Put it back:

adrci> set editor vi

ADR Home = /apps/oracle/diag/rdbms/visk4/VISK4:
*************************************************************************
Output the results to file: /tmp/alert_6731_30868_VISK4_3.ado

Scripting it:

adrci exec="show homes; set home diag/rdbms/visk4/VISK4; show alert -tail 100"
alias tail100='adrci exec="show homes; set home diag/rdbms/visk4/VISK4; show alert -tail 100"'

Now put it in an ADR script file:

adrci script=adr_tail100.txt

VISK4 > cat adr_tail100.txt
show homes; set home diag/rdbms/visk4/VISK4; show alert -tail 100

This is how the log.xml file looks like:

rac34.dbaexpert.com:/apps/oracle/diag/rdbms/visk4/VISK4/alert
VISK4 > tail -10 log.xml
 module='' pid='6596'>
 <txt>Thread 1 advanced to log sequence 15
 </txt>
</msg>
<msg time='2008-03-19T10:20:26.128-05:00' org_id='oracle' comp_id='rdbms'
 client_id='' type='UNKNOWN' level='16'
 module='' pid='6596'>
 <txt>  Current log# 3 seq# 15 mem# 0: +FRA/visk4/onlinelog/group_3.259.649601669
 </txt>
</msg>
adrci> show tracefile
     diag/rdbms/visk4/VISK4/trace/VISK4_vktm_6578.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_arc2_16052.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_lgwr_6908.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_ora_6908.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_arc2_6952.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_p001_6946.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_ora_15665.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_ora_15718.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_vktm_15450.trc
     diag/rdbms/visk4/VISK4/trace/VISK4_m000_6814.trc

Equivalent to ls -lt:

adrci> show tracefile -rt
   19-MAR-08 09:20:26  diag/rdbms/visk4/VISK4/trace/VISK4_arc1_6634.trc
   19-MAR-08 09:20:26  diag/rdbms/visk4/VISK4/trace/alert_VISK4.log
   19-MAR-08 09:16:35  diag/rdbms/visk4/VISK4/trace/VISK4_m000_6814.trc
   19-MAR-08 09:14:45  diag/rdbms/visk4/VISK4/trace/VISK4_j001_6800.trc
   19-MAR-08 09:09:36  diag/rdbms/visk4/VISK4/trace/VISK4_ora_6626.trc
   19-MAR-08 09:09:31  diag/rdbms/visk4/VISK4/trace/VISK4_dbrm_6584.trc
   19-MAR-08 09:09:28  diag/rdbms/visk4/VISK4/trace/VISK4_lgwr_6596.trc
   19-MAR-08 09:09:20  diag/rdbms/visk4/VISK4/trace/VISK4_vktm_6578.trc
   19-MAR-08 09:09:19  diag/rdbms/visk4/VISK4/trace/VISK4_ora_6558.trc
   18-MAR-08 12:47:27  diag/rdbms/visk4/VISK4/trace/VISK4_ora_7242.trc
   18-MAR-08 12:47:27  diag/rdbms/visk4/VISK4/trace/VISK4_vktm_6860.trc
...
...

Show problem without setting your home – get single report for all homes:

adrci> show problem

ADR Home = /apps/oracle/diag/rdbms/visk4/VISK4:
*************************************************************************
0 rows fetched

ADR Home = /apps/oracle/diag/clients/user_unknown/host_411310321_11:
*************************************************************************
0 rows fetched

ADR Home = /apps/oracle/diag/clients/user_oracle/host_1204296188_11:
*************************************************************************
0 rows fetched

ADR Home = /apps/oracle/diag/asm/+asm/+ASM:
*************************************************************************
0 rows fetched

ADR Home = /apps/oracle/diag/tnslsnr/rac34/listener:
*************************************************************************
0 rows fetched

Show retention policy:

adrci> show control

ADR Home = /apps/oracle/diag/rdbms/visk4/VISK4:
*************************************************************************
ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                         LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
2813981488           720                  8760                 2008-03-17 12:51:39.378653 -05:00                           1                    2                    0          1                    2008-03-17 12:51:39.378653 -05:00
1 rows fetched

Basically, the short policy=720 (1 month – The incident files and dumps retention policy ( Default is one month))
And the long policy=8760 (1 Year – The incident metadata retention policy ( default is 1 year ))

Now, let’s change the short and long retention policies:

adrci> set control (shortp_policy=180)
adrci> set control (longp_policy=4380)

Problem: A critical error in the database. ADR records a problem with a problem key
There is a one to many relationship between a problem and incidents.

Incidents: An incident is a single occurance of a problem. ADR identifies incidents by a incident ID. Not all incidents are captured. Oracle, by default, performs flood control by limiting the number of dumps per hour to 5.

adrci> show incident

ADR Home = /apps/oracle/diag/rdbms/visk4/VISK4:
*************************************************************************
0 rows fetched

Health Monitor Check:
Two kinds:
1. Reactive – Automatically executed by the diagnostic infrastructure
2. Manually by the DBA

 1* select name from V$HM_CHECK
SQL> /

NAME
----------------------------------------------------------------

HM Test Check
DB Structure Integrity Check
Data Block Integrity Check
Redo Integrity Check
Logical Block Check
Transaction Integrity Check
Undo Segment Integrity Check
All Control Files Check
CF Member Check
All Datafiles Check
Single Datafile Check
Log Group Check
Log Group Member Check
Archived Log Check
Redo Revalidation Check
IO Revalidation Check
Block IO Revalidation Check
Txn Revalidation Check
Failure Simulation Check
Dictionary Integrity Check

21 rows selected.

Manually execute a health monitor run:

SQL> exec dbms_HM.RUN_CHECK('Dictionary Integrity Check');

PL/SQL procedure successfully completed.

Health Monitor Run:

adrci> show hm_run -p "run_id=1"

ADR Home = /apps/oracle/diag/rdbms/visk4/VISK4:
*************************************************************************

**********************************************************
HM RUN RECORD 1
**********************************************************
   RUN_ID                        1
   RUN_NAME                      HM_RUN_1
   CHECK_NAME                    DB Structure Integrity Check
   NAME_ID                       2
   MODE                          2
   START_TIME                    2008-03-17 12:54:17.240082 -05:00
   RESUME_TIME                   <NULL>
   END_TIME                      2008-03-17 12:54:43.528348 -05:00
   MODIFIED_TIME                 2008-03-17 12:54:43.528348 -05:00
   TIMEOUT                       0
   FLAGS                         0
   STATUS                        5
   SRC_INCIDENT_ID               0
   NUM_INCIDENTS                 0
   ERR_NUMBER                    0
   REPORT_FILE                   <NULL>
1 rows fetched
adrci> create report hm_run hm_run_1
adrci> exit

SQL> set long 1000000

  1* select dbms_hm.get_run_report('HM_RUN_1') from dual
SQL> /

DBMS_HM.GET_RUN_REPORT('HM_RUN_1')
--------------------------------------------------------------------------------
Basic Run Information
 Run Name                     : HM_RUN_1
 Run Id                       : 1
 Check Name                   : DB Structure Integrity Check
 Mode                         : REACTIVE
 Status                       : COMPLETED
 Start Time                   : 2008-03-17 12:54:17.240082 -05:00
 End Time                     : 2008-03-17 12:54:43.528348 -05:00
 Error Encountered            : 0
 Source Incident Id           : 0
 Number of Incidents Created  : 0

DBMS_HM.GET_RUN_REPORT('HM_RUN_1')
--------------------------------------------------------------------------------
Input Paramters for the Run
Run Findings And Recommendations
 Finding
 Finding Name  : System datafile is old
 Finding ID    : 2
 Type          : FAILURE
 Status        : OPEN
 Priority      : CRITICAL
 Message       : System datafile 1:
               '+DATA/visk4/datafile/system.256.649601515' needs media

DBMS_HM.GET_RUN_REPORT('HM_RUN_1')
--------------------------------------------------------------------------------               recovery
 Message       : Database cannot be opened
 Finding
 Finding Name  : Old Data Files
 Finding ID    : 5
 Type          : FAILURE
 Status        : OPEN
 Priority      : HIGH
 Message       : One or more non-system datafiles need media recovery
 Message       : See impact for individual child failures
 Finding

DBMS_HM.GET_RUN_REPORT('HM_RUN_1')
-------------------------------------------------------------------------------- Finding Name  : Datafile is old
 Finding ID    : 8
 Type          : FAILURE
 Status        : OPEN
 Priority      : HIGH
 Message       : Datafile 2: '+DATA/visk4/datafile/sysaux.257.649601515' needs
               media recovery
 Message       : Some objects in tablespace SYSAUX might be unavailable
 Finding
 Finding Name  : Datafile is old
 Finding ID    : 14

DBMS_HM.GET_RUN_REPORT('HM_RUN_1')
-------------------------------------------------------------------------------- Type          : FAILURE
 Status        : OPEN
 Priority      : HIGH
 Message       : Datafile 3: '+DATA/visk4/datafile/undotbs1.258.649601517'
               needs media recovery
 Message       : Some objects in tablespace UNDOTBS1 might be unavailable
 Finding
 Finding Name  : Datafile is old
 Finding ID    : 20
 Type          : FAILURE
 Status        : OPEN

DBMS_HM.GET_RUN_REPORT('HM_RUN_1')
-------------------------------------------------------------------------------- Priority      : HIGH
 Message       : Datafile 4: '+DATA/visk4/datafile/users.259.649601517' needs

Get the same output from adrci but in XML format:

adrci> show report hm_run HM_RUN_1
<?xml version="1.0" encoding="US-ASCII"?>
<HM-REPORT REPORT_ID="HM_RUN_1">
    <TITLE>HM Report: HM_RUN_1</TITLE>
    <RUN_INFO>
        <CHECK_NAME>DB Structure Integrity Check</CHECK_NAME>
        <RUN_ID>1</RUN_ID>
        <RUN_NAME>HM_RUN_1</RUN_NAME>
        <RUN_MODE>REACTIVE</RUN_MODE>
        <RUN_STATUS>COMPLETED</RUN_STATUS>
        <RUN_ERROR_NUM>0</RUN_ERROR_NUM>
        <SOURCE_INCIDENT_ID>0</SOURCE_INCIDENT_ID>
        <NUM_INCIDENTS_CREATED>0</NUM_INCIDENTS_CREATED>
        <RUN_START_TIME>2008-03-17 12:54:17.240082 -05:00</RUN_START_TIME>
        <RUN_END_TIME>2008-03-17 12:54:43.528348 -05:00</RUN_END_TIME>
    </RUN_INFO>
    <RUN_PARAMETERS/>
    <RUN-FINDINGS>
        <FINDING>
            <FINDING_NAME>System datafile is old</FINDING_NAME>
            <FINDING_ID>2</FINDING_ID>
            <FINDING_TYPE>FAILURE</FINDING_TYPE>
            <FINDING_STATUS>OPEN</FINDING_STATUS>
            <FINDING_PRIORITY>CRITICAL</FINDING_PRIORITY>
            <FINDING_CHILD_COUNT>0</FINDING_CHILD_COUNT>
            <FINDING_CREATION_TIME>2008-03-17 12:54:42.631861 -05:00</FINDING_CREATION_TIME>
            <FINDING_MESSAGE>System datafile 1: '+DATA/visk4/datafile/system.256.649601515' needs media recovery</FINDING_MESSAGE>
            <FINDING_MESSAGE>Database cannot be opened</FINDING_MESSAGE>
        </FINDING>
...
...
...

See the output on the OS:

rac34.dbaexpert.com:/apps/oracle/diag/rdbms/visk4/VISK4/hm
VISK4 > ls -ltr
total 16
-rw-r-----  1 oracle oinstall 4089 Mar 19 12:56 HMREPORT_hm_run_1.hm
-rw-r-----  1 oracle oinstall 4089 Mar 19 12:58 HMREPORT_HM_RUN_1.hm
-rw-r-----  1 oracle oinstall 2305 Mar 19 13:02 HMREPORT_hm_run_321.hm
-rw-r-----  1 oracle oinstall 2305 Mar 19 13:02 HMREPORT_HM_RUN_321.hm

OS log files are also in XML format:

VISK4 > cat HMREPORT_hm_run_1.hm
<?xml version="1.0" encoding="US-ASCII"?>
<HM-REPORT REPORT_ID="HM_RUN_1">
    <TITLE>HM Report: HM_RUN_1</TITLE>
    <RUN_INFO>
        <CHECK_NAME>DB Structure Integrity Check</CHECK_NAME>
        <RUN_ID>1</RUN_ID>
...
...

adrci> show problem

ADR Home = /apps/oracle/diag/clients/user_oracle/host_282291381_11:
*************************************************************************
PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME
-------------------- ----------------------------------------------------------- -------------------- ----------------------------------------
1                    oci 24550 [3]                                               1                    2008-02-27 15:34:18.974522 -06:00
1 rows fetched

adrci> show incident

ADR Home = /apps/oracle/diag/clients/user_oracle/host_282291381_11:
*************************************************************************
INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME
-------------------- ----------------------------------------------------------- ----------------------------------------
1                    oci 24550 [3]                                               2008-02-27 15:34:18.974522 -06:00
1 rows fetched

adrci> set home diag/clients/user_oracle/host_282291381_11
adrci> ips create package incident 1
Created package 1 based on incident id 1, correlation level typical
adrci> ips add incident 1 package 1
Added incident 1 to package 1
adrci> ips generate package 1 in /tmp
Generated package 1 in file /tmp/oci245503_20080319153442_COM_2.zip, mode complete

/tmp > unzip -l oci245503_20080319153442_COM_2.zip
Archive:  oci245503_20080319153442_COM_2.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/
   106736  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/incident/incdir_1/ora_24864_3086436032_i1.trc
     4231  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/incident/incdir_1/ora_24864_3086436032_i1.trm
      308  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/trace/ora_24864_3086436032.trc
      206  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/trace/ora_24864_3086436032.trm
     8040  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/alert/log.xml
      465  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/trace/sqlnet.log
      922  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/IPS_CONFIGURATION.dmp
      444  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/IPS_PACKAGE.dmp
      193  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_INCIDENT.dmp
     1030  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_FILE.dmp
      234  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/IPS_PACKAGE_HISTORY.dmp
     2676  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/IPS_FILE_METADATA.dmp
      214  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/IPS_FILE_COPY_LOG.dmp
      224  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION_DEF.dmp
      161  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION_PARAMETER_DEF.dmp
      179  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION.dmp
      173  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/DDE_USER_ACTION_PARAMETER.dmp
       86  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/DDE_USER_INCIDENT_TYPE.dmp
       92  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/DDE_USER_INCIDENT_ACTION_MAP.dmp
      642  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/INCIDENT.dmp
      235  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/INCCKEY.dmp
      270  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/INCIDENT_FILE.dmp
      395  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/PROBLEM.dmp
      306  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/HM_RUN.dmp
      185  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/export/EM_USER_ACTIVITY.dmp
     1371  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/config.xml
      216  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/crs/crsdiag.log
      539  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/metadata.xml
     9832  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/manifest_1_1.xml
    10381  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/manifest_1_1.html
    12542  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_1/manifest_1_1.txt
      922  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/IPS_CONFIGURATION.dmp
      444  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/IPS_PACKAGE.dmp
      193  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/IPS_PACKAGE_INCIDENT.dmp
     1830  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/IPS_PACKAGE_FILE.dmp
      320  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/IPS_PACKAGE_HISTORY.dmp
     4958  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/IPS_FILE_METADATA.dmp
      214  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/IPS_FILE_COPY_LOG.dmp
      401  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/DDE_USER_ACTION_DEF.dmp
      337  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/DDE_USER_ACTION_PARAMETER_DEF.dmp
      204  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/DDE_USER_ACTION.dmp
      198  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/DDE_USER_ACTION_PARAMETER.dmp
      153  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/DDE_USER_INCIDENT_TYPE.dmp
      138  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/DDE_USER_INCIDENT_ACTION_MAP.dmp
      642  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/INCIDENT.dmp
      235  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/INCCKEY.dmp
      270  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/INCIDENT_FILE.dmp
      395  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/PROBLEM.dmp
      342  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/HM_RUN.dmp
      207  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/export/EM_USER_ACTIVITY.dmp
     1371  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/config.xml
      216  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/crs/crsdiag.log
      539  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/metadata.xml
    16897  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/manifest_1_2.xml
    16171  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/manifest_1_2.html
    20542  03-19-08 15:39   diag/clients/user_oracle/host_282291381_11/incpkg/pkg_1/seq_2/manifest_1_2.txt
        0  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/alert/
        0  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/cdump/
        0  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/incident/
        0  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/incpkg/
        0  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/lck/
        0  03-19-08 15:35   diag/clients/user_oracle/host_282291381_11/metadata/
        0  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/stage/
        0  03-19-08 15:18   diag/clients/user_oracle/host_282291381_11/sweep/
        0  02-27-08 15:34   diag/clients/user_oracle/host_282291381_11/trace/
      539  03-19-08 15:39   metadata.xml
 --------                   -------
   232206                   67 files

adrci with here documents

VISK > cat adrci.ksh
adrci << EOF
set homepath diag/rdbms/visk/VISK
show alert -tail 1000
exit
EOF

Posted by Charles Kim, Oracle ACE

September 6th, 2009

ASM Sector Size for disk groups

Being able to specify a sector size larger than the default 512 bytes is another ASM feature of Oracle Databases 11g Release 2. Now, we can specify a sector size up to 4k. There is a new SECTOR_SIZE attribute while create the ASM disk group.

ASM Cluster File System (Oracle ACFS) does not support 4 KB sector drives.
There’s performance implications for Oracle ACFS when utilizing 4 KB sector disk drives in 512 sector emulation mode.

September 5th, 2009

Installing Oracle Database 11g Release 2 – Enterprise Database Edition

In this blog, I will show you the different look and feel of the OUI for Oracle Database 11g Release 2. The OUI is nothing like what you’ve seen before.

Before you begin this exercise, you must first download the zipped software from Oracle’s Technology Network from this URL. The zipped files are larger than previous releases sized at 2.1 GB for the 32-bit Linux operating system and 2.2 GB for the 64-bit operating system. Once you down and unzip the files, change your directory to the database directory and launch Oracle’s Universal Installer (OUI):

[oracle@jin1 database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 112122 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 1972 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-09-05_07-28-39AM. Please wait ...

You will see the Configure Security Update screen where you are asked to enter your email address and Metalink password:
Picture 53.png
You can enter the credentials or just bypass this page by unchecking the “I wish to receive security updates via My Oracle Support” checkbox and clicking on the Next button
You will immediately see a dialog box indicated that you email address was not specified.
Picture 54.png
You can also see that Oracle is asking you if you want to be uninformed of critical security issues. In our exercise, click on the Yes button and continue to be routed to the Select Installation Option screen
Picture 55.png
From the Select Installation Option screen, leave the default setting to Create and Configure a database and click on the Next button
Picture 56.png
Here’s a screen that is new as of 11g Release 2. You have the option to create a Desktop Class or a Server Class database configuration. The Server Class option is for the databases that you would traditionally install for your production data center. The Server Class Option allows you to choose more advanced configuration options. The Server Class option is the default. Since our goal is to create a scenario that mimics what our production environment will look like, keep the Server Class option and click on the Next button.

Because my server happens to be a single node RAC configuration, I am presented the Node Selection screen.
Picture 58.png
Since I only have one node, I will keep the settings and Click on Next. I do not have to worry about SSH Connectivity because user equivalence was already setup as part of the Grid Infrastructure installation and configuration.

From the Select Install Type screen, let’s choose the default Typical install option
Picture 59.png
Click on Next to continue

From the Install Typical Configuration screen, enter and correct all the information such as ORACLE_BASE, software location (ORACLE_HOME), passwords for ASMSNMP, database edition, OSDBA Group, and administrative password for the new database you are about to create. Also specify the Global database name. In our example, we will place our database inside DATA diskgroup on ASM.
Picture 60.png
You will notice that the passwords fields are highlighted red immediately until the Confirm password field matches the first password field. You will also notice that Oracle checks to see if the provided passwords conform to their standards. In our example, let’s simply click on the Next button to proceed

Picture 61.png
As you can see Oracle wants to make sure that you are aware that your passwords do not conform to their standards and wants you to acknowledge that you are risking and compromising the database environment. Since this is just an educational implementation, let’s click on the Yes button to continue.

Oracle will perform myriads of checks and take you to the Perform Prerequisite Checks screen and display all the errors in the configuration that it found:
Picture 62.png
You can see ingore our errors by clicking on the Ignore All checkbox on the upper right corner. Click on the Next button to continue to the Summary screen
Picture 63.png
Review the summary screen and make sure everything is configured correctly. In this screen, you also have the option to generate a response file of your chosen options to perform a silent installation in the future.
Click on the Finish button once you are comfortable with what you reviewed.

The Install Product screen will show us the progress screen of the database installation and configuration:
Picture 65.png
After the software installation is complete, the database configuration assistant will be launched (since we chose the option to create the database called DBTOOLS).
Picture 66.png
Once DBCA completes the database creation process, you will see a status page that looks similar to this:
Picture 67.png
You can choose the password management button and lock/unlock database accounts. Click on the OK. You will go back to the Install Product progress page for additional processing. Once everything is complete, you will see the screen to run root.sh:
Picture 68.png

As root, change your directory to /apps/oracle/product/11.2.0/dbhome_1 and execute root.sh. Executing root.sh will produce the following output:

[root@jin1 dbhome_1]# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /apps/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: 

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

Click on the OK button
Picture 69.png
Click on the Close button

We have successfully installed Oracle Database 11g Release 2 software and created our database on ASM.

Posted by Charles Kim, Oracle ACE

September 3rd, 2009

Single Node RAC Grid Infrastructure Installation With Oracle Database 11g Release 2

We are going to install a single node RAC database with ASM on Red Hat 5 Update 3 to leverage the latest and greatest features of Oracle Database 11g Release 2.

Before we begin, let’s look at the contents of the /etc/hosts file

[root@jin1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
# RAC Node #1
192.168.242.128         jin1.dbaexpert.com jin1
192.168.242.228         jin1-vip.dbaexpert.com jin1-vip
192.168.242.108         jin-cluster.dbaexpert.com jin-cluster
192.168.60.128          jin1-priv.dbaexpert.com jin1-priv

I make an assumption that you already downloaded Oracle Database 11g Release 2 from Oracle Technology Network (OTN). Here’s a really big change for Oracle Database 11g Release 2 from the previous release of Oracle that you are used to relative to ASM. Remember in the previous releases that ASM was part of the database software technology? As of Oracle Database 11g Release 2, ASM is now part of the Grid Infrastructure which includes both ASM and Clusterware. This change will surprise alot of DBAs!

The installation process that we are performing to install a single RAC instance with ASM is from the Grid Infrastructure software. If you have not, please download the Grid Infrastructure software and unzip it. From the unzipped software directory, let’s launch the OUI and setup our single node RAC.

[oracle@jin1 grid]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 115174 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2047 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-09-03_01-01-57AM. Please wait ...

Select the Installation Option:
Picture 29.png

Note: Do you notice that the OUI is completely revamped in terms of look and feel. At first you may wander what in the world did Oracle do, but later like me, you will probably embrace it.

In our example, we will choose to install and configure the Typical Grid Infrastructure for a Cluster.
Click on Next

Picture 30.png
Select the Typical Installation type and click on the Next button

From the Specify Cluster Configuration screen, click on the SSH Connectivity button:
Picture 31.png

You will see the options to enter the password for oracle and to setup/test the SSH user equivalence.
Picture 33.png
Enter the password for oracle and click on Setup
You will immediately see a small window indicating the ssh connectivity is being configured and may take several minutes. Upon completion, you will get a dialog box indicating that SSH connectivity setup is complete.
Picture 35.png
Click on the OK button

Next, click on the Network Interfaces button. You will be directed to the Identify Network Interfaces screen:
Picture 36.png

Make changes as required for you RAC environment. Please make sure that both private and public interfaces are only defined once and the remaining interfaces are marked as Do Not Use. Click on the OK button when complete. You will return to the Specify Cluster Configuration screen. Click on the Next button. At this point the OUI will check on the scan information, public network, and node readiness. You will be routed to the Specify Install Locations screen:
Picture 44.png
In this screen, specify/correct the directory name for ORACLE_BASE. You will need to change the Cluster Registry Storage Type from File System to Automatic Storage Management. Lastly, you will need to specify the password for SYSASM and confirm the password for accuracy.

Note:
#1. You will notice two differences in the password fields. First, as you start typing, you get an error message stating that the passwords do not match. Once you complete the password confirmation field, the password mismatch warning will go away. Also, oracle performs a password security check and informs you if your passwords conform to their security assessment.
#2. You may or may not have caught it but we just stuck the OCR/Vote disk inside ASM !!! This is another BIG ASM new feature in Oracle Database 11g Release 2. Come visit this blog site again in the near future … There’s more ASM surprises that will be revealed in future blog postings.

Click on the Next button
If your passwords do not conform to Oracle’s standards, you will receive an alert:
Picture 45.png
Click on the Yes button to be directed to the Create ASM Disk Group screen.
Picture 46.png
Specify the Disk Group name as Data and click on the disks that you want to associate with this diskgroup. We will only choose ORCL:DATA1 and ORCL:DATA2 for our diskgroup with external redundancy.
Click on the Next button to be directed to the Create OraInventory screen
Picture 38.png

Notice that Oracle Inventory is now one level below ORACLE_BASE
Click on the Next button
You will be directed to the Perform Prerequisite Checks screen
Picture 39.png

Note: For these errors, we can ignore the warning and proceed with the Grid Infrastructure Installation and Configuration
Click on the Ignore All checkbox on the upper right hand corner and click on the Next button to continue

On a side note, you may encounter failures in other components in the of the Perform Prerequisite Checks screen. Here’s an example where kernel parameters need to modified:
Picture 23.png
With Oracle Database 11g Release 2, you will notice the new Fix and Check Again button. Click on the” Fix & Check Again” button.

You will immediately see a window to execute the fixit script as root:
Picture 24.png

Change your directory to the /tmp/CVU* directory and execute the script as root:

[root@jin1 CVU_11.2.0.1.0_oracle]# ./runfixup.sh
Response file being used is :./fixup.response
Enable file being used is :./fixup.enable
Log file location: ./orarun.log
Setting Kernel Parameters...
fs.file-max = 327679
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500

After a successful execution as root, click on the OK button to go back to the Perform Prerequisite Checks screen. The OUI will automatically re-run the prerequisite checks and report any errors. You are strongly recommended to resolve all the issues reported from the Perform Prerequisite Checks screen. In our example, we will ignore the warnings for the Physical Memory, Swap Size and Network Time Protocol (NTP).
Click on Next

In the summary screen, you can review all your settings. You can even create a response file based on your selections. Click on the Finish button to start the software installation process.

In the Setup screen, you can view the status of the binary software copy:
Picture 40.png

After the software installation is complete, you will be instructed to execute configuration scripts as root: orainstRoot.sh and root.sh
Picture 41.png

Let’s first run the orainstRoot.sh script from the oraInventory directory:

[root@jin1 oraInventory]# ./orainstRoot.sh
Changing permissions of /apps/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /apps/oraInventory to oinstall.
The execution of the script is complete.

Now, let’s run the root.sh script from the GRID Infrastructure Home:

[root@jin1 oraInventory]# cd ../11.2.0/grid
[root@jin1 grid]# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /apps/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2009-09-03 15:15:25: Parsing the host name
2009-09-03 15:15:25: Checking for super user privileges
2009-09-03 15:15:25: User has super user privileges
Using configuration parameter file: /apps/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start 'ora.gipcd' on 'jin1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'jin1'
CRS-2676: Start of 'ora.gipcd' on 'jin1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'jin1'
CRS-2676: Start of 'ora.gpnpd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'jin1'
CRS-2676: Start of 'ora.cssdmonitor' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'jin1'
CRS-2672: Attempting to start 'ora.diskmon' on 'jin1'
CRS-2676: Start of 'ora.diskmon' on 'jin1' succeeded
CRS-2676: Start of 'ora.cssd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'jin1'
CRS-2676: Start of 'ora.ctssd' on 'jin1' succeeded

ASM created and started successfully.

DiskGroup DATA created successfully.

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'jin1'
CRS-2676: Start of 'ora.crsd' on 'jin1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 08463e4d8fd44f75bf05ac8785c8445c.
Successfully replaced voting disk group with +DATA.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   08463e4d8fd44f75bf05ac8785c8445c (ORCL:DATA1) [DATA]
Located 1 voting disk(s).
CRS-2673: Attempting to stop 'ora.crsd' on 'jin1'
CRS-2677: Stop of 'ora.crsd' on 'jin1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'jin1'
CRS-2677: Stop of 'ora.asm' on 'jin1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'jin1'
CRS-2677: Stop of 'ora.ctssd' on 'jin1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'jin1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'jin1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'jin1'
CRS-2677: Stop of 'ora.cssd' on 'jin1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'jin1'
CRS-2677: Stop of 'ora.gpnpd' on 'jin1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'jin1'
CRS-2677: Stop of 'ora.gipcd' on 'jin1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'jin1'
CRS-2677: Stop of 'ora.mdnsd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.mdnsd' on 'jin1'
CRS-2676: Start of 'ora.mdnsd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'jin1'
CRS-2676: Start of 'ora.gipcd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'jin1'
CRS-2676: Start of 'ora.gpnpd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'jin1'
CRS-2676: Start of 'ora.cssdmonitor' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'jin1'
CRS-2672: Attempting to start 'ora.diskmon' on 'jin1'
CRS-2676: Start of 'ora.diskmon' on 'jin1' succeeded
CRS-2676: Start of 'ora.cssd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'jin1'
CRS-2676: Start of 'ora.ctssd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'jin1'
CRS-2676: Start of 'ora.asm' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'jin1'
CRS-2676: Start of 'ora.crsd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'jin1'
CRS-2676: Start of 'ora.evmd' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'jin1'
CRS-2676: Start of 'ora.asm' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.DATA.dg' on 'jin1'
CRS-2676: Start of 'ora.DATA.dg' on 'jin1' succeeded
CRS-2672: Attempting to start 'ora.registry.acfs' on 'jin1'
CRS-2676: Start of 'ora.registry.acfs' on 'jin1' succeeded

jin1     2009/09/03 15:20:48     /apps/11.2.0/grid/cdata/jin1/backup_20090903_152048.olr
Preparing packages for installation...
cvuqdisk-1.0.7-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 2047 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /apps/oraInventory
'UpdateNodeList' was successful.

Note:
Just like every other release of Oracle Clusterware, executing root.sh is where rubber meets the road. All the OUI screens up to root.sh performs preliminary checks and collects information as to how the cluster is to be configured. Please make sure that you do not have any errors in your root.sh output.

Now click on OK to go back to the Setup screen:
Picture 47.png

Often the Oracle Cluster Verification Utility fails for various reasons:
Picture 48.png

Click on the OK button to continue
Picture 50.png
Click on the Close button to finish.

Notice that after our installation, we have eth0:1 and eth0:2: One for our traditional VIP and the other for our SCAN VIP.

eth0      Link encap:Ethernet  HWaddr 00:0C:29:A2:20:E2
          inet addr:192.168.242.128  Bcast:192.168.242.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea2:20e2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28695 errors:26080 dropped:0 overruns:0 frame:0
          TX packets:75327 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6115396 (5.8 MiB)  TX bytes:65449062 (62.4 MiB)
          Interrupt:67 Base address:0x2024 

eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:A2:20:E2
          inet addr:192.168.242.228  Bcast:192.168.242.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:67 Base address:0x2024 

eth0:2    Link encap:Ethernet  HWaddr 00:0C:29:A2:20:E2
          inet addr:192.168.242.108  Bcast:192.168.242.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:67 Base address:0x2024 

eth1      Link encap:Ethernet  HWaddr 00:0C:29:A2:20:EC
          inet addr:192.168.60.128  Bcast:192.168.60.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea2:20ec/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3698 errors:3478 dropped:0 overruns:0 frame:0
          TX packets:17852 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:324710 (317.0 KiB)  TX bytes:2004525 (1.9 MiB)
          Interrupt:67 Base address:0x20a4

We have successfully installed our first single node RAC environment with Oracle Database 11g Release 2.

Posted by Charles Kim, Oracle ACE

July 9th, 2009

Cloning an Oracle Home after you tar the binaries from one server to another

First, let’s look at the inventory XML file on the target server before the clone:

db – oracle: vi inventory.xml

 

<?xml version="1.0" standalone="yes" ?>

<!– Copyright (c) 2005 Oracle Corporation. All rights Reserved –>

<!– Do not modify the contents of this file by hand. –>

<INVENTORY>

<VERSION_INFO>

<SAVED_WITH>10.2.0.3.0</SAVED_WITH>

<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>

</VERSION_INFO>

<HOME_LIST>

<HOME NAME="db10g" LOC="/apps/oracle/product/db10g" TYPE="O" IDX="1"/>

<HOME NAME="oms10g" LOC="/apps/oracle/product/oms10g" TYPE="O" IDX="2"/>

<HOME NAME="agent10g" LOC="/apps/oracle/product/agent10g" TYPE="O" IDX="3"/>

</HOME_LIST>

</INVENTORY>

 

Copy the binaries from one server to the other

$- oracle: tar cvf – db |ssh rac1.dbaexpert.com "cd /apps/oracle/product/10.2.0; tar xvf -"

Execute the runInstaller in silent mode

cd $ORACLE_HOME/oui/bin

db – oracle: ./runInstaller -silent -clone ORACLE_HOME="/apps/oracle/product/10.2.0/db" ORACLE_HOME_NAME="OraDb10g_home1"

Starting Oracle Universal Installer…

 

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-07-09_09-08-33AM. Please wait …rac1.dbaexpert.com:/apps/oracle/product/10.2.0/db/oui/bin

db – oracle: Oracle Universal Installer, Version 10.2.0.4.0 Production

Copyright (C) 1999, 2008, Oracle. All rights reserved.

 

You can find a log of this install session at:

/apps/oracle/oraInventory/logs/cloneActions2009-07-09_09-08-33AM.log

………………………………………………………………………………………. 100% Done.

 

 

 

Installation in progress (Thursday, July 9, 2009 9:08:45 AM EDT)

……………………………………………………………….. 74% Done.

Install successful

 

Linking in progress (Thursday, July 9, 2009 9:08:52 AM EDT)

Link successful

 

Setup in progress (Thursday, July 9, 2009 9:11:21 AM EDT)

Setup successful

 

End of install phases.(Thursday, July 9, 2009 9:11:25 AM EDT)

WARNING:

The following configuration scripts need to be executed as the "root" user.

#!/bin/sh

#Root script to run

/apps/oracle/product/10.2.0/db/root.sh

To execute the configuration scripts:

1. Open a terminal window

2. Log in as "root"

3. Run the scripts

 

The cloning of OraDb10g_home1 was successful.

Please check ‘/apps/oracle/oraInventory/logs/cloneActions2009-07-09_09-08-33AM.log’ for more details.

 

Inventory XML file AFTER the clone:

db – oracle: cat inventory.xml

<?xml version="1.0" standalone="yes" ?>

<!– Copyright (c) 2008 Oracle Corporation. All rights Reserved –>

<!– Do not modify the contents of this file by hand. –>

<INVENTORY>

<VERSION_INFO>

<SAVED_WITH>10.2.0.4.0</SAVED_WITH>

<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>

</VERSION_INFO>

<HOME_LIST>

<HOME NAME="db10g" LOC="/apps/oracle/product/db10g" TYPE="O" IDX="1"/>

<HOME NAME="oms10g" LOC="/apps/oracle/product/oms10g" TYPE="O" IDX="2"/>

<HOME NAME="agent10g" LOC="/apps/oracle/product/agent10g" TYPE="O" IDX="3"/>

<HOME NAME="OraDb10g_home1" LOC="/apps/oracle/product/10.2.0/db" TYPE="O" IDX="4"/>

</HOME_LIST>

</INVENTORY>

July 2nd, 2009

sqlplus lightweight session when all fails

What do you do when you can’t login via sqlplus / as sysdba?  You try to connect and it just hangs. You can login with the -prelim option. It is a lightweight session and No SQL is allowed in the connected session.

$ sqlplus -prelim / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 2 03:32:26 2009

Copyright (c) 1982, 2007, Oracle.&nbsp; All Rights Reserved.
SQL> shutdown abort;

ORACLE instance shut down.
SQL> exit
Disconnected from ORACLE
rac01.dbaexpert.com:/apps/oracle
DBATOOLS - oracle: sqlp

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 2 03:33:08 2009<

Copyright (c) 1982, 2007, Oracle.&nbsp; All Rights Reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area&nbsp; 419430400 bytes
Fixed Size       2084456 bytes
Variable Size    155189656 bytes
Database Buffers 255852544 bytes
Redo Buffers     6303744 bytes
Database mounted.
Database opened.

Posted by Charles Kim, Oracle ACE

June 25th, 2009

Setting up SQLPlus Autotrace for performance tuning

SET AUTOTRACE OFF – Turn off AUTOTRACE This is the default.
SET AUTOTRACE ON EXPLAIN – Shows only the optimizer execution path.
SET AUTOTRACE ON STATISTICS – Shows only the SQL statement execution statistics.
SET AUTOTRACE ON – Shows both the optimizer execution path and the SQL statement execution statistics.
SET AUTOTRACE TRACEONLY – Similar to “SET AUTOTRACE ON”, but suppresses the printing of the user’s query output. Great for checking execution times for queries without looking at the query output.

You can use the following snippet of code to setup autotrace in SQL*Plus:

col PLAN_PLUS_EXP            for a122
set lines 500
set autot trace exp
set time on timing on

Posted by Charles Kim, Oracle ACE