Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me






  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

Online (Hot) backup of datafile in Oracle database 11gR2

Posted by Mir Sayeed Hassan on February 13th, 2018

Online (Hot) backup of datafile

To perform the online backup of the database, the database should be running in archivelog mode, below query:

Check the database Instance Name & Version

sys@TESTDB>select INSTANCE_NAME, VERSION from v$instance;

INSTANCE_NAME    VERSION
——————————------------------
testdb           11.2.0.4.0

Check the status of the database in archive mode or not

sys@TESTDB> select log_mode from V$database;

LOG_MODE
——————
ARCHIVELOG                     --- DB is in archivelog mode
sys@TESTDB> archive log list
Database log mode                    Archive Mode
Automatic archival                     Enabled
Archive destination                   /u01/app/oracle/oradata/archive
Oldest online log sequence            12490
Next log sequence to archive          12491
Current log sequence                  12491

Consider you want to take the online backup of the specific tablespace “SYSAUX” datafile

sys@TESTDB>select name from v$datafile;

“/u01/app/oracle/oradata/prim/sysaux01.dbf”

Now take the online backup of SYSAUX Tablespace datafile

[oracle@testdb  ~]$ !sq
sqlplus
SQL*Plus: Release 11.2.0.4.0 Production on Tue Feb 13 13:07:49 2018
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Begin online backup:

sys@TESTDB>alter tablespace sysaux begin backup;
Tablespace altered.
[root@testdb  backup]# mkdir sysaux_bkp_online
[root@ogg-test1 backup]# chmod -R 775 sysaux_bkp_online/
[oracle@testdb  prim]$ cp sysaux01.dbf /backup/sysaux_bkp_online/

End the backup:

sys@TESTDB>alter tablespace sysaux end backup;
Tablespace altered.

Verify:

[oracle@testdb  sysaux_bkp_online]$ ls
sysaux01.dbf

======Hence tested & verified in our test env======