今天打开数据库,想修改Oracle的归档模式结果出现以下错误:
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
上网查了下,原来是上次系统的非正常关闭导致。需要重新打开数据库,使数据文件,控制文件,日志文件同步,再修改归档模式。
SQL> alter database open;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 301305856 bytes
Fixed Size 1336148 bytes
Variable Size 167775404 bytes
Database Buffers 125829120 bytes
Redo Buffers 6365184 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 6
Next log sequence to archive 8
Current log sequence 8
OK。