Tuesday, May 22, 2012

Web Logic Server Installation


OS Settings
Setup /etc/hosts
127.0.0.1              localhost.localdomain localhost
10.10.0.135         avntest.inboxbizx.com avntest

Setup /etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmall = 2097152
kernel.msgmax = 8192
kernel.msgmnb = 65535

kernel.shmmni = 4096
kernel.sem = 256 32000 100 142
fs.file-max = 131072
net.ipv4.ip_local_port_range = 10000 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 4194304
kernel.msgmni 2878

Refresh Settings
/sbin/sysctl –p



gedit etc/resolv.conf
options attempts:5
options timeout:15


gedit /etc/security/limits.conf
* hard nofile 65535
* soft nofile 4096
* hard nproc 16384
* soft nproc 2047

[root@avntest ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=avntest.inboxbizx.com

Linux Packages Installation
rpm -Uvh openmotif22-2.2.3-18.x86_64.rpm                                      installed now
rpm -i xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm                   installed now
rpm -q binutils-2.17.50.0.6                                           already installed
rpm -q compat-glibc-2.3.4                                            already installed
rpm -q gcc-4.1.2-                                                              already installed
rpm -q gcc-c++-4.1.2                                                       already installed
rpm -q glibc-2.5-                                                               already installed
rpm -q glibc-common-2.5-                                           already installed
rpm -q glibc-devel-2.5-                                                  already installed
rpm -q libgcc-4.1.2                                                           already installed
rpm -q libstdc++-devel-4.1.2-                                     already installed
rpm -q libstdc++-4.1.2-                                                  already installed
rpm -q make-3.81-                                                          already installed
rpm -q gdbm-1.8.0-                                                         already installed
rpm -q libXp-1.0.0-                                                          already installed
rpm -q libaio-0.3.106-                                                     already installed
rpm -q libgomp-                                                               already installed
rpm -i sysstat-7.0.0-3.el5.x86_64.rpm                     installed now
rpm -q compat-libstdc++-296                                     already installed
rpm -q compat-libstdc++-33                                        already installed
rpm -q elfutils-libelf-devel-                                         already installed
rpm -q elfutils-libelf-devel-static-                             already installed
rpm -i libaio-devel-0.3.106-3.2.x86_64.rpm          installed now
rpm -i unixODBC-2.2.11-7.1.x86_64.rpm                                installed now
rpm -i unixODBC-devel-2.2.11-7.1.x86_64.rpm   installed now
rpm -q kernel-headers-                                                                already installed

Linking and Unlinking
unlink /usr/lib/libXtst.so.6

ln -s /usr/X11R6/lib/libXtst.so.6.1 /usr/lib/libXtst.so.6


Copy libdb.so.2 file supplied with this package to /usr/lib/ directory

Install JDK 1.6
Download it from internet
File name is jdk-6u18-linux-x64-rpm.bin
Go to downloaded file folder
cd /u1/asif/software/jdk/
Make it execute able
chmod +x jdk-6u18-linux-x64-rpm.bin
run it
./ jdk-6u18-linux-x64-rpm.bin
Rename java and javac files from /usr/bin/ folder
And then create the links of new files
·  ln -s /usr/java/jdk1.6.0/bin/java /usr/bin/java
·  ln -s /usr/java/jdk1.6.0/bin/javac /usr/bin/javac
Check the verison of java using following command
java -version


Create a directory and set permissions
mkdir /var/tmp/.oracle
chmod 777 /var/tmp/.oracle

Create groups and users
groupadd oinstall
groupadd dba
useradd –g oinstall –G dba oracle
mkdir /u1/app
chown root:oinstall /u1/app
chmod 775 /u1/app
mkdir /u1/app/oracle
chown oracle:oinstall /u1/app/oracle

go to weblogic software location and execute following command
java –jar wls1034_generic.jar
To setup the environment
cd server/bin
. ./setWLSEnv.sh
After the installation is complete if you want to start QUICKSTART go to following directory,
cd /u1/app/oracle/middleware/wlserver_10.3/common/quickstart
Enter the following command:
./quickstart.sh
Starting Domain configuration wizard
/u1/app/oracle/middleware/wlserver_10.3/common/bin
. ./config.sh


Starting and Stopping Admin and Managed Servers
AdminServer
cd /u1/app/oracle/middleware/user_projects/domains/base_domain/bin
./startWebLogic.sh
./stopWebLogic.sh

Managed Servers
cd /u1/app/oracle/middleware/user_projects/domains/base_domain/bin
./startManagedWebLogic.sh “ms1” http://localhost:7001
./startManagedWebLogic.sh “ms2” http://localhost:7001
./stopManagedWebLogic.sh “ms1”
./stopManagedWebLogic.sh “ms2”


Configuring boot.properties file
Create a directory named security at /u1/app/oracle/middleware/user_projects/domains/base_domain/servers/ms1/security
Create a file name boot.properties in this folder
Add two entries in it
username=weblogic
password=mypassword
Now shutdown and start the managed server


Configure Node Manager


E-Business Suite RMAN based Backup Implementation Strategy




Implemented Backup Strategy
Production Machine
10.10.0.89 – erp.mydomain.com is production server on which Sun Solaris Release 10 Operating System is being used. EBS R12 has been installed in multi user environment. APPDEV is the owner of EBS Application Tier and ORADEV is the owner of Database Tier.

Standby Machine

10.40.0.89 – erp2.mydomain.com is standby server on which Sun Solaris Release 10 Operating System is being used. EBS R12 has been cloned in multi user environment. APPDEV is the owner of EBS Application Tier and ORADEV is the owner of Database Tier. Database is synchronized through Oracle Standby Database Technology and EBS Application is synchronized through Operating System utility named “rsync”. Standby Database is operating in Maximum Availability protection mode and DataGurad Broker is enabled too.
In our EBS R12 environment three types of backups are being performed,
1.       Daily and Hourly RMAN Based Full and Incremental Backups of DEV database
2.       Full Physical Offline Backup of Database and Application tier performed from Monday to Friday
3.       EBS Application Tier Synchronization at Operating System Level through Crontab


RMAN Based Backups

Full online RMAN based backup is performed on daily basis. RMAN is configured in catalog mode, the backup of RMAN schema is also performed using export utility. After execution of backup procedure created backup files are transferred to tape media.
rman target sys/sysdev@devprmy rcvcat rman/rman@devprmy
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'ORA_DF%t_s%s_s%p';
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT   'ORA_DF%t_s%s_s%p' PARMS  'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/development/oradev/snapcf_DEV.f';



Crontab Settings

root@erp.mydomain.com # crontab -l oradev
0 6 * * * /export/home/oradev/devbkp.sh
0 8-6 * * * /export/home/oradev/devarchbkp.sh

Full Backup

RMAN based Full Online Backup is performed at 06:00 a.m. on daily basis.

Incremental Backup

RMAN based Incremental Backup of Archive Log Files is performed on hourly basis.

Backup Script

/export/home/oradev/devbkp.sh
LOG_FILE="DEVBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oradev>>$LOG_FILE
. .profile>>$LOG_FILE
rman target sys/sysdev@devprmy rcvcat rman/rman@devprmy cmdfile devbkpscr.scr msglog devbkplog.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
FILE_CT="DEVBKP_`hostname`_DATA"
echo "Catalog Start Date:`date '+%d%m%y_%H%M'`******************">>$FILE_CT.txt
expdp rman/rman@devprmy DIRECTORY=expdp DUMPFILE=$FILE_CT.dmp LOGFILE=$FILE_CT.log>>$FILE_CT.txt
dsmc selective "/development/oradev/DEV/db/apps_st/data/$FILE_CT.dmp">>$FILE_CT.txt
rm -f /development/oradev/DEV/db/apps_st/data/$FILE_CT.dmp>>$FILE_CT.txt
echo "Catalog End Date:`date '+%d%m%y_%H%M'`******************"
/export/home/oradev/devbkpscr.scr
run
{
allocate channel t1 type 'sbt_tape';
backup database;
backup archivelog all format 'archivelogs_%d_%u_%s_%T' not backed up 2 times;
delete noprompt archivelog all backed up 2 times to device type 'sbt_tape' completed before 'sysdate-3';
release channel t1;
}


/export/home/oradev/devarchbkp.sh
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oradev>>$LOG_FILE
. .profile>>$LOG_FILE
rman target sys/sysdev@devprmy rcvcat rman/rman@devprmy cmdfile devarchbkpscr.scr msglog devarchbkplog.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
FILE_CT="DEVBKP_`hostname`_ARC"
echo "Catalog Start Date:`date '+%d%m%y_%H%M'`******************">>$FILE_CT.txt
expdp rman/rman@devprmy DIRECTORY=expdp DUMPFILE=$FILE_CT.dmp LOGFILE=$FILE_CT.log>>$FILE_CT.txt
dsmc selective "/development/oradev/DEV/db/apps_st/data/$FILE_CT.dmp">>$FILE_CT.txt
rm -f /development/oradev/DEV/db/apps_st/data/$FILE_CT.dmp>>$FILE_CT.txt
echo "Catalog End Date:`date '+%d%m%y_%H%M'`******************">>$FILE_CT.txt
/export/home/oradev/devarchbkpscr.scr
run
{
allocate channel t2 type 'sbt_tape';
backup incremental level 1 database plus archivelog all format 'archivelogs_%d_%u_%s_%T' not backed up 2 times;
release channel t2;
}

Log Files Location

/export/home/oradev/
Backup Locations
Backup sets are directly generated on tape media


Full Physical Offline backup of EBS R12 Application and Database instance on 10.10.0.89 named DEV is performed five days a week from Monday to Friday. This activity script is scheduled to be executed by OS crontab utility. This script shutdown all Application and Database Services, Create TAR file of DEV instance, starts all Application and Database Services, copy generated TAR file to USB, TAPE and keeps two days Backup Files on local machine as well.
Backup times
This activity is starts at 23:00 and completes at 07:15 AM next day.
Crontab Entry
0 23 * * 1,2,3,4,5 /devbkp.sh
Backup scripts
/devbkp.sh
LOG_FILE="DEVBK_`date '+%d%m%y_%H%M'`.txt"
BKORANAME="DEV_BK_ORADEV_`date '+%d%m%y_%H_%M'`.tar"
BKAPPNAME="DEV_BK_APPDEV_`date '+%d%m%y_%H_%M'`.tar"
cd /development/
echo "Apps Services Down: Start*****`date '+%d%m%y_%H%M'`*****">>$LOG_FILE
su appdev -c "/development/appdev/DEV/inst/apps/DEV_erp/admin/scripts/adstpall.sh apps/appsdevadmin098" >>$LOG_FILE
sleep 45
echo "adstpall executed successfully">>$LOG_FILE
echo "******************************">>$LOG_FILE
echo "DB Service Down: Start****">>$LOG_FILE
su oradev -c "/development/oradev/DEV/db/tech_st/11.1.0/appsutil/scripts/DEV_erp/addbctl.sh stop immediate" >>$LOG_FILE
echo "addbctl stop executed successfully">>$LOG_FILE
sleep 60
su oradev -c "/development/oradev/DEV/db/tech_st/11.1.0/appsutil/scripts/DEV_erp/addlnctl.sh stop DEV" >>$LOG_FILE
echo "addlnctl stop executed successfully">>$LOG_FILE
echo "tar creation start `date '+%d%m%y_%H%M'`">>$LOG_FILE
rm /test/devbackup/oldcopy/*
mv /test/devbackup/localcopy/* /test/devbackup/oldcopy/
cd /development/
tar -cvf /test/devbackup/externalcopy/$BKORANAME oradev/
tar -cvf /test/devbackup/externalcopy/$BKAPPNAME appdev/
echo "tar created end `date '+%d%m%y_%H%M'`">>$LOG_FILE
echo "***********************************">>$LOG_FILE
echo "DB Services Startup: Start****">>$LOG_FILE
echo "*********************************">>$LOG_FILE
su oradev -c "/development/oradev/DEV/db/tech_st/11.1.0/appsutil/scripts/DEV_erp/addbctl.sh start" >>$LOG_FILE
echo "addbctl started successfully">>$LOG_FILE
su oradev -c "/development/oradev/DEV/db/tech_st/11.1.0/appsutil/scripts/DEV_erp/addlnctl.sh start DEV" >>$LOG_FILE
sleep 60
echo "addlnctl started successfully">>$LOG_FILE
echo "*****************************">>$LOG_FILE
echo "Apps Services Startup: Start**">>$LOG_FILE
echo "*****************************">>$LOG_FILE
su appdev -c "/development/appdev/DEV/inst/apps/DEV_erp/admin/scripts/adstrtal.sh apps/appsdevadmin098" >>$LOG_FILE
echo "adstrtal started successfully">>$LOG_FILE
mount -F ufs /dev/dsk/c6t0d0s0 /USB-Storage
cp /test/devbackup/externalcopy/* /USB-Storage/devbackup
umount /USB-Storage
echo "tar file transferred to USB `date '+%d%m%y_%H%M'`">>$LOG_FILE
cd /test/devbackup/externalcopy/
dsmc selective * -subdir=yes
cd /development/
echo "tar file transferred to tape `date '+%d%m%y_%H%M'`">>$LOG_FILE
mv /test/devbackup/externalcopy/* /test/devbackup/localcopy/
echo "tar file moved ">>$LOG_FILE
echo "End*****`date '+%d%m%y_%H%M'`*****">>$LOG_FILE

Backup locations

/test/devbackup/externalcopy/
/test/devbackup/localcopy/
/test/devbackup/oldcopy/
/USB-Storage/devbackup/



Operating System Utility named “rsync” is used to synchronize EBS Application Tier between the Primary and Standby Site. Crontab utility is used to execute “rsync” script twice a day, first at 13:00 and then at 22:00.

Script To Be executed

The script executed by “crontab” is,
/export/home/appdev/sncdev.sh
LOG_FILE="DEVAPPS_SYNC_`hostname`_`date '+%d%m%y_%H%M'`.txt"
cd /export/home/appdev
. .profile
echo "**CONC LOG SYNC- Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
rsync -av -e ssh /development/appdev/DEV/inst/apps/DEV_erp/logs/appl/conc/ erp2:/development/appdev/DEV/inst/apps/DEV_erp/logs/appl/conc>>$LOG_FILE
echo " ">>$LOG_FILE
echo "**CONC LOG SYNC-End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
echo " ">>$LOG_FILE
echo " ">>$LOG_FILE
echo "**APPL SYNC- Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
rsync -av -e ssh /development/appdev/DEV/apps/apps_st/appl/ erp2:/development/appdev/DEV/apps/apps_st/appl>>$LOG_FILE
echo " ">>$LOG_FILE
echo "**APPL SYNC-End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
echo " ">>$LOG_FILE
echo " ">>$LOG_FILE
echo "**COMMNTOP SYNC- Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
rsync -av -e ssh /development/appdev/DEV/apps/apps_st/comn/ erp2:/development/appdev/DEV/apps/apps_st/comn>>$LOG_FILE
echo " ">>$LOG_FILE
echo "**COMMNTOP SYNC-End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
echo " ">>$LOG_FILE
echo " ">>$LOG_FILE

Crontab Entry for appdev

The execution scheduling details is,
0 13 * * * /export/home/appdev/sncdev.sh                       (to be executed at 13:00 everyday)
0 22 * * * /export/home/appdev/sncdev.sh                       (to be executed at 22:00 everyday)

Log File Location

                /export/home/appdev/

RMAN Based Backup Implementations in E-Business Suite Environment




crpamc.mydomain.com – 10.10.0.161

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/amc
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/amc/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpamc
$ mkdir /u2/crpamc/archive

$ chown -Rh oraamc:oinstall /u2/crpamc/archive
$ chmod -fR 777 /u2/crpamc/archive

Setting Rights and Mounting Backup location on local crpamc.mydomain.com

chown -Rh oraeme:oinstall /export/home/oraamc/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpamc/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/amc/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/amc/amc_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/amc/snapcf_amc.f';

Scripts to Perform Database Full Backup

/export/home/oraamc/amcbkp.sh
LOG_FILE="AMCBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oraamc>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile amcbkp.scr msglog amcbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/oraamc/amcbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/amc/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh oraamc:oinstall /export/home/oraamc/amcbkp.scr
bash-3.00# chown -Rh oraamc:oinstall /export/home/oraamc/amcbkp.sh

bash-3.00# chmod -fR 777 /export/home/oraamc/amcbkp.scr
bash-3.00# chmod -fR 777 /export/home/oraamc/amcbkp.sh


$  ls –lh rvf*
-rwxrwxrwx   1 oraamc   oinstall     202 May 19 15:58 amcbkp.scr
-rwxrwxrwx   1 oraamc   oinstall     325 May 19 15:55 amcbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e oraamc
0 0 * * 1,2,3,4,5 /export/home/oraamc/amcbkp.sh



crprvf.mydomain.com – 10.10.0.162

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/rvf
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/rvf/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crprvf
$ mkdir /u2/crprvf/archive

$ chown -Rh orarvf:oinstall /u2/crprvf/archive
$ chmod -fR 777 /u2/crprvf/archive

Setting Rights and Mounting Backup location on local crprvf.mydomain.com

chown -Rh oraeme:oinstall /export/home/orarvf/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crprvf/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/rvf/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/rvf/rvf_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/rvf/snapcf_rvf.f';

Scripts to Perform Database Full Backup

/export/home/orarvf/rvfbkp.sh
LOG_FILE="RVFBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/orarvf>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile rvfbkp.scr msglog rvfbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/orarvf/rvfbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/rvf/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh orarvf:oinstall /export/home/orarvf/rvfbkp.scr
bash-3.00# chown -Rh orarvf:oinstall /export/home/orarvf/rvfbkp.sh

bash-3.00# chmod -fR 777 /export/home/orarvf/rvfbkp.scr
bash-3.00# chmod -fR 777 /export/home/orarvf/rvfbkp.sh


$  ls –lh rvf*
-rwxrwxrwx   1 orarvf   oinstall     202 May 19 15:58 rvfbkp.scr
-rwxrwxrwx   1 orarvf   oinstall     325 May 19 15:55 rvfbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e orarvf
0 0 * * 1,2,3,4,5 /export/home/orarvf/rvfbkp.sh


crpsnt.mydomain.com – 10.10.0.163

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/snt
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/snt/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpsnt
$ mkdir /u2/crpsnt/archive

$ chown -Rh orasnt:oinstall /u2/crpsnt/archive
$ chmod -fR 777 /u2/crpsnt/archive

Setting Rights and Mounting Backup location on local crpsnt.mydomain.com

chown -Rh oraeme:oinstall /export/home/orasnt/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpsnt/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/snt/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/snt/snt_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/snt/snapcf_snt.f';

Scripts to Perform Database Full Backup

/export/home/orasnt/sntbkp.sh
LOG_FILE="SNTBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/orasnt>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile sntbkp.scr msglog sntbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/orasnt/sntbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/snt/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh orasnt:oinstall /export/home/orasnt/sntbkp.scr
bash-3.00# chown -Rh orasnt:oinstall /export/home/orasnt/sntbkp.sh

bash-3.00# chmod -fR 777 /export/home/orasnt/sntbkp.scr
bash-3.00# chmod -fR 777 /export/home/orasnt/sntbkp.sh


$  ls –lh snt*
-rwxrwxrwx   1 orasnt   oinstall     202 May 19 15:58 sntbkp.scr
-rwxrwxrwx   1 orasnt   oinstall     325 May 19 15:55 sntbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e orasnt
0 0 * * 1,2,3,4,5 /export/home/orasnt/sntbkp.sh




crpord.mydomain.com – 10.10.0.164

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/ord
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/ord/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpord
$ mkdir /u2/crpord/archive

$ chown -Rh oraord:oinstall /u2/crpord/archive
$ chmod -fR 777 /u2/crpord/archive

Setting Rights and Mounting Backup location on local crpord.mydomain.com

chown -Rh oraord:oinstall /export/home/oraord/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpord/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/ord/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/ord/ord_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/ord/snapcf_ord.f';

Scripts to Perform Database Full Backup

/export/home/oraord/ordbkp.sh
LOG_FILE="ORDBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oraord>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile ordbkp.scr msglog ordbkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/oraord/ordbkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/ord/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh oraord:oinstall /export/home/oraord/ordbkp.scr
bash-3.00# chown -Rh oraord:oinstall /export/home/oraord/ordbkp.sh

bash-3.00# chmod -fR 777 /export/home/oraord/ordbkp.scr
bash-3.00# chmod -fR 777 /export/home/oraord/ordbkp.sh


$  ls –lh ord*
-rwxrwxrwx   1 oraord   oinstall     202 May 19 15:58 ordbkp.scr
-rwxrwxrwx   1 oraord   oinstall     325 May 19 15:55 ordbkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e oraord
0 0 * * 1,2,3,4,5 /export/home/oraord/ordbkp.sh



crpeme.mydomain.com – 10.10.0.165

RMAN Configuration Backup

The database backup will be performed in no catalog mode. The expected time of backup is around 2.5 hours. Full Backup would be performed on daily basis, five days a week at 12:00. Old backups (Yesterday’s) will be removed after the completion of full backup.

Creating and setting rights on folders at 10.40.0.89

root@erp2.mydomain.com # mkdir /development/crpbackup/eme
root@erp2.mydomain.com # chmod -fR 777 /development/crpbackup/eme/

Creating Folders and Enabling Database to Archive Log Mode

$ mkdir /u2/crpeme
$ mkdir /u2/crpeme/archive

$ chown -Rh oraeme:oinstall /u2/crpeme/archive
$ chmod -fR 777 /u2/crpeme/archive

Setting Rights and Mounting Backup location on local crpeme.mydomain.com

chown -Rh oraeme:oinstall /export/home/oraeme/
mkdir /mnt/crpbackup
mount -F nfs 10.40.0.89:/development/crpbackup /mnt/crpbackup/

Enabling Database Archive log mode

shutdown immediate;
startup mount;
alter system set log_archive_dest=/u2/crpeme/archive
alter database archivelog;
alter database open;

Enabling Block Change Tracking Feature

sqlplus > alter database enable block change tracking using file ‘/u1/oradev/DEV/db/apps_st/data/ch_track.log’;

RMAN Configuration

Connect to RMAN as OS Database
$ rman

Now get connected with the database
RMAN>connect target

Now execute following commands to configure RMAN
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/mnt/crpbackup/eme/ORA_CF%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/mnt/crpbackup/eme/eme_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/mnt/crpbackup/eme/snapcf_eme.f';

Scripts to Perform Database Full Backup

/export/home/oraeme/emebkp.sh
LOG_FILE="EMEBKP_`hostname`_`date '+%d%m%y_%H%M'`.txt"
echo "**Start Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE
cd /export/home/oraeme>>$LOG_FILE
. .profile
rman target system/systemdev cmdfile emebkp.scr msglog emebkp.log>>$LOG_FILE
echo "**End Date: `date '+%d%m%y_%H%M'`*********************">>$LOG_FILE


/export/home/oraeme/emebkp.scr
run
{
backup database;
delete noprompt obsolete redundancy=1;
backup archivelog all format '/mnt/crpbackup/eme/arch_%d_%u_%s_%T';
delete noprompt archivelog all backed up 1 times to device type disk;
}


Setting Scripts Rights

bash-3.00# chown -Rh oraeme:oinstall /export/home/oraeme/emebkp.scr
bash-3.00# chown -Rh oraeme:oinstall /export/home/oraeme/emebkp.sh

bash-3.00# chmod -fR 777 /export/home/oraeme/emebkp.scr
bash-3.00# chmod -fR 777 /export/home/oraeme/emebkp.sh


$  ls –lh eme*
-rwxrwxrwx   1 oraeme   oinstall     202 May 19 15:58 emebkp.scr
-rwxrwxrwx   1 oraeme   oinstall     325 May 19 15:55 emebkp.sh


Scheduling Backup Procedure

bash-3.00# crontab -e oraeme
0 0 * * 1,2,3,4,5 /export/home/oraeme/emebkp.sh