"Translated from MoS article" Alter Database Add supplemental Log Data command hangs

Source: Internet
Author: User

Tag: Alter DATABASE add S Hang

Alter Database Add Supplemental Log Data command hangs
From:
Alter Database Add Supplemental Log Data hangs (document ID 406498.1)

Suitable for:
Oracle database-enterprise edition-version 10.2.0.1 and later
Information in this document applies to any platform.

Symptoms:
As part of the stream replication configuration, you need to specify supplemental logging at the database level

This can be done in the following ways:

1. Manual execution: ALTER DATABASE ADD supplemental LOG DATA (PRIMARY KEY, UNIQUE INDEX) columns;2.implicitly run stored procedures, such as Dbms_streams_a Dm. Add_schema_rules3.if you setup Streams using a Grid Control It is automatically executed by SrcSchemaRule1 Stage Step 12.

In some cases, the step hangs (hang), and the statement alter DATABASE ADD supplemental LOG DATA is waiting for the TX lock in shared mode

The following steps can be used to find the problematic session

Connect/as sysdbaalter Session Set tracefile_identifier= ' SUPP '; Alter session set Max_dump_file_size=unlimited;alter Session Set Events ' 32593 errorstack (3) systemstate (266) '; ALTER DATABASE Add supplemental LOG DATA; Upload the *supp* from the database trace directory.


Note: If the database has many sessions associated with the dump, then SystemState will spend a lot of time and generate a large trace file
and kill session.

It may be easier to find the blocker and the waiting person

Reason:
The statement alter DATABASE ADD supplemental LOG DATA is waiting for the shared mode TX lock because there are uncommitted transactions. This is the expected behavior.
When the database is open, you can issue the ALTER DATABASE ADD supplemental LOG DATA statement.
However, Oracle database invalidates all DML cursors in the cursor cache, which has an effect on performance until the cache is regenerated.
In addition (besides), we also need to wait for all pending transactions to complete so that the redo generated after the DDL (ALTER DATABASE ADD supplemental LOG DATA) has the correct supplemental logging property.

Solution:
You need to wait for the completion of all pending transactions.
In some high activity databases, there are always active transactioins, which can be done by restarting the database and manually running the SQL

STARTUP MOUNT ALTER DATABASE ADD supplemental LOG DATA; ALTER DATABASE OPEN;

"Translated from MoS article" Alter Database Add supplemental Log Data command hangs

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.