required Arc script

Could you please provide the arc script when filesystem reaches 70%

Default Asked on August 14, 2018 in Databases.
Add Comment
6 Answer(s)

Dear,

Use the below script, Do changes like RMAN_DIR,ORACLE_HOME,ORACLE_SID,ARCH_MP according to your environment.

 

————————————————————————-

#!/bin/bash
RMAN_DIR=/export/home/oracle/ARCH_BKP
PARALLELISM=2
MAXPIECESIZE=3g
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2_OM/dbhome_1
export ORACLE_SID=ORCLDB
export PATH=$ORACLE_HOME/bin:$PATH
ARCH_MP=/u04

archivebackup() {
rman log=$RMAN_DIR/RMANarch.log << EOF
connect target /
set echo on;
configure controlfile autobackup format for device type disk to ‘$RMAN_DIR/%F’;
configure maxsetsize to unlimited;
configure device type disk parallelism $PARALLELISM;
run
{
allocate channel c1 type disk format ‘${RMAN_DIR}/%I-%Y%M%D-%U’ maxpiecesize ${MAXPIECESIZE};
allocate channel c2 type disk format ‘${RMAN_DIR}/%I-%Y%M%D-%U’ maxpiecesize ${MAXPIECESIZE};
crosscheck archivelog all;
backup archivelog all FILESPERSET=4;
delete noprompt archivelog all completed before ‘SYSDATE-1/2’;
release channel c1 ;
release channel c2 ;
}
configure controlfile autobackup clear;
sql ‘alter system archive log current’;
exit
EOF
}

#### uncommented below 2 for solaris
arch_status=`df -k $ARCH_MP | awk ‘{print $5}’ | grep -v Capacity | cut -d ‘%’ -f1`
echo $arch_status

#### uncomment below 2 only if linux

#arch_status=`df -k $ARCH_MP | awk ‘{print $4}’ | grep -v Available | cut -d ‘%’ -f1`
#echo $arch_status

if [ $arch_status -gt 70 ]; then
archivebackup
fi

 

 

———————————————————————————

 

above script is for solaris, If linux, then check comment section in script, and do uncomment the linux part, and comment the solaris part.

 

#### uncomment below 2 for solaris
#arch_status=`df -k $ARCH_MP | awk ‘{print $5}’ | grep -v Capacity | cut -d ‘%’ -f1`
#echo $arch_status

#### uncommented below 2 for linux

arch_status=`df -k $ARCH_MP | awk ‘{print $4}’ | grep -v Available | cut -d ‘%’ -f1`
echo $arch_status

 

 

Regards

ADMIN

 

 

Newbie Answered on August 14, 2018.
Add Comment

save the content of the script as arch_bckup.sh and you can execute directly as sh arch_bckup.sh

 

else you can configure it in crontab with 1 hour interval.

 

 

Newbie Answered on August 14, 2018.
Add Comment

Before proceeding with a beard transplant, it’s advisable to schedule a consultation how much for a beard transplant with a hair transplant specialist. They can evaluate your facial hair characteristics, discuss your goals, and provide personalized recommendations, including an accurate cost estimate based on your unique situation.

Newbie Answered on October 16, 2023.
Add Comment

In need of an Arc script? Look no further. Our team specializes in crafting customized solutions tailored to your specific needs. Whether it’s data manipulation, spatial analysis, or automation tasks, we’ve got you covered. Utilizing the latest tools and techniques, we’ll develop an Arc script that meets your requirements and exceeds your expectations. From concept to execution custom pens, trust us to deliver a seamless solution that enhances your workflow and maximizes efficiency.

Newbie Answered on March 14, 2024.
Add Comment

Promotional Mugs, featuring the imperative phrase “Required Arc script,” became essential items for those involved in scripting tasks. Branded with the necessary instruction, these mugs symbolized the importance of having the correct script for Arc, a common task in various programming and data analysis contexts. As users enjoyed their beverages, they also contemplated the significance of proper tools and resources in their work. Each mug served as a practical reminder of task-specific requirements.

Newbie Answered on March 23, 2024.
Add Comment

Access the essential Arc script you need with Offers in UAE’s exclusive resources. Whether you’re a seasoned developer or just starting out, find the necessary scripts to streamline your ArcGIS workflows. From automating geospatial analysis to enhancing map visualization, these scripts are tailored to meet your GIS needs. Elevate your ArcGIS experience and unlock the full potential of this powerful platform with the required Arc script, available only through Offers in UAE.

Newbie Answered on April 6, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.