In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to use Oracle 12c to plug and unplug the database". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Overview 1. Oracle 12c pluggable database architecture
A new feature introduced in Oracle 12c is Oracle Multitenant, which can create and maintain many pluggable databases in multi-tenant container databases. Oracle Multitenant is an extra component in Oracle Enterprise Edition. However, it is free to use in a pluggable database in all versions of Oracle.
A multi-tenant container database (CDB) is a database that can hold one or more pluggable databases. A container is a collection of data files and metadata in CDB. A pluggable database is a data container that can be easily created by cloning another database. If necessary, you can also transfer pluggable databases from one CDB to another CDB.
All CDB that contain a set of master data files and metadata are root containers. Each CDB also contains a seed container, which is a template for creating other pluggable databases. Each CDB consists of a root container, a seed container, and 0, 1, or more pluggable databases.
2. Container database and pluggable database
1. ORACLE MULTITEMENT CONTAINER DATABASE (CDB), that is, multi-container database
Is a new feature introduced by ORACLE12c, this feature allows multiple databases to be created and maintained in the CDB container database, the database created in CDB is called PDB, each PDB is independent in CDB, and is no different from a normal database when using PDB alone. The main function of the CDB root container database is to hold all the relevant PDB metadata and to manage although there is PDB in CDB.
2. Composition of multi-tenant environment
(1) the ROOT:ROOT container database, which is the root database in the CDB environment, contains the main data dictionary view in the database, which contains the metadata related to the ROOT container and all the PDB information contained in the CDB. It is identified as CDB$ROOT in the CDB environment, and there can be only one ROOT container database in each CDB environment.
(2) PDB$SEED:PDB$SEED is the seed of PDB, which provides a data file, which is identified as PDB$SEED in the PDB environment, and is a template for creating PDB. You can connect to PDB$SEED but cannot perform any transactions, because PDB$SEED is read-only and cannot be modified.
(3) PDBS:PDBS database, in the CDB environment, each PDB exists independently, which is no different from the traditional ORACLE database. Each PDB has its own data file and OBJECTS. The only difference is that PDB can be inserted into the PDB and pulled out from the CDB. Users are not aware of the root container and other PDB when they connect to the PDB.
2. Experimental environment host operating system IP address database version OracleCentOS 7192.168.100.135oracle 12c enter Oracle [root @ HOSTNAMEoracle ~] # su-oracle [oracle@HOSTNAMEoracle ~] $sqlplus / as sysdba
3. CDB and PDB operations to view the current container SQL > show con_name
Query all containers of the database SQL > show pdbs
Change to orclpdb,PDB Container SQL > alter pluggable database orclpdb open; / / modify pluggable Library orclpdb Open status SQL > alter session set container=orclpdb; / / CDB switch session to PDB SQL > show con_name / / View the current container
SQL > shutdown immediate / / shut down the pluggable database in PBD. The pluggable database is closed. SQL > startup / / turn off pluggable database in PBD pluggable database is open.
Change back to CDB container SQL > alter session set container=cdb$root; / / switch mode to CDBSQL > show con_name / / View
This is the end of the introduction of "how to use Oracle 12c to plug and unplug the database". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.