ITPub博客

首页 > 数据库 > Oracle > 更改Oracle 10g/11g数据库为归档模式

更改Oracle 10g/11g数据库为归档模式

原创 Oracle 作者:robincao 时间:2007-09-10 17:28:27 0 删除 编辑

一、oracle 10g/11g

1、修改归档日志存放路径:

SQL> alter system set log_archive_dest_10='location=/oracle/oracle10g/log/archive_log';

2、关闭数据库

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

3、启动数据mount状态:

SQL> startup mount;
ORACLE instance started.

Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 92276304 bytes
Database Buffers 188743680 bytes
Redo Buffers 2973696 bytes
Database mounted.

4、修改数据库为归档模式:

SQL> alter database archivelog;

Database altered.

5、打开数据库,查询:

SQL> alter database open;

Database altered.

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/oracle10g/log/archive_log
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1

5、修改日志文件命名格式:

SQL> alter system set log_archive_max_processes = 5;
SQL> alter system set log_archive_format = "archive_%t_%s_%r.log" scope=spfile;

System altered.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7230168/viewspace-968793/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    10
  • 访问量
    44321