Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle data gurad ORA-16416 error

Shulou Source: shulou.com Published: 2022-06-01 06:21:28 10月04日 Update

Oracle dg is my own test environment, because the ip is occupied, so I need to change the ip, after changing the ip encountered the following problems, now record.

After changing the ip, I still do the normal master / slave switchover. Due to my carelessness, I did not query the master / slave switchover_status before the switch. I switched directly and found the following error:

Switchover on the host

Randomly queried the following switchover status of master and slave and found:

Lord:

Standby:

In the middle, I thought that there was a problem with the master database, so I restarted the master database. Later, it was found that the listening status of the master and slave libraries was not running:

It is found that the host address is the address before the change, then change the host address, restart listening, reconfigure the tns file, restart the main database and query again:

Display the not allow ed status, view the official website documents and display:

NOT ALLOWED-Either this is a standby database and the primary database has not been switched first, or this is a primary database and there are no standby databases.

SESSIONS ACTIVE-Indicates that there are active SQL sessions attached to the primary or standby database that need to be disconnected before the switchover operation is permitted.

This may be because when I restart the main library, some of the logs in the database backup database are not applied. Execute recover managed in the repository

Query again in the main database:

It has become to standby, and then you can switch between the master and the slave normally.

Tags: Status switch query address again problem monitor error carelessness carelessness next host reason carelessness data database file document log time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia macOS Shulou Tech Info Huawei