Oracle : Important Queries for RMAN

RMAN Backup Size :  set linesize 300 SET TERMOUT OFF; COLUMN current_instance NEW_VALUE current_instance NOPRINT; SELECT rpad(instance_name, 17) current_instance FROM v$instance; SET TERMOUT ON; PROMPT PROMPT +————————————————————————+ PROMPT | Report : RMAN Status | PROMPT | Instance : &current_instance | PROMPT +————————————————————————+ SET ECHO OFF… Read More

RMAN Full Backup

/u01/app/oracle/DBA/rmanbackup.sh #!/bin/ksh CURRDATETIME=date ‘+%Y%m%d-%H%M%S’a ORACLE_SID=ORCL1;export ORACLE_SID ORACLE_HOME=/u01/app/oracle/product/12.1.0.2;export ORACLE_HOME LOGDIR=/var/opt/oracle/logs LOGFILE=${LOGDIR}/${ORACLE_SID}_rman_${CURRDATETIME}.log RMANBACKUPDIR=/backup/ORCL1/jul16 $ORACLE_HOME/bin/sqlplus dbsnmp/password <<EOF | tee -a $LOGFILE SET LINESIZE 200 COL FILE_NAME FOR A70 SET FEEDBACK OFF SET PAGESIZE 100 COL MEMBER FOR A60 SELECT FILE_NAME,BYTES/1024/1024 MBYTES FROM DBA_DATA_FILES; SELECT FILE_NAME,BYTES/1024/1024 MBYTES FROM DBA_TEMP_FILES;… Read More