0% found this document useful (0 votes)
32 views

Control File Creation

The document describes steps taken to backup an Oracle database including scheduling RMAN backups, backing up control files, and commenting crontab jobs. It provides details on backing up to specific locations and using tags for backups taken before an upgrade.

Uploaded by

Atul Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Control File Creation

The document describes steps taken to backup an Oracle database including scheduling RMAN backups, backing up control files, and commenting crontab jobs. It provides details on backing up to specific locations and using tags for backups taken before an upgrade.

Uploaded by

Atul Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

- -- >

Crontab job disabled :

# Crosscheck and delete obsolete:


/u01/app/oracle/admin/crcdb01/backup/rman/crcdb01_crosscheck_and_delete_obsolete.rc
v
#0 18 * * 5 /u01/app/oracle/admin/crcdb01/backup/rman/crcdb01_incr0_backup.rcv
>> /u01/app/oracle/admin/crcdb01/backup/rman/log/crcdb01_incr0_backup.log 2>&1
#0 16 * * 0,1,2,3,4,6
/u01/app/oracle/admin/crcdb01/backup/rman/crcdb01_incr1_backup.rcv >>
/u01/app/oracle/admin/crcdb01/backup/rman/log/crcdb01_incr1_backup.log 2>&1
# Archivelog
#0 0-15,17-23 * * *
/u01/app/oracle/admin/crcdb01/backup/rman/crcdb01_archivelog_backup.rcv >>
/u01/app/oracle/admin/crcdb01/backup/rman/log/crcdb01_archivelog_backup.log 2>&1
# Update of helper table for dbid and partition
#0 05 * * * cd /u01/app/oracle/admin/crcdb01/backup/rman/;sh
crcdb01_insertdbid_rcatalog.sh >>
/u01/app/oracle/admin/crcdb01/backup/rman/log/crcdb01_insertdbid_rcatalog.sh.log
2>&1

===================================================================================
================================
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/CRCDB01/CONTROLFILE/current.5222.892038833
+FRA/CRCDB01/CONTROLFILE/current.1133.892038833

backup both the control files :\

cp current.5222.892038833 /tmp/controldataback.5222.892038833
cp current.1133.892038833 /tmp/controlfraback.1133.892038833

backup control file :

alter database backup controlfile to trace noresetlogs;

SQL> oradebug setmypid;


Statement processed.
SQL> oradebug tracefile_name;

/u01/app/oracle/diag/rdbms/crcdb01/crcdb01_1/trace/crcdb01_1_ora_53281442.trc

srvctl stop database -db crcdb01

startup nomount
alter system set cluster_database=false scope=spfile;
shutdown
startup nomount

SQL> show parameter cluster_database

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
cluster_database boolean FALSE
cluster_database_instances integer 1

===================================================================================
===================================
startup nomount

sqlplus / as sysdba

SQL> @create_control.sql

SQL> @control.sql
ORA-01081: cannot start already-running ORACLE - shut it down first

Control file created.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

ORA-00283: recovery session canceled due to errors


ORA-00264: no recovery required

Database altered.

System altered.

Database altered.

Pluggable database altered.

Session altered.

Tablespace altered.
Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.
Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.
Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.
Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.

Tablespace altered.

Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.
Tablespace altered.
Session altered.

alter system set cluster_database=true scope=spfile;

1. Start all instances:

$ srvctl start database -d orcl


$ srvctl status database -d orcl
connect catalog rman/cat@rcatalog

===================================================================================
======================================================
comment crontab file:

crontab -e -> commnet crcdb01

select name from v$controlfile;


+DATA/CRCDB01/CONTROLFILE/current.5222.892038833
+FRA/CRCDB01/CONTROLFILE/current.1133.892038833

Backing control to trace:-

SQL> alter database backup controlfile to trace noresetlogs;

Database altered.

SQL> oradebug setmypid;


Statement processed.
SQL> oradebug tracefile_name;

/u01/app/oracle/diag/rdbms/sector71/sector71/trace/sector71_ora_3746.trc

@script

------------------------------>>
Schedule backup:

RUN{
ALLOCATE CHANNEL c1 TYPE DISK;
ALLOCATE CHANNEL c2 TYPE DISK;
ALLOCATE CHANNEL c3 TYPE DISK;
ALLOCATE CHANNEL c4 TYPE DISK;
backup incremental level 0 database format '/tempdump/oracle/rman_backup/P3010DVH_
%D_%M_%Y_%U.bak' TAG Before_upgrade;
backup archivelog from time 'sysdate-1' until time 'sysdate' format
'/tempdump/oracle/rman_backup/arc_%d_%D_%M_%Y_%U.bak' TAG Before_upgrade;
backup current controlfile FORMAT '/tempdump/oracle/rman_backup/ctl_%d_%D_%M_%Y_
%U.ctl' TAG Before_upgrade;
}

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-
state=8jaaq8j7v_9&_afrLoop=365553896000136#aref_section32

https://support.oracle.com/epmos/faces/DocumentDisplay?
_afrLoop=377055122398383&id=118931.1&_adf.ctrl-state=1a8xnn15gt_150

===================================================================================
==================================================================

You might also like