In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
On the left above is my personal Wechat. For further communication, please add Wechat. On the right is my official account "Openstack Private Cloud". If you are interested, please follow us.
After setting up the oracle12C RAC environment on the PVE environment (please refer to the blog post "installing oracle12C rac clusters for ProxmoxVE") and installing using CDB and PDB (please refer to the blog article "installing oracle12C databases (CDB and PDB) for ProxmoxVE"), go further and install a second CDB in this RAC environment to verify complex applications using multiple CDB and PDB in a RAC environment.
Log in to the system using your oracle account, and then execute dbca to install:
Select the Chinese character set here:
Log in to the grid account and run crsctl stat res-t to check the rac status to see if the newly created cdb2 database has been started successfully and open:
Grid@oraclenode2 ~] $crsctl stat res-t----Name Target State Server State details-- -Local Resources-- -- ora.ASMNET1LSNR_ASM.lsnr ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLEora.DATA.dg ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE Oraclenode2 STABLEora.GRID.dg ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLEora.LISTENER.lsnr ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLEora.RECOVERY.dg ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLEora.SYSTEM.dg ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLEora.chad ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLEora.net1.network ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLEora.ons ONLINE ONLINE oraclenode1 STABLE ONLINE ONLINE oraclenode2 STABLE- -- Cluster Resources----ora.LISTENER_ SCAN1.lsnr 1 ONLINE ONLINE oraclenode2 STABLEora.MGMTLSNR 1 ONLINE ONLINE oraclenode2 169.254.210.79 192.1 68.170.33 STABLEora.asm 1 ONLINE ONLINE oraclenode2 Started,STABLE 2 ONLINE OFFLINE STABLE 3 ONLINE ONLINE oraclenode1 Started,STABLEora.cdb2.db 1 ONLINE ONLINE oraclenode1 Open HOME=/data/orac le/app/oracle/produc t/12.2.0.1/db_1 STAB LE 2 ONLINE ONLINE oraclenode2 Open HOME=/data/orac le/app/oracle/produc t/12.2.0.1/db_1 STAB LEora.cvu 1 ONLINE ONLINE oraclenode2 STABLEora.mgmtdb 1 ONLINE ONLINE oraclenode2 Open STABLEora.oraclenode1.vip 1 ONLINE ONLINE oraclenode1 STABLEora.oraclenode2.vip 1 ONLINE ONLINE oraclenode2 STABLEora.orcl.db 1 ONLINE ONLINE oraclenode1 Open HOME=/data/orac le/app/oracle/produc t/12.2.0.1/db_1 STAB LE 2 ONLINE ONLINE oraclenode2 Open HOME=/data/orac le/app/oracle/produc t/12.2.0.1/db_1 STAB LEora.qosmserver 1 ONLINE ONLINE oraclenode2 STABLEora.scan1.vip 1 ONLINE ONLINE oraclenode2 STABLE -
As you can see above, the cdb2 database has also been up. That is to say, this RAC cluster runs two CDB databases at the same time, one is orcl database, the other is cdb2 database, which can run multiple CDB databases at the same time, and multiple PDB databases can be run in each CDB, so that more complex business scenarios can be realized.
Multiple CDB database switching:
With multiple CDB, how can I switch between multiple CDB? This is achieved by switching the environment variables ORACLE_UNQNAME and ORACLE_SID:
# now the environment variable points to orcl database CDB: [oracle@oraclenode1 ~] $[oracle@oraclenode1 ~] $env | grep ORA ORACLE_UNQNAME=orclORACLE_SID=orcldb11ORACLE_BASE=/data/oracle/app/oracleORACLE_HOSTNAME=oraclenode1ORACLE_TERM=xtermORACLE_HOME=/data/oracle/app/oracle/product/12.2.0.1/db_1 [oracle@oraclenode1 ~] $sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 17 09:48:24 2019Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit ProductionSQL > show con_name;CON_NAME--CDB$ROOTSQL > quitDisconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production [oracle@oraclenode1 ~] $# now change the environment variables ORACLE_UNQNAME and ORACLE_SID to point to cdb2. # Note that ORACLE_SID needs to point to your rac database instance. I have two SID here, one is CDB21 and the other is CDB22, which need to be set according to the actual environment: [oracle@oraclenode1 ~] $export ORACLE_UNQNAME= cdb2 [oracle @ oraclenode1 ~] $ORACLE_SID=cdb21 [oracle@oraclenode1 ~] $sqlplus / as sysdbaSQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 17 09:49:17 2019Copyright (c) 1982, 2016, Oracle. All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit ProductionSQL > show con_name;CON_NAME--CDB$ROOTSQL > select con_id, dbid, guid, name, open_mode from v$pdbs CON_ID DBID GUID- NAME -OPEN_MODE- 2 1189951802 7F93FC28620574A8E0532001A8C0A08APDB$SEEDREAD ONLY 3 3521891460 7F9433F3F69A1333E0532101A8C089D8CDB2_PDB1READ WRITE CON_ID DBID GUID--NAME- -OPEN_MODE-SQL > quitDisconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production [oracle@oraclenode1 ~] $
Summary:
Multiple CDB can be created on the oracle12C database, multiple PDB can be created within each CDB, and managing multiple CDB can be switched by switching different SID environment variables. In the case of a RAC environment, the database instance runs on all RAC nodes at the same time.
Multiple CDB can use asm disk groups flexibly, multiple CDB can share asm disk groups, or you can use disk groups separately, which is very flexible.
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.