如何设置Oracle数据库为归档模式(archivelog)

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:456

如何设置Oracle数据库为归档模式(archivelog)

在数据库安装完成后,默认为非归档模式,通过以下步骤将非归档模式转为归档模式
C:\Documents and Settings\Paul Yi>sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 6月 7 14:36:12 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

SQL> archive log list;
数据库日志模式 非存档模式
自动存档 禁用
存档终点 d:\oraarc
最早的概要日志序列 0
当前日志序列 1

SQL> shutdown;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。

SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 101784276 bytes
Fixed Size 453332 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
数据库装载完毕。

SQL> alter database archivelog; --设为归档模式语句
数据库已更改。

SQL> alter database open;
数据库已更改。

SQL> archive log list;
数据库日志模式 存档模式
自动存档 禁用
存档终点 d:\oraarc
最早的概要日志序列 0
下一个存档日志序列 1
当前日志序列 1
--以下语句设置为自动存档

SQL> alter system set log_archive_start=true scope=spfile;
系统已更改。

SQL> shutdown
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。

SQL> startup;
ORACLE 例程已经启动。
Total System Global Area 101784276 bytes
Fixed Size 453332 bytes
Variable Size 75497472 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
数据库装载完毕
数据库已经打开。

SQL> archive log list;
数据库日志模式 存档模式
自动存档 启用
存档终点 d:\oraarc
最早的概要日志序列 0
下一个存档日志序列 1
当前日志序列 1

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】