Friday, January 19, 2024

DB Cold Backup of ORACLE R12.2 step by step

 


1. Crontab Check

If you want to take cold backup, first check-in database   Crontab Job scheduled or not  

Check the status of the crontab


[root@r12prddb ~]# crontab -l

00 01 * * 1-5 su oraprod -c ". /home/oraprod/rman_script/Prod_rman_fullbkp.sh"
40 01 * * 1-5 su oraascp -c ". /home/oraascp/rman_scripts/rman_full_backup.sh"

40 02 * * 1-5 su obieedb -c ". /home/obieedb/rman_scripts/Rman_fullbackup.sh


now disable the crontab , using command crontab -e

#00 01 * * 1-5 su oraprod -c ". /home/oraprod/rman_script/Prod_rman_fullbkp.sh"
#40 01 * * 1-5 su oraascp -c ". /home/oraascp/rman_scripts/rman_full_backup.sh”

Please add sysmbol #

now check-in status of the crontab -l

Note: if crontab is active


, we can not shut down the database.


2.Pre clone the PROD DB

We are connecting to <oraprod> USER

oraprod@r12prddb ~]$ cd  /u01/PROD/db/tech_st/12.1.0/ 

oraprod@12prddb  12.1.0] cd   appsutil/scripts/PROD_r12prddb

oraprod@r12prddb PROD_r12prddb]$ pwd

/u01/PROD/db/tech_st/12.1.0/appsutil/scripts/PROD_r12prddb

[oraprod@r12prddb PROD_r12prddb]  perl adpreclone.pl dbTier 

preclone runnig Max 4 to 5 mins

Preclone Successfully completed in PROD EBS DB

Once done we can take a backup,

Note : In ORACLE EBS  first stop all application services then after only down the Database

Down the database Procedure :

1. Stop All application Services 

2. Check the database status

[oraprod@r12prddb ~]$ ps -ef | grep tns

oraprod 27642 1 0 May11 ? 00:00:09 /u01/PROD/db/tech_st/12.1.0/bin/tnslsnr PROD -inherit
oraprod 30501 30457 0 02:35 pts/6 00:00:00 grep tns

source the database 

[oraprod@r12prddb ~]$cd /u01/PROD/db/tech_st/12.1.0/

[oraprod@r12prddb 12.1.0]$

[oraprod@r12prddb 12.1.0]$ . PROD_r12prddb.env

2. Shut down the database

[oraprod@r12prddb 12.1.0]$ sqlplus / as sysdba

SQL> select name from v$database;

NAME
---------
PROD


SQL > shut immediate

database down , now stop the listener

SQL> exit

[oraprod@r12prddb 12.1.0]$  lsnrctl stop PROD

3. TAR Backup :

Note : take backup before check mount point space is available or not 

 connect to <root> user then will take backup

DATABASE Location is /u01/PROD/db

now we want take backup of   "db"


we are going to take backup of TAR backp 

Using TAR command take backup of DB
EX:
command  is < tar -cvzf file.tar.gz db/>

file.tar.gz  is backup loaction
db is backup of the source file

[root@r12prddb PROD]  tar -cvzf  /backup/PROD/12May20/prod_db_fullbkp.tar.gz  db/

Time is taking depends on the database size.










No comments:

Post a Comment

How to bounce the(restart) Apache server in Oracle EBS R12.2 ?

   1. login to our EBS instance using the putty tool 2. login applmgr user  3. Set the Apps Environment file applmgr  32497     1  0 Aug23 ?...