After the Oracle tablespace is set to the backup mode, you can copy and back up the data files in the table space online.
After the Oracle tablespace is set to the backup mode, you can copy and back up the data files in the table space online.
After the Oracle tablespace is set to the backup mode, you can copy and back up the data files in the table space online at the file system level, because modifications to the table space are recorded in the redo log file of the database during this period.
Therefore, if the database is not in archive mode, the tablespace backup mode must not be earlier than the time when the online logs are overwritten to ensure that the data modification will not be lost.
So how does Oracle determine this situation?
The experiment shows that Oracle does not allow you to enable the tablespace backup mode in non-archive mode.
The following error is reported: ORA-01123: cannot start online backup; media recovery not enabled
Experiment verification: Environment: RHEL 6.4 + Oracle 11.2.0.3
1. You can enable the tablespace backup mode in archive mode.
SQL> alter tablespace TT begin backup;
Tablespace altered.
SQL> host cp/home/oradata/JYZHAO/datafile/tt. dbf/tmp/
SQL> alter tablespace TT end backup;
Tablespace altered.
SQL>! Ls-lh/tmp | grep tt
-Rw-r -----. 1 oracle oinstall 11 M Sep 17 17:06 tt. dbf
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1876
Next log sequence to archive 1879
Current log sequence 1879
2. If the database is modified to non-archive mode, it is not allowed to enable the tablespace backup mode.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 413372416 bytes
Fixed Size 2228904 bytes
Variable Size 356519256 bytes
Database Buffers 46137344 bytes
Redo Buffers 8486912 bytes
Database mounted.
SQL> alter database noarchivelog;
Database altered.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1876
Current log sequence 1879
SQL> alter database open;
Database altered.
SQL> alter tablespace TT begin backup;
Alter tablespace TT begin backup
*
ERROR at line 1:
ORA-01123: cannot start online backup; media recovery not enabled
This article permanently updates the link address: