Oralce OMF features (ii) OMF management of Oracle log files

Source: Internet
Author: User
Tags mkdir

Second, the OMF management of the log file

Log file management parameters: Db_create_online_log_dest_n

Db_create_online_log_dest_n:oracle the default path when you create an online log file and a control file without explicitly specifying a path

--View the parameters of the log file, the following is an db_create_online parameter that is not set

Sql> Show PARAMETER Db_create_online

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Db_create_online_log_dest_1 string

Db_create_online_log_dest_2 string

Db_create_online_log_dest_3 string

Db_create_online_log_dest_4 string

Db_create_online_log_dest_5 string

--From the above you can see that the system reserved a log group members to form OMF, in general, we just need a member. Because you set a parameter file here

--The following is the creation of a log file without a setting, the default is to place a file in the path of the data file and in the flashback area, because both of these paths are OMF paths, as follows:

Sql> SELECT member from V$logfile;

Member

--------------------------------------------------------------------------------

/u01/app/oracle/oradata/orcl/redo03.log

/u01/app/oracle/oradata/orcl/redo02.log

/u01/app/oracle/oradata/orcl/redo01.log

/u01/app/oracle/oradata/orcl/orcl/onlinelog/o1_mf_4_5vtgzjyz_.log

/u01/app/oracle/flash_recovery_area/orcl/onlinelog/o1_mf_4_5vtgzlhb_.log

Sql> Show PARAMETER Db_create_file_dest

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Db_create_file_dest STRING/U01/APP/ORACLE/ORADATA/ORCL

Sql> Show Parameter Db_recovery_file_dest

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Db_recovery_file_dest String/u01/app/oracle/flash_recovery

_area

Db_recovery_file_dest_size Big Integer 2G

--Store the log file under the specified Disk1,disk2

Sql> Ho Mkdir/u01/app/oracle/disk1

Sql> Ho Mkdir/u01/app/oracle/disk2

sql> ALTER SYSTEM SET db_create_online_log_dest_1 = '/u01/app/oracle/disk1 ';

System altered.

sql> ALTER SYSTEM SET db_create_online_log_dest_2 = '/u01/app/oracle/disk2 ';

System altered.

sql> ALTER DATABASE ADD logfile;

Database altered.

Sql> SELECT * from V$logfile; /* You can see the new log file under Disk1,disk2 * * *

group# STATUS TYPE member Is_

---------- ------- ------- ---------------------------------------- ---

3 Online/u01/app/oracle/oradata/orcl/redo03.log NO

2 Online/u01/app/oracle/oradata/orcl/redo02.log NO

1 Online/u01/app/oracle/oradata/orcl/redo01.log NO

4 Online/u01/app/oracle/oradata/orcl/orcl/online NO

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.