In non-archive mode, you cannot change the tablespace to the backup mode.

Source: Internet
Author: User

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 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  11M Sep 17 17:06 tt.dbfSQL> archive log listDatabase log mode              Archive ModeAutomatic archival             EnabledArchive destination            USE_DB_RECOVERY_FILE_DESTOldest online log sequence     1876Next log sequence to archive   1879Current 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 immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startup mountORACLE instance started.Total System Global Area  413372416 bytesFixed Size                  2228904 bytesVariable Size             356519256 bytesDatabase Buffers           46137344 bytesRedo Buffers                8486912 bytesDatabase mounted.SQL> alter database noarchivelog;Database altered.SQL> archive log listDatabase log mode              No Archive ModeAutomatic archival             DisabledArchive destination            USE_DB_RECOVERY_FILE_DESTOldest online log sequence     1876Current log sequence           1879SQL> 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

 

In non-archive mode, you cannot change the tablespace to the backup mode.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.