In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the reason why the Oracle backup library can not connect to the main library", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the reason why the Oracle backup library cannot connect to the main library".
Today, I encountered an interesting problem when I was building DG, which consumed a lot of brain cells. Let's simply record it.
First of all, the main library is Queuedb, the slave library is s2queuedb, and the duplicate of RMAN is used to build it. There is no problem with the network configuration of listener.ora,tnsnames.ora for both the master and slave libraries.
However, the following error is thrown when using the RMAN command, and you can see from the error message that the main library is not started.
$rman target sys@Queuedb auxiliary sys@s2queuedb nocatalog
Connected to target database: QUEUEDB (not mounted)
Using target database control file instead of recovery catalog
Auxiliary database Password:
Connected to auxiliary database: QUEUEDB (not mounted)
See here, heart thump, is the database down?
Quickly connect to the main library to see, found that the state of the main library is normal, breathed a sigh of relief, continue to prepare the library to see the cause of the problem.
Using TNS to connect to the slave side, an error is thrown, and it seems that the database is obviously connected to the standby database.
$sqlplus xx/xx@queuedb
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0
But look at the results of tnsping, consistent with the output of the main library, no problem at all.
And change the way of thinking, directly connect to the library, because there is no open, the output must be a 01033 error.
$sqlplus xx/xx@s2queuedb
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Process ID: 0
Session ID: 0 Serial number: 0
Repeatedly confirmed the configuration of the hostname, and no problems were found for the time being. With doubts also compared with the ORACLE_HOME, still fruitless.
[oracle@s2queuedb admin] $ps-ef | grep smon
Oracle 43186 1 0 11:15? 00:00:00 ora_smon_Queuedb
Oracle 43277 43064 0 11:28 pts/0 00:00:00 grep smon
$cat / proc/43188/environ | xargs-0-N1 | grep ORACLE_HOME
ORACLE_HOME=/U01/app/oracle/product/11.2.0.4
$echo $ORACLE_HOME
/ U01/app/oracle/product/11.2.0.4 so the above inspection can only go so far, we have to look at this issue in a different way.
Since the configuration in / etc/hosts is fine, the hostname Queuedb_ZS.test.com points to the main library, and tnsping is fine, so I'll use ping to test it.
$ping Queuedb_ZS.test.com
PING Queuedb_ZS.test.com (127.0.0.1) 56 (84) bytes of data.
64 bytes from Queuedb_ZS.test.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.019 ms
64 bytes from Queuedb_ZS.test.com (127.0.0.1): icmp_seq=2 ttl=64 time=0.008 ms
The result of ^ C gave me a sense of epiphany, and I reviewed the configuration of the / etc/hosts file again.
$cat / etc/hosts
127.0.0.1 Queuedb_ZS.test.com localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.127.xx.166 Queuedb_ZS.test.com
10.129.xx.190 s2queuedb.test.com
It is found that a hostname Queuedb_ZS.test.com is configured at 127.0.0.1, so it will give priority to take this access path, delete it decisively, and there will be no problem if you try again.
If you delete it improperly and directly delete the configuration of 127.0.0.1, then starting listening will definitely throw the following error.
-bash-4.1$ lsnrctl start LISTENER_1528
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=s3nstatdb.test.com) (PORT=1528)
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 104: Connection reset by peer
So these seemingly trivial configurations need to be paid special attention to.
At this point, I believe you have a deeper understanding of "the reason why the Oracle backup library cannot connect to the main library". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.