29.You executed the following command to perform a backup of the USERS tablespace:

29.You executed the following command to perform a backup of the USERS tablespace:
SQL> ALTER TABLESPACE users BEGIN BACKUP;
ALTER TABLESPACE users BEGIN BACKUP
*
ERROR at line 1:
ORA-01123: cannot start online backup; media recovery not enabled
What could be the reason for this error?
A. The MTTR Advisor is disabled.
B. The database is in NOARCHIVELOG mode.
C. The tablespace is already in backup mode.
D. The Flash Recovery Area is not configured.
Answer:B

解析:

联机/脱机备份知识点:

模拟错误过程:

(1)查看数据库初始归档模式是否开启

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@redhat6 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon May 21 17:52:42 2018

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 730714112 bytes
Fixed Size 2216944 bytes
Variable Size 314575888 bytes
Database Buffers 411041792 bytes
Redo Buffers 2879488 bytes
Database mounted.
Database opened.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled      # 可以确认是开启的
Archive destination /u01/app/oracle/product/11.2.0/db_1/archivelog
Oldest online log sequence 59
Next log sequence to archive 61
Current log sequence 61

(2)将数据库切换到非归档模式
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 730714112 bytes
Fixed Size 2216944 bytes
Variable Size 314575888 bytes
Database Buffers 411041792 bytes
Redo Buffers 2879488 bytes
Database mounted.
SQL> alter database noarchivelog
2 ;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list
Database log mode No Archive Mode    #确认是关闭了归档模式
Automatic archival Disabled
Archive destination /u01/app/oracle/product/11.2.0/db_1/archivelog
Oldest online log sequence 59
Current log sequence 61
SQL> alter tablespace users begin backup;
alter tablespace users begin backup
*
ERROR at line 1:
ORA-01123: cannot start online backup; media recovery not enabled    #报错

猜你喜欢

转载自www.cnblogs.com/lijiaman/p/9068555.html