In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
# # check how each service corresponds to that pdb (you can only see which instance service corresponds to with lsnrctl status) how to use non-default listening 2017-02-17 # # # I. For oracle 12c Due to the change in architecture and the introduction of CDB and PDB, which database does an service correspond to? 1. You can query through v$services view: SQL > select name, pdb from v$services NAME PDB---pdb2 PDB2pdb1 PDB1test12cXDB CDB$ROOTtest12c CDB$ROOTSYS$BACKGROUND CDB$ROOTSYS$USERS CDB$ROOT2 、 、 View all pdbSQL > show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED- 2 PDB$SEED READ ONLY NO 3 PDB1 READ WRITE NO 4 PDB2 MOUNTED Note: when using service pdb1 to connect to a database Pdb1 is directly connected. Of course, if you have permission, you can also use alter session set container=CDB$ROOT. Switch to CDB, or you can switch to pdb1 3 through alter session set container=pdb1;, or view the current container SQL > show con_nameCON_NAME--PDB1
-- switch to CDBSQL > alter session set container=CDB$ROOT;-- to view the current container SQL > show con_nameCON_NAME--CDB$ROOT 2, how to use non-default listeners 1, and create new listeners with netca or netmgr. A new listener message will be added to the listener.ora file, but note that the listener name is just an alias for the listener, and the real listener name is in tnsnames.ora. (if you use the default listening LISTENER, you do not need to make any settings) 2. Set local_listener = This parameter (new listener name) should be the same as the listener name in tnsname.ora SQL > show parameter local_listenerNAME TYPE VALUE -local_listener string LISTENER_TEST12C3, Add a listening entry to the tnsnames.ora The format is as follows: LISTENER_TEST12C = (ADDRESS = (PROTOCOL = TCP) (HOST = oracle12c-test) (PORT = 1522)) 4. Add a TNS connection string to tnsnames.ora (this is not needed in 11g. In lsnrctl status, 11G will only connect listener entries in the tnsname.ora file. But 12C needs to connect the TNS entry) [oracle@oracle12c-test admin] $cat listener.ora# listener.ora Network Configuration File: / u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora# Generated by Oracle configuration tools.TEST12C1 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = oracle12c-test) (PORT = 1522)) (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1522)) ) [oracle@oracle12c-test admin] $cat tnsnames.ora# tnsnames.ora Network Configuration File: / u01/app/oracle/product/12.1.0/db_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools.TEST12C = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = oracle12c-test) (PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test12c)) LISTENER _ TEST12C = (ADDRESS = (PROTOCOL = TCP) (HOST = oracle12c-test) (PORT = 1522)) is visible above Listeners have different names in listener.ora and tnsnames.ora, TEST12C1 (listening alias) in listener.ora and TEST12C (real listener name, which should be consistent with the local_listener parameter) in tnsnames.ora. Summary: you can check which pdb corresponds to each service through select name, pdb from vested services. If you use default listening LISTENER, you do not need to make any configuration, if you want to use non-default listening, you need to make the following settings: 1. Create new listening 2, set local_listener parameter 3, and add a listening entry in the tnsnames.ora file (only 12C needs). The format is as follows: LISTENER_TEST12C = (ADDRESS = (PROTOCOL = TCP) (HOST = oracle12c-test) (PORT = 1522))
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.