Thursday, October 7, 2010

Oracle 11g RAC R2 srvctl commands

Few Oracle 11g RAC R2 srvctl commands:

1.With 11g R2 you can mount the database.This will be very helpful for data guard environments

example :

srvctl start database -d databasename -o mount

2. With 11g R2 its possible to start and stop the listener.

example :

srvctl start listener -l prod_listener

3.With 11g R2 its possible to start multiple service.

example :

srvctl start service -d databasename -s "service1,service_prod"

4. With 11g R2 its possible to start asm diskgroups

example :
srvctl start diskgroup -g "DATA,FRA"

5. With 11g R2 its possible to start RAC asm instance.

example :
srvctl start asm

Oracle 11g Automatic Diagonistic Repository

Oracle 11g Automatic Diagonistic Repository

Automatic Diagnostic Repository (ADR)
ADR is a file-based repository for database diagnostic data such as traces, incident dumps and packages, the alert log, Health Monitor reports, core dumps, and more.


Problems and Incidents:

A problem is a critical error in the database. Problems are tracked in ADR. Each problem is identified by a unique problem ID and has a problem key, which is a set of attributes that describe the problem.

An incident is a single occurrence of a problem. When a problem occurs multiple times, as is often the case, an incident is created for each occurrence.

Automatic Daigonistic Repository Command Line Tool: ADRCI

Few ADRCI commands:

Purge the ADRCI data:

purge -age 10080 -type alert
purge -age 10080 -type incident
purge -age 10080 -type trace
purge -age 10080 -type cdump


Show Commands:
show alert
show base
show home
show homes
show problem
show report
show incident

How to upload diagnostic data to Oracle Support :

First collect the data in an incident package. When you create an incident package, you select one or more problems to add to the incident package.

IPS CREATE PACKAGE INCIDENT:
ips create package incident
example:
ips create package incident 1234132432 in /tmp

IPS CREATE PACKAGE PROBLEM:
ips create package problem

example:
ips create package problem 132432 in /tmp


Trace file location in 11g:

To view the trace files location you can query the database view V$DIAG_INFO
The V$DIAG_INFO view lists all important ADR locations including:
ADR Base: Path of ADR base
ADR Home: Path of ADR home for the current database instance
Diag Trace: Location of the text alert log and background/foreground process trace files
Diag Alert: Location of an XML version of the alert log
Default Trace File: Path to the trace file for your session. SQL Trace files are written here.

Monday, January 25, 2010

11g R2 AWR reports

With oracle 11g R2 AWR reports have lot more information.

--OS related information like CPU's ,CORES,SOCKETS.

Example:
Host CPU (CPUs: 8 Cores: 4 Sockets: 2)

--Memory Statistics details

Example:

Host Mem (MB)
SGA use (MB)
PGA use (MB)
% Host Mem used for SGA+PGA

--Wait Events Statistics new details:

Foreground Wait Class
Foreground Wait Events
Background Wait Evengs
Wait Event Histogram Details