05. Oracle 11g 查看和修改日志模式


SQL*Plus: Release 11.2.0.1.0 Production on 星期四 3月 23 17:48:20 2017

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

请输入用户名:  sys as sysdba
输入口令:

连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> archive log list // 查看日志模式
数据库日志模式             非存档模式
自动存档             禁用
存档终点            USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列     5
当前日志序列           7
SQL> shutdown immediate // 修改日志模式
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
// 例程关闭后可以备份数据库(可选)
SQL> startup mount
ORACLE 例程已经启动。

Total System Global Area 1670221824 bytes
Fixed Size                  2176328 bytes
Variable Size             973081272 bytes
Database Buffers          687865856 bytes
Redo Buffers                7098368 bytes
数据库装载完毕。
SQL> alter database archivelog;

数据库已更改。

SQL> alter database open;

数据库已更改。

SQL> archive log list
数据库日志模式            存档模式
自动存档             启用
存档终点            USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列     5
下一个存档日志序列   7
当前日志序列           7
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。

Total System Global Area 1670221824 bytes
Fixed Size                  2176328 bytes
Variable Size             973081272 bytes
Database Buffers          687865856 bytes
Redo Buffers                7098368 bytes
数据库装载完毕。
SQL> alter database noarchivelog;

数据库已更改。

SQL> alter database open;

数据库已更改。

SQL> archive log list
数据库日志模式             非存档模式
自动存档             禁用
存档终点            USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列     5
当前日志序列           7
SQL>

你可能感兴趣的:(Oracle,手记)