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    :-)