Home Database Mysql Tutorial Oracle数据日志模式

Oracle数据日志模式

Jun 07, 2016 pm 05:21 PM
oracle

查看当前数据库日志模式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

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

Hot Article

Hot Article

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Function to calculate the number of days between two dates in oracle Function to calculate the number of days between two dates in oracle May 08, 2024 pm 07:45 PM

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

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

How long will Oracle database logs be kept?

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The order of the oracle database startup steps is

How to use interval in oracle How to use interval in oracle May 08, 2024 pm 07:54 PM

How to use interval in oracle

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements

How to see the number of occurrences of a certain character in Oracle How to see the number of occurrences of a certain character in Oracle May 09, 2024 pm 09:33 PM

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

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

How much memory does oracle require?

How to replace string in oracle How to replace string in oracle May 08, 2024 pm 07:24 PM

How to replace string in oracle

See all articles