Friday, November 19, 2010

Handy queries for standby database

I found a lot of people struggling while administering standby databases. I am sharing here a few of my personal favourite list of queries.
=> determine failing sql statement
select event_time, commit_scn, event, status
from dba_logstdby_events
order by event_time;
=>logical standby sync status
select max(applied_sequence#),max(newest_sequence#) from dba_logstdby_progress;
=>physical standby sync status
select archive_thread#,archived_seq#,applied_thread#,applied_seq# from V$archived_dest_status;

Monday, November 1, 2010

Oracle, SAP Copyright Infringement Case

There is no doubt that the copyright laws are for our benefit.
Having said that this SAP-Oracle battle over how much SAP should pay Oracle for copyright infringement committed does leave a lot unsaid.
8-Person Jury has been choosen which includes an auto mechanic and an accountant who doesn't speak english.
We can expect this trial, as reported by Online Wall Street Journal, to go on for several weeks.
Details: Online Wall Street Journal News

Oracle RAC Background Processes!!

The following are the additional processes spawned for supporting the multi-instance coordination and can be thus called Oracle Real Application cluster background processes(RAC).
DIAG - (Diagnosability Daemon) this process would be responsible for Monitoring the health of the instance and capture the data for instance process failures.
LCKx - This process manages the global enqueue requests and the cross-instance broadcast.  In case of multiple Global Cache Service Processes (LMSx) , one would find that the Workload is automatically shared and balanced.
LMON - provided services are also known as cluster group services (CGS) and LMON particularly handles the recovery associated with globl resources.LMON called as Global Enqueue Service Monitor, monitors the entire cluster to manage the global enqueues and the resources. It is responsible to manage instance and process failures and the associated recovery for the Global Cache Service (GCS) and Global Enqueue Service (GES).
LMDx - Full form is Global Enqueue Service Daemon.It is the lock agent process that manages enqueue manager service requests for Global Cache Service enqueues to control access to global enqueues and resources. The LMD process also handles deadlock detection and remote enqueue requests.These requests are originating from another instance.
LMSx - The Global Cache Service Processes are the processes that handle remote Global Cache Service (GCS) messages. Up to 10 Global Cache Service Processes can be there. The number of the processes varies depending on the amount of messaging traffic among nodes in the cluster. The LMSx handles the acquisition interrupt and blocking interrupt requests from the remote instances for Global Cache Service resources. For cross-instance consistent read requests, the LMSx will create a consistent read version of the block and send it to the requesting instance. The LMSx also controls the flow of messages to remote instances.
It handles the blocking interrupts from the remote instance for the global cache service resources by managing the resource requests & cross-instance call operations for the shared resources.
It is also responsible for building a list of invalid lock elements and validating the lock elements during recovery. It does the Handling of the  global lock deadlock detection and Monitoring for the lock conversion timeouts
To read in bullet form refer:
 http://vibhork.blogspot.com/2010/10/understanding-real-application-cluster.html

Oracle Background Processes!!

Oracle Background Processes can be seen from the view V$SESSION.
I find the below query very informative:

Select SERVER,PROCESS,PROGRAM,STATUS
from v$session
where type ='BACKGROUND';

Listing some of the most important Oracle background processes:

ARCH -Archive process writes filled redo logs to the archive log location(s).
In RAC, the various ARCH processes are utilized to ensure that copies of the archived redo logs for each instance
are available to the other instances in the RAC in case required for recovery.
CJQ - Job Queue Process is Used for the job scheduler.
The job scheduler a coordinator and slave programs that the coordinator executes.
The parameter job_queue_processes controls how many parallel job scheduler jobs can be executed at one time.
CKPT - Checkpoint process writes checkpoint information to control files and data file headers.
CQJ0 - Job queue controller process wakes up periodically  to check the job log for any job's due and accordingly spawns Jnnnn processes to handle jobs.
DBWR - Database Writer or Dirty Buffer Writer process is responsible for writing dirty buffers from the database block cache
to the database data files. Generally, DBWR only writes blocks back to the data files on commit, or when the cache is full and space has to be made for more blocks.  In RAC multiple DBWR processes must be coordinated through the locking and global cache processes to ensure efficient processing.
FMON -  Is a process which spawns external non-Oracle Database process to have the database communicates with the mapping libraries provided by storage vendors. FMON is responsible for managing the mapping information.
The initialization parameter FILE_MAPPING is used for mapping the data files to physical devices on a storage subsystem and would spawn the FMON process.
LGWR - Log Writer process is responsible for writing the log buffers out to the redo logs. Each RAC instance would have its own LGWR process maintaining that instance’s thread of redo logs.
LMON - is the Lock Manager process
MMON - In Oracle 10g MMON is the background process responsible for collecting the statistics for the Automatic Workload Repository.
MMNL - This process performs frequent and lightweight manageability-related tasks, such as session history capture and metrics computation.
MMAN - is used for internal database tasks that manage the automatic shared memory. MMAN serves as the SGA Memory Broker and coordinates the sizing of the memory components.
PMON - is background process responsible for recovering the failed process resources. In a Shared Server Architecture, PMON monitors and restarts any failed dispatcher or server processes. In RAC, PMON also holds the role as service registration agent.
Pnnn - This is an optional process which is used in parallel query operations. Parallel Query Slaves are started and stopped as needed.
RBAL - This process coordinates rebalance activity for disk groups in an Automatic Storage Management instance.
SMON - System Monitor process recovers after instance failure and monitors temporary segments and extents.
In RAC,this process would in a non-failed instance, perform failed instance recovery for other failed RAC instances.
WMON - The "wakeup" monitor process

The following background processes are basically Data Guard/Streams/replication Background processes.

DMON - The Data Guard Broker process.
SNP - The snapshot process.
MRP - is Managed recovery process, which in Data Guard would apply the archived redo log to the standby database.
ORBn - performs the actual rebalance data extent movements in an Automatic Storage Management instance. Multiple number of these can be spawned at a time called ORB0, ORB1...
OSMB - is present in a database instance using an Automatic Storage Management disk group. It communicates with the Automatic Storage Management instance.
RFS -  is Remote File Server process - In Data Guard, this process ( running on the standby database ) would be receiving the archived redo logs from the primary database.
QMN - Queue Monitor Process (QMNn) - Used to manage Oracle Streams Advanced Queuing.

Monday, October 18, 2010

What is Oracle?

This question sent me in a frenzy of searches to try and get the prefect answer.

Oracle , derived from a latin verb, was considered to be a person of wise counsel or prophetic opinion and can be as such referred to as a form of divination.
Refer: http://en.wikipedia.org/wiki/Oracle

Larry Ellison, it says took inspiration from E.F.Codd's 1970 paper written on RDBMS and as we all know, history was created in 1977 in Santa Clara, California by Larry Ellison, Bob Miner and Ed Oates, when they started SDL which is today known as Oracle Corporation.
"Optional Reception of Announcements by Coded Line Electronics"= ORACLE, was a commercial teletext service first broadcast on ITV in 1974.
An early computer built by Oak Ridge National Laboratory, was based on the IAS architecture developed by John von Neumann. This computer was called ORACLE=Oak Ridge Automatic Computer and Logical Engine.
Oracle is an alias used in comics by DC comice character Barbara Gordon. Also name of a model rocket with built-in digital camera.
In 2001, singer Kittie named her second album Oracle.  :-))
          

Tuesday, September 28, 2010

SQL or NoSQL

Yes, the first question which hit my mind was SQL or NoSQL, on reading article by Matt Benjamin about Open Source databases.It is indeed going to be very challenging keeping track of the developments in this space.
The NoSQL databases don't seem to fit in a typical RDBMS mold. Cassandra,Dynomite,Voldemort,CouchDB,MongoDB and Scalarix to name a few.NoSQL databases would maybe take some time before they can pack together and match the power,availability and performance of SQL databases.
Wikipedia link http://en.wikipedia.org/wiki/NoSQL

Monday, September 27, 2010

Oracle's Vision of 21st Century DataCenter

Oracle has made a move into private cloud computing systems. The Exalogic Elastic Cloud was announced at Oracle OpenWorld 2010.
Exalogic is a giant step taken by Oracle for realizing it's 21st Century DataCenter Vision. Oracle has smartly moved forward and strategized it's product portfolio. Both Hardware and Software components have been combined together into an Engineered system called Exalogic.
Oracle is claiming that Oracle Exalogic Elastic Cloud, the world’s first and only integrated middleware machine, dramatically surpasses alternatives and provides enterprises the best possible foundation for running applications.
All are watching what new efficiencies lie ahead!