Wednesday, June 22, 2011

Useful Command in RMAN

List Command :

1)RMAN> list backup;
List all your backup sets.
***************
2)RMAN>LIST BACKUPSET;
Lists only backup sets and proxy copies.
***************
3)RMAN>LIST COPY;
Lists of Image copies and Archive Logs.
***************
4)RMAN>LIST EXPIRED BACKUP;
Backups did not found after crosscheck. That is backup is manually moved or deleted from OS.
***************
5)RMAN>LIST BACKUP BY FILE;
List backup by Datafile, controlfile, spfile.
***************
6)RMAN>LIST BACKUP SUMMARY;
Lists backup sets, proxy copies, and disk copies.
***************
7)RMAN>LIST BACKUP OF DATABASE;
LIST BACKUP LIKE '/tmp/%'; list backup of datafile 1; LIST ARCHIVELOG ALL BACKED UP 2 TIMES TO DEVICE TYPE sbt;LIST COPY OF DATAFILE 2 COMPLETED BETWEEN '17-MAR-2008' AND '22-MAR-2008'; are also available.
***************
8) RMAN>LIST INCARNATION;
LIST INCARNATION OF DATABASE; to see the incarnations of your database.

Report Command:

RMAN REPORT command analyzes the available backups and return results about while files need backup which files are obsolete etc.


1)REPORT NEED BACKUP;
Determine which database files need backup under a specific retention policy.
***************
2)REPORT UNRECOVERABLE;
Report which database files require backup because they have been affected by some NOLOGGING operation.
***************
3)REPORT SCHEMA;
Lists and displays information about the database files.
***************
4)REPORT OBSOLETE;
REPORT OBSOLETE displays the backups that are obsolete according to the current retention policy.
***************
5)REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE SKIP TABLESPACE data01;
If you use Recovery Catalog then past data can be shown.Like, REPORT SCHEMA AT TIME 'SYSDATE-10';
***************


Delete Command:

Delete commands is used to delete any backup or backupsets.

1)RMAN> delete backupset all;
Delete all your backup sets
***************
2) RMAN> delete copy all;
Delete all image copies.
***************
3) RMAN>DELETE OBSOLETE;
Delete obsolete Backups.
***************


thank you all .

ORA-00060 RUNNING BACKUPS FOR 2 DATABASES USING SAME CATALOG

hi All ,


All of us using backup techniques maybe it will be different but the aim is one , saving your data
some error could be appear while you doing backup but everything can be solved one of this errors
deadlock error

but what is this mean ?

deadlock : situation where in two or more competing actions are each waiting for the other to finish

so when you have two backup not necessary backup btw it could be session , backup-1 will wait backup-2 and vice verse ...

In rman backup its Bug 6830296 accroding to meta-link ID 779095.1



Solution is :

In Rman catalog database create the following indexes :-


CREATE INDEX tfatt_i_sck on tfatt(start_ckp_key)
CREATE INDEX tfatt_i_eck on tfatt(end_ckp_key)

Or

Check for availability of one off patch using the following link Patch 6830296



thank you all

Saturday, June 11, 2011

Check Rac Status

hi All Again ,


As Oracle Database administrator its your job to check rac status on your server, i know its little creepy when we heard about RAC,DG but its all about the command and how , when to use it ? !!!

Sure you need to be careful when you are using commands such as "crs , Srvtl" and stuff like that .

I will make it easy for you save this command in the notepad (you can find in the end of this article)
so everytime you need to check RAC status and you need to do is choose your command :

Let start


*To check RAC STATUS ON OS :
Use :
crs_stat -t

*Check Node Availability :
Status nodeapps -n

*Check your ASM :
srvctl status asm -n

ok but i need to check database status how ?
*for Database status :
srvctl status database -d esxrac

And what about service for this database is it work fineeeeee :
* Database Services :
srvctl status service -d esxrac


And Finally
* Cluster Status :
crsctl check crs


As we see its all about command if you how to use it RAC will be easy otherwise don't use it if you don't know anything about it because it maybe destroy everything . BE CAREFUL


Where you Go its not the end , i need to check RAC inside the Database (SQL) :
lets Begin :)

I need to check Rac Instance if it works fine in normal database we use v$instance
here in rac just add gv$instance .
** select instance_name, host_name, archiver, thread#, status
from gv$instance
;

What About datafiles :
**select file_name, bytes/1024/1024 from dba_data_files ;

Getting the status of all the groups, type, membership :
**select group#, type, member, is_recovery_dest_file from v$logfile order by group#


But , Wait what about ASM we need to check it too :
To check ASM Disk :
**select group_number, name,allocation_unit_size alloc_unit_size,state,type,total_mb,usable_file_mb
from v$asm_diskgroup;

Information About ASM instance :
select group_number, file_number, bytes/1024/1024/1024 GB, type, striped, modification_date from v$asm_file
where TYPE != 'ARCHIVELOG'


Thank You very Much , just Bookmark my blog all i keep post everything useful for DBA's

And you can Download notepad from HERE