Wednesday, August 10, 2011

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


Friday, August 5, 2011

Does the Optimizer need a hint?

Today I have gone through a very useful post regarding the use of the hints in Oracle.Though there are lots of articles on the internet but Oracle Corporation has not documented the vast majority of hints.Here i am providing the link of Jonathan Lewis blog who is one of the Master in the Oracle Tunning .

http://jonathanlewis.wordpress.com/2008/05/02/rules-for-hinting/

I’ve written a number of notes about hinting in fact, by using at the “Select Category” list to the right, I see that I have (so far) tagged 26 different articles (and this will be the 27th) with the hints tag. So I’ve decided it was time that I made clear my basic guidelines on safe hinting, as follows:

1.) Don’t
2.) If you must use hints, then assume you’ve used them incorrectly.
3.) On every patch or upgrade to Oracle, assume every piece of hinted SQL is going to do the wrong thing. Because of (2) above; you’ve been lucky so far, but the patch/upgrade lets you discover your mistake.
4.) Every time you apply some DDL to an object that appears in a piece of hinted SQL assume that the hinted SQL is going to do the wrong thing. Because of (2) above; you’ve been lucky so far, but the structural change lets you discover your mistake.

You will appreciate from these guidelines that I don’t really approve of using hints. The only reason that I leave them in place on a production system is when I’m sure that there is no alternative safe mechanism for making the optimizer do what I want. (And that does mean that I will use hints sometimes on a production system.)

What I use them for on test systems is to check whether a particular execution plan is actually possible, and to track down bugs in the optimizer.

Finally, for the purposes of education, I use them to demonstrate execution plans without first having to craft data sets and set database parameters to make a plan appear ‘spontaneously’.

Always be cautious about adding hints to production systems.

For More References click below hints  : 


Enjoy     :-)