Unsolved

1 Rookie

 • 

7 Posts

840

July 9th, 2020 14:00

Too many save sets

One of my larger AIX DB servers running RMAN backups for Oracle is creating over 3400 save sets daily when performing a backup. There is a recurring size of 257KB for many of the save sets. I currently have 1.8 million save sets going back 3 years on my system. I cannot view more a few days of these with the java GUI as it runs out of memory and just hangs. This cannot be an efficient use of resources. Is this a configuration error?

4 Operator

 • 

1.3K Posts

July 9th, 2020 20:00

@DonAIX, Can you share your RMAN script with us ?

1 Rookie

 • 

7 Posts

July 10th, 2020 07:00

This is the daily archive script.

#!/usr/bin/sh
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/local/bin
export PATH
umask 022

TODAY=`date +%Y%m%d.%H:%M:%S`
export AIXTHREAD_SCOPE=S
export ORACLE_HOME=/maksyp1/oracle/product/db/11.2.0.4
export GRID_HOME=/grid12c/12.1.0.2/grid
export ORA_CRS_HOME=/grid12c/12.1.0.2/grid
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORA_CRS_HOME/bin:~oracle:~grid:$PATH
export ORACLE_SID=MAKSYP1
export INSTANCE_NAME=MAKSYP11

export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS'

export HOSTNAME=`hostname`
export backup_type="ARCH"

echo ${ORACLE_SID} | tr '[:upper:]' '[:lower:]' | read LSID
export LSID
echo ${ORACLE_SID} | tr '[:lower:]' '[:upper:]' | read USID
export USID

if [[ -d $ORACLE_HOME/admin/${LSID} ]]; then
export logdir=$ORACLE_HOME/admin/${LSID}/logs
elif [[ -d $ORACLE_HOME/admin/${LSID}"1" ]]; then
export logdir=$ORACLE_HOME/admin/${LSID}"1"/logs
elif [[ -d $ORACLE_HOME/admin/${USID} ]]; then
export logdir=$ORACLE_HOME/admin/${USID}/logs
elif [[ -d $ORACLE_HOME/admin/${USID}"1" ]]; then
export logdir=$ORACLE_HOME/admin/${USID}"1"/logs
fi

#if [[ -d $ORACLE_HOME/admin/${LSID} ]]; then
# export logdir=$ORACLE_HOME/admin/${LSID}/logs
#elif [[ -d $ORACLE_HOME/admin/${USID} ]]; then
# export logdir=$ORACLE_HOME/admin/${USID}/logs
#fi

export logfile=${logdir}/${LSID}_${backup_type}_backup.${TODAY}.log
export tmpfile=${logdir}/${LSID}_${backup_type}_backup.${TODAY}.log.tmp

export DBA_MAIL_LIST="donald.davis@xxxxxxxx.com,"

export ORACLE_SID=`echo $INSTANCE_NAME`

function msg_start {(
echo "###########################################################################"
echo "Start oracle ARCHIVE Backup process for database ${ORACLE_SID}"
echo "`date`"
echo "###########################################################################"
echo "ORACLE_SID: ${ORACLE_SID}"
echo "ORACLE_HOME: ${ORACLE_HOME}"
echo "Backup Start Time: `date +%Y%m%d.%H:%M:%S`"
) >> ${logfile}
}

function msg_end {(
echo "Backup End Time: `date +%Y%m%d.%H:%M:%S`"
echo "###########################################################################"
echo "Completed oracle ARCHIVE Backup process for database ${ORACLE_SID}"
echo "###########################################################################"
) >> ${logfile}
}

function msg_end1 {(
egrep -v 'ORA-00258' ${logfile} | egrep 'ORA-|RMAN-'

if [[ $? -eq 1 ]]; then
echo "Backup End Time: `date +%Y%m%d.%H:%M:%S`"
echo "###########################################################################"
echo "Completed Successfully ARCHIVE Backup process for database ${ORACLE_SID}"
echo "###########################################################################"
else
echo "Backup End Time: `date +%Y%m%d.%H:%M:%S`"
echo "###########################################################################"
echo "Completed With Errors ARCHIVE Backup process for database ${ORACLE_SID}"
echo "###########################################################################"
fi
) >> ${logfile}
}

function rman_calling {(

rman << ARCH
connect target /
connect catalog rman_nonprod/Rm9_D3vD@RMANREP1

run {
allocate channel C1 device type SBT parms "SBT_PARMS=(NSR_MMDB_RETRY_TIME=30,NSR_MAX_START_RETRIES=100)";
allocate channel C2 device type SBT parms "SBT_PARMS=(NSR_MMDB_RETRY_TIME=30,NSR_MAX_START_RETRIES=100)";
allocate channel C3 device type SBT parms "SBT_PARMS=(NSR_MMDB_RETRY_TIME=30,NSR_MAX_START_RETRIES=100)";
allocate channel C4 device type SBT parms "SBT_PARMS=(NSR_MMDB_RETRY_TIME=30,NSR_MAX_START_RETRIES=100)";
allocate channel C5 device type SBT parms "SBT_PARMS=(NSR_MMDB_RETRY_TIME=30,NSR_MAX_START_RETRIES=100)";
allocate channel C6 device type SBT parms "SBT_PARMS=(NSR_MMDB_RETRY_TIME=30,NSR_MAX_START_RETRIES=100)";
send 'NSR_ENV=(NSR_SERVER=corp-nw.corp.local,NSR_CLIENT=rcodbschi037.xxxxxxxx.net,NSR_DATA_VOLUME_POOL=ddprimaryFileSystem)';

backup filesperset 20 format 'ARCH_%d_%t.%s.%p.`date +%Y%m%d.%H:%M:%S`.arch.bk' tag 'ARCH-${TODAY}' archivelog from time 'sysdate-7' not backed up 1 times;

DELETE force noprompt archivelog until time 'sysdate-5' backed up 1 times to device type sbt;

backup current controlfile format 'ARCH_%d_%t.%s.%p.`date +%Y%m%d.%H:%M:%S`.ctl.bk' tag 'ARCH-${TODAY}';

release channel C1;
release channel C2;
release channel C3;
release channel C4;
release channel C5;
release channel C6;
}
ARCH

) >> ${logfile}
}

#==================================================================================================#
#**************************** MAIN SECTION OF SCRIPT ********************************************* #
#==================================================================================================#

msg_start
rman_calling
msg_end1

#######################################################################################################
#Clean up
#######################################################################################################
find ${logdir} -name "*log*" -mtime +61 -exec rm -f {} \;


#######################################################################################################
#Error Checking
#######################################################################################################
egrep -v 'ORA-00258' ${logfile} | egrep 'ORA-|RMAN-' > ${tmpfile}

if [[ $? -eq 0 ]]
then
mailx -s "BACKUP ERROR: ${backup_type} Backup for ${ORACLE_SID} Failed on ${TODAY} " ${DBA_MAIL_LIST} < ${tmpfile}
exit 12
fi

rm ${tmpfile}
exit 0

 

1 Rookie

 • 

7 Posts

July 10th, 2020 08:00

I am also seeing this in some of my scripts on this server..

backup incremental level 0 tag 'LVL0-${TODAY}' database filesperset 1 format 'FULL_%d_%t.%s.%p.${TODAY}.bk';

Is the filesperset my issue?

4 Operator

 • 

1.3K Posts

July 12th, 2020 07:00

@DonAIX, the fileperset is set to 1 for full backup for a better restore performance. Can you check if you have this parameter - MAXSETSIZE set in RMAN outside this script ?

No Events found!

Top