Thursday, August 11, 2011

what is VSS Writer in Oracle ??

We often see the VSS services in Window  Server . It seems that this service has nothing to do with window because it is created by Oracle but not such .I have tried to cover topic and mention few links which will help us to understand this topic. 

What is VSS ?
VSS is an infrastructure on Windows server platforms that enables applications to create shadow copies. A shadow copy is a consistent snapshot of the data held on a volume or component at a well-defined point in time.  VSS provides a Windows-specific interface that enables coordination between requestors that back up data, writers that update data on disk, and providers that manage storage . Oracle Database functions as a writer that is integrated with VSS-enabled applications.

We  can  use  VSS-enabled  software  and  storage  systems  on  Windows  to  back   up  and  restore  an Oracle  database. A  key  benefit  is  the  ability to use a VSS-enabled application to make an online backup of the whole database .


How Oracle VSS works for Database Backup and RecoveryOracle ?
VSS  is  installed  automatically wit h file . If   the  database   is   in  ARCHIVELOG  mode , then  an    online  backup  can  be  taken  else only  a  closed  backup is  possible. VSS  is  a  service  on  Windows operating system to create shadow copies. This coordinates the activities of the fundamental   services  of requestors,  providers,  and  writers  in  the  creation  and use of shadow copies. The benefit of  an Oracle VSS service is that it coordinates an Oracle database instance and  other  VSS  services .A VSS  requestor requests VSS service to create  shadow copies.  A VSS provider manages  storage  volumes  and creates shadow copies. A VSS writer writes data to disk. In  a recovery  situation select  the database component and restore it. Later open the database in read  only  mode  with resetlogs option.  To restore few components of the database, select them and restore them  individually.


References :  http://blogs.technet.com/b/josebda/archive/2007/10/10/the-basics-of-the-volume-shadow-copy-service-vss.aspx
http://www.sswug.org/articles/viewarticle.aspx?id=44664




Enjoy     :-) 

Wednesday, August 10, 2011

Check RMAN Backup Status

There is a very good script shared by one of the famous DBA "Gavin Soorma" on his site whic is related to Rman Backup status .I am sharing the same script here . Here is the link :


http://gavinsoorma.com/2009/07/rman-script-to-check-backups/comment-page-1/
This script will report on all backups – full, incremental and archivelog backups .


SQL> select   SESSION_KEY  ,  INPUT_TYPE, STATUS , 
   to_char(START_TIME,'mm/dd/yy hh24:mi')   start_time , 
   to_char(END_TIME,'mm/dd/yy hh24:mi')   end_time  , 
   elapsed_seconds/3600  hrs
   from V$RMAN_BACKUP_JOB_DETAILS  order by session_key ;


This script will report all on full and incremental backups, not archivelog backups -
SQL> select SESSION_KEY, INPUT_TYPE, STATUS , 
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs 
from V$RMAN_BACKUP_JOB_DETAILS
where input_type='DB INCR' 
order by session_key ;




Enjoy    :-)

How To Identify Database Idle Sessions


The below scripts will identify the Database Idle Session .When on firing the below the scripts, it will prompt for the number of minutes the session is idle for.
 
SQL> select 
sid, username, status,
 to_char(logon_time,’dd-mm-yy hh:mi:ss’) “LOGON”,
floor(last_call_et/3600)||’:'||  floor(mod(last_call_et,3600)/60)||’:'||
mod(mod(last_call_et,3600),60) “IDLE”,
program
from   v$session
where  type=’USER’
and   (LAST_CALL_ET / 60) > &minutes
order by last_call_et;

Enjoy    :-) 

Difference Between OBSOLETE AND EXPIRED Backup


RMAN considers backups of datafiles and control files as obsolete, that is, no longer needed for recovery, according to criteria that we specify in the CONFIGURE command. We can then use the REPORT OBSOLETE  command to view obsolete files and DELETE OBSOLETE to delete them .
For ex  :  we set our retention policy to redundancy 2. this means we always want to keep at least 2 backup, after 2 backup, if we take an another backup oldest one become obsolete because there is 3 backup and we want to keep 2. if our flash recovery area is full then obsolete backups can be overwrite.

A status of "expired" means that the backup piece or backup set is not found in the backup destination or missing .Since backup info is hold in our controlfile and catalog . Our controlfile thinks that there is a backup under a directory with a name but someone delete this file from operating system. We can run crosscheck command to check if these files are exist and if rman found a file is missing then mark that backup record as expired which means is no more exists.


Enjoy   :-) 

Monday, August 8, 2011

Daily Tasks Of A Database Administrator


The Database Administrator is one of the most difficult and critical positions to fill and retain. DBAs must be able to react, communicate, and plan across many different business functions.  Here we will find a set of common tasks needed to be performed daily by any DBA. The tasks are as below  

  1.) Regular Monitoring of The free space in Database.
  2.) Verify instance status
  3.) Check alerts logs, Trace files and Listener Logs
  4.) Check configured metrics
  5.) Tablespace Usage
  6.) Check RMAN backups
  7.) Check users User sessions
  8.) Check memory usage
  9.) Check network load
10.) Object modifications
11.) Check User sessions
12.) Redo log status
13.) Analyzing the performance of theDatabase
14.) Checking the long running queries on the database
15.) Monitoring the Top SQL Statements
16.) Monitoring Sessions
17.) Monitoring System Statistics
18.) Are the Oracle Names and LDAP Servers up and responding to requests.
19.) Check to ensure that no objects exist in the database with the status ‘INVALID’


Enjoy    :-)