What are the stpes for cold backup?

@ : Home > > Interview Room

1. Using Copy command in UNIX

Step 1: Find the location of all the physical file(Datafiles,controlfiles,redologs):
--------
For Datafile:

SQL> select file_name||' '||tablespace_name||' '||bytes from dba_data_files;

FILE_NAME||''||TABLESPACE_NAME||''||BYTES
--------------------------------------------------------------------------------
D:\ORADATA\BOSCHDB\USER123.DBF USER123 104857600
D:\ORADATA\BOSCHDB\EXAMPLE01.DBF EXAMPLE 104857600
D:\ORADATA\BOSCHDB\USERS01.DBF USERS 5242880
D:\ORADATA\BOSCHDB\SYSAUX01.DBF SYSAUX 304087040
D:\ORADATA\BOSCHDB\UNDOTBS01.DBF UNDOTBS1 26214400
D:\ORADATA\BOSCHDB\SYSTEM01.DBF SYSTEM 513802240

For logfile:

SQL> select group#||' '||member from v$logfile;

GROUP#||''||MEMBER
--------------------------------------------------------------------------------
3 D:\ORADATA\BOSCHDB\REDO03.LOG
2 D:\ORADATA\BOSCHDB\REDO02.LOG
1 D:\ORADATA\BOSCHDB\REDO01.LOG

Find out control file location

SQL> sho parameter %control%

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string D:\ORADATA\BOSCHDB\CONTROL01.C
TL, D:\ORADATA\BOSCHDB\CONTROL
02.CTL, D:\ORADATA\BOSCHDB\CON
TROL03.CTL


Step 2: Shutdown the database (IMMEDIATE or NORMAL option):

SQL> shutdown immediate

Step 3: Use OS commands or utilities to copy the database datafiles and control files to your backup destination:
Note 1:Make sure this Backup destination is having enough space
Note 2:If you are doing in any unix flavour use command cp

For Unix command is: cp
For Windos Command is: copy

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

2. Using RMAN
Before backup using RMAN you must configure RMAN, at leas following :

CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/your/path/to/backup_folder/%F';
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/your/path/to/backup_folder/%U';

Run following RMAN command:

RMAN> shutdown immediate;
RMAN> startup mount;
RMAN> backup full tag='DB_COLD_BKP_FULL' database;
RMAN> alter database open

 

Alert me