Oracle deletes log files

Source: Internet
Author: User

Oracle deletes log files

The syntax for deleting a log file is as follows:
Alter database drop logfile member logfile_name;
Note the following when deleting a log file:
1. The log file group of the log file cannot be in the current status. You need to perform a manual log switch to change the status of the log file group to inactive.
2. The log file group of the log file must contain other log members.
3. If the database is running in archive mode, make sure that the log file group to which the database belongs has been archived before deleting the log file. Otherwise, data will be lost.
Status value of the log file group:
Active current inactive unused


Status value of the Oracle log file:
Valid invalid stale
 
Delete a log file group
Syntax:
Later database drop logfile group group_number;
Note the following when deleting a log file group:
1. A database requires at least two Log File groups.
2. The log file group cannot be in the current state. '
3. If the database is running in archive mode, make sure that the log file has been archived.


SQL> alter database drop logfile member
2 'f: \ oracledata \ redo4.log ';
The preceding SQL statement only deletes the data log file in the control file and data dictionary, but is not deleted in the operating system.
The database has been changed.
The Database Log File Group in the following Query System
SQL> select group #, member from v $ logfile;
GROUP # MEMBER
-------------------------------------------------------------------------------
3 D: \ ORACLE \ ORADATA \ ORACLE12C \ REDO03.LOG
2 D: \ ORACLE \ ORADATA \ ORACLE12C \ REDO02.LOG
1 D: \ ORACLE \ ORADATA \ ORACLE12C \ REDO01.LOG
4 F: \ ORACLEDATA \ LOGFILE \ REDO1.LOG

4 F: \ ORACLEDATA \ LOGFILE \ REDO2.LOG

The above content comes from the Learning Record.

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.