Home  >  Article  >  Database  >  How to delete log group in oracle

How to delete log group in oracle

WBOY
WBOYOriginal
2022-05-13 15:10:063079browse

In Oracle, you can use the alter database statement to delete the log group. This statement can modify the data file. It can be used in conjunction with logfile group and drop to delete the log group. The syntax is "alter database drop logfile group group number" .

How to delete log group in oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to delete the log group in oracle

alter database drop logfile group group_number;

alter database: modify the data file

You need to pay attention to the following points when deleting the log file group

1. A database At least two log file groups are required.

2. The log file group cannot be in the current state. ‘

3. If the database is running in archive mode, you should make sure that the log file has been archived.

Examples are as follows:

SQL> alter database drop logfile group 8;
Database altered.

How to delete log group in oracle

Extended knowledge:

View the log group (the log group in the CURRENT state needs to switch the log, and the log group in other states needs to be switched. Can be deleted)

SQL> select GROUP#,status from v$log;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 INACTIVE
3 CURRENT
8 UNUSED

Recommended tutorial: "Oracle Video Tutorial"

The above is the detailed content of How to delete log group in oracle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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