Home > Oracle > 正文

Oracle数据库归档模式的查询和开启以及关闭

SQL> startup
ORACLE instance started.

Total System Global Area 776646656 bytes
Fixed Size 2257272 bytes
Variable Size 511708808 bytes
Database Buffers 255852544 bytes
Redo Buffers 6828032 bytes
Database mounted.
Database opened.

SQL> archive log list; -----查询是否归档模式
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7
Current log sequence 9
SQL> select name,log_mode from v$database; -----查询是否归档模式

NAME LOG_MODE
------------------------------------------------------------ ------------
DB01 NOARCHIVELOG

Elapsed: 00:00:00.01

SQL> shutdown immediate -------关闭数据库
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount ---------启动到mount状态
ORACLE instance started.

Total System Global Area 776646656 bytes
Fixed Size 2257272 bytes
Variable Size 511708808 bytes
Database Buffers 255852544 bytes
Redo Buffers 6828032 bytes
Database mounted.
SQL> alter database archivelog; ---------打开归档

Database altered.

Elapsed: 00:00:00.01
SQL> alter database open; -------打开数据库

Database altered.

Elapsed: 00:00:01.84
SQL> archive log list; ---------查询归档状态
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7
Next log sequence to archive 9
Current log sequence 9
SQL> select name,log_mode from v$database; ---------查询归档状态

NAME LOG_MODE
------------------------------------------------------------ ------------
DB01 ARCHIVELOG

Elapsed: 00:00:00.01

SQL> shutdown immediate ------关闭数据库
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount; ------启动到mount状态
ORACLE instance started.

Total System Global Area 776646656 bytes
Fixed Size 2257272 bytes
Variable Size 511708808 bytes
Database Buffers 255852544 bytes
Redo Buffers 6828032 bytes
Database mounted.
SQL> alter database noarchivelog; --------关闭归档模式

Database altered.

Elapsed: 00:00:00.00
SQL> alter database open; ------打开数据库

Database altered.

Elapsed: 00:00:00.82
SQL> archive log list; ----归档模式确认
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7
Current log sequence 9
SQL>

上一篇:Oracle 11gR2 静态监听 listener
下一篇:Oracle 11gR2 归档日志格式/路径修改
数据库RAC 磁盘组磁盘调整

数据库RAC 磁盘组磁盘调整

CRS-2730集群资源DG无法删除

CRS-2730集群资源DG无法删除

XX平台数据库无法启动CRS-2674  HAIP

XX平台数据库无法启动CRS-2674 HAIP

有备份有归档模式下控制文件丢失故障处理

有备份有归档模式下控制文件丢失故障处理

无备份有归档模式下控制文件丢失故障处理

无备份有归档模式下控制文件丢失故障处理

无备份无归档模式下控制文件丢失故障处理

无备份无归档模式下控制文件丢失故障处理

打开oracle归档并定义归档路径

打开oracle归档并定义归档路径

发表评论

昵称
邮箱
网址

沙发空闲中,快来抢!