Posts

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 b...

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,...

AWS Cheat Sheet

 Extract region of AWS stream from EC2 Instance .  [hostanme]~#aws configure list       Name                    Value             Type    Location       ----                    -----             ----    --------    profile                <not set>             None    None access_key     ********************         iam-role secret_key     **************...

Shell scripting Quick notes for DBA's

To extract Oracle Home location from /etc/oratab : #export ORACLE_HOME=`cat /etc/oratab|grep -v "^#"|cut -d: -f2 -s | grep db | head -1`  => If all DB are of same version #export ORACLE_HOME=`cat /etc/oratab|grep -v "^#"| grep $db|cut -d: -f2 -s | head -1` => If Server has Different Versions of DB and get home Details using SID    ###################find SID's in Servers############# ps -ef | grep "ora_smon"|grep -v grep|awk '{print $8}'|awk -F_ '{print$3}' ps -ef|grep "ora_smon"|awk -F_ '{print$3}'|tail -1 ps -ef|grep "ora_smon"|awk -F '_' '{print$3}'|tail -1   ps -ef|grep smon|egrep -i -v '19|ASM|grep'|awk -F_ '{print $3}' #################list Oracle HOme####################  grep "^$ORACLE_SID:" /etc/oratab|awk -F: '{print$2}' ##############List Oracle Version#####################  grep -i "^$ORACLE_SID:" /etc/oratab | awk -F/ '{print$6...

High Level Steps to Upgrade RAC DB from 12c to 19C

Check active version and Software Version of  Cluster in Pre Upgrade Environment .    crsctl query crs activeversion crsctl query crs softwareversion PRECHECKS :

Huge Pages in Oracle

HugePages is a feature integrated into the Linux kernel from Release 2.6 that allows large SGA memory to be utilized with reduced overhead by ensuring that the memory is not paged to disk. HugePages allows you to use much larger page sizes (for example, 2MB or 4MB) than the default 4K page size, which can be crucial for faster Oracle database performance on Linux, and increasingly so for systems with large RAM and database SGA sizes, as is the case even for small CC deployments.   HugePages results in smaller page tables and less CPU time spent on memory management, increasing the performance of large database instances   One possible drawback of using HugePages is that you cannot use it in conjunction with Automatic Memory Management (AMM); you must use Automatic Shared Memory Management (ASMM) instead. Therefore, before you decide to implement HugePages, you may want to weigh its advantages against any disadvantages of not being able to enable A...