修改数据库archivelog模式
2014年2月14日
今天遇到执行alter tablespace example begin backup 时报错,ora-01123: cannot start online
backup:media recovery not enabled,首先想到数据库是处在noarchivelog 模式。
如何修改呢?
解决方法:
SQL> shutdown immediate
Database closed.
Database dismounted.
SQL> startup mount
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 104859216 bytes
Database Buffers 176160768 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 3
Current log sequence 3
SQL> alter tablespace example begin backup;
问题解决