Home > Database > Mysql Tutorial > Oracle数据日志模式

Oracle数据日志模式

WBOY
Release: 2016-06-07 17:21:40
Original
814 people have browsed it

查看当前数据库日志模式SQLgt; select name,log_mode from v$database; 或SQLgt;archive log list;(该方法需要as sysdba)对于

一、查看当前数据库日志模式
    SQL> select name,log_mode from v$database;  或
    SQL>archive log list;(该方法需要as sysdba)

对于非归档模式的数据库该为归档模式(主要以Oracle 10g为参考)使用以下步骤:
1. SQL> alter system set log_archive_dest_1='location=/oracle/oracle10g/log/archive_log';  //添加日志文件路径
2.关闭数据库
SQL> shutdown immediate

3.启动数据mount状态:
SQL> startup mount;

4、修改数据库为归档模式:
SQL> alter database archivelog;

5、打开数据库,查询:
SQL> alter database open;

修改日志文件命名格式:
SQL> alter system set log_archive_max_processes = 5;
SQL> alter system set log_archive_format = "archive_%t_%s_%r.log" scope=spfile;

修改完成后可以查看日志模式是否修改成功!

特别指出的是在Oracle 9i中还要修改参数log_archive_start = true才能生效,oracle 10g中已经废除了该参数,,所以不需要设置该参数。

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template