Posts

Showing posts from January, 2023

FRA Usage and Administration

Image
 In Oracle database, the Flash Recovery Area or FRA is a location on disk where the database can create and manage several kinds of backup and recovery-related files. Main file types are archivelog, flashback log, backups, as well as mirrors for your control files and redo log files. All files in the FRA are Oracle-managed files. Using a Flash Recovery Area simplifies the administration of your database by automatically retaining them for as long as they are needed for restore and recovery activities, and deleting them when they are no longer needed, because the space is needed for another backup and recovery-related purpose. Checking the current usage  You can check the configuration by looking at two parameters.The parameters are db_receovery_file_dest and second one db_recovery_file_dest_size .  db_receovery_file_dest point to location where the files will be located in Server . FOr normal single Databases this will be any directory for RAC this will be set to a Diskgroup whi

RMAN Restoration Procedure

 The Process describes the DB cloning using RMAN backup of Source Database . Step 1 : Crete a Pfile for Target database (mqtest) If the Database is being dropped , retain the spfile of existing database . Step 2 : Copy Password file from Source to target Server . Password file will be in location $ORACLE_HOME/dbs Password file name will be in format orapwORACLE_SID copy the password file from Sorce server to target Server and rename the file to target DB name Step 3 : Startup the database is Nomount State using Pfile (This step can be skipped if SPfile is already Availble ) SQL > start nomount pfile='$ORACLE_HOME/dbs/initmqtest.ora' ; SQL > create spfile from pfile='$ORACLE_HOME/dbs/initmqtest.ora' ; SQL > Shut immediaate ; Step4: Startup DB again in Nomount stage and verify if DB is in Archivelog mode set lines 550 pages 550 alter session set nls_date_format='DD_MM_YY HH24:MI' ; col db_unique_name for a20 col instance_name for a20 Col startup_time for

Rman Backup Status and Type of Backups

Below Sql generates the Size of backup and Time taken to Completed the backup .  SELECT TO_CHAR(completion_time, 'YYYY-MON-DD') completion_time, type, round(sum(bytes)/1048576) MB, round(sum(elapsed_seconds)/60) min   FROM   ( SELECT  CASE     WHEN s.backup_type='L' THEN 'ARCHIVELOG'     WHEN s.controlfile_included='YES' THEN 'CONTROLFILE'     WHEN s.backup_type='D' AND s.incremental_level=0 THEN 'LEVEL0'     WHEN s.backup_type='I' AND s.incremental_level=1 THEN 'LEVEL1'     END type, TRUNC(s.completion_time) completion_time, p.bytes, s.elapsed_seconds     FROM v$backup_piece p, v$backup_set s     WHERE p.status='A' AND p.recid=s.recid     UNION ALL     SELECT 'DATAFILECOPY' type, TRUNC(completion_time), output_bytes, 0 elapsed_seconds FROM v$backup_copy_details) GROUP BY TO_CHAR(completion_time, 'YYYY-MON-DD'), type ORDER BY 1 ASC,2,3 ; col STATUS format a9 col hrs format 999.99 select SESS