nerdexam
Oracle

1Z0-052 · Question #258

You are using the following command to clear the log file group: ALTER DATABASE CLEAR LOGFILE GROUP 2; In which case would the command be successful?

The correct answer is D. Group 2 has been already archived. ALTER DATABASE CLEAR LOGFILE GROUP resets a redo log group and requires the group to have already been archived so that no redo data is permanently lost.

Performing Backup and Recovery

Question

You are using the following command to clear the log file group:

ALTER DATABASE CLEAR LOGFILE GROUP 2; In which case would the command be successful?

Options

  • AGroup 2 is the active group.
  • BGroup 2 is the current group.
  • CDatabase is in the MOUNT state.
  • DGroup 2 has been already archived.

How the community answered

(21 responses)
  • A
    5% (1)
  • B
    10% (2)
  • C
    5% (1)
  • D
    81% (17)

Why each option

ALTER DATABASE CLEAR LOGFILE GROUP resets a redo log group and requires the group to have already been archived so that no redo data is permanently lost.

AGroup 2 is the active group.

An active redo log group is currently being written to by the log writer process, and Oracle will not permit it to be cleared while it is actively receiving redo entries.

BGroup 2 is the current group.

The current group is the most recently selected group for writing and cannot be cleared because it may contain redo that has not yet been archived or checkpointed.

CDatabase is in the MOUNT state.

The database open mode (MOUNT vs OPEN) alone does not determine whether CLEAR LOGFILE succeeds; the deciding factor is the archived status of the target group, not the instance state.

DGroup 2 has been already archived.Correct

CLEAR LOGFILE succeeds when the target group has already been archived because the archived copy preserves the redo data, making it safe to reinitialize the online log. Oracle enforces this requirement strictly to prevent data loss - if the group has not yet been archived, you must use CLEAR UNARCHIVED LOGFILE instead, which explicitly acknowledges the potential loss of redo.

Concept tested: Clearing archived redo log groups with ALTER DATABASE

Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/ALTER-DATABASE.html

Topics

#CLEAR LOGFILE#redo log groups#archived log#ALTER DATABASE

Community Discussion

No community discussion yet for this question.

Full 1Z0-052 Practice