Oracle数据日志模式
Jun 07, 2016 pm 05:21 PM查看当前数据库日志模式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中已经废除了该参数,,所以不需要设置该参数。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Function to calculate the number of days between two dates in oracle

How long will Oracle database logs be kept?

The order of the oracle database startup steps is

Oracle database server hardware configuration requirements

How to see the number of occurrences of a certain character in Oracle
