Sunday, 10 December 2017

Online (Hot) backup (User Managed) practical

Online (Hot) backup:-

SQL> archive log list                                 (Enabled)

SQL> alter system switch logfile;

SQL> archive log list                                 (Enabled)



1.    Put the database into backup mode.

SQL> select * from v$backup;                (STATUS CHANGE#= NOT ACTIVE)

SQL> alter database begin backup;

SQL> select * from v$backup;                (STATUS = ACTIVE)



2.    Go to OS level and copy all datafiles.
SQL> exit

~]$ mkdir onlinebkp

~]$ cd onlinebkp/

onlinebkp]$ pwd
onlinebkp]$ cd

~]$ cd prod

prod]$ cp -rvf *.dbf /u01/home/onlinebkp

prod]$ cd
~]$ cd onlinebkp

onlinebkp]$ sqlplus / as sysdba



3.    End the backup mode of database.

SQL> select * from v$backup;                (STATUS = ACTIVE)

SQL> alter database end backup;

SQL> select * from v$backup;                (STATUS = NOT ACTIVE)



4.    Take backup of control file.

SQL> alter database backup controlfile to trace as '/u01/home/onlinebkp/bkp.ctl';




Online Backup of Database Tablespace Wise
To backup data files of a particular Tablespace

SQL> alter system switch logfile;

SQL> archive log list

SQL> alter tablespace tech begin backup;
SQL> exit

~]$ cd prod

prod]$ cp -rvf tech01.dbf /u01/home/onlinebkp

prod]$ cd
~]$ cd onlinebkp

onlinebkp]$ sqlplus / as sysdba

SQL> alter tablespace tech end backup;


Views:-
V$backup, V$datafile, V$controlfile
V$datafile_header




To Take the Backup of Oracle Software/Binaries (ORACLE_HOME):-

Steps:
1) Stop the db services (instances, listener)
2) Backup the software $cp –R $ORACLE_HOME /backup

3) Startup the db services (instances, listener)

No comments:

Post a Comment

relink a single executable (binary file) using ADADMIN utility

In this post, I would like to write something useful for patching and fine-tuning. When times, we have to relink a particular binary file ...