Oracle12C Database Management Summary

Source: Internet
Author: User
Oracle12C introduces new features of CDB and PDB. In the multi-tenant user environment (MultitenantEnvironment) introduced by ORACLE12C, a database container (

Oracle 12C introduces new features of CDB and PDB. In the multi-tenant user Environment (Multitenant Environment) introduced by ORACLE 12C, a database container (

Summary of Oracle 12c Database Management

A new 12c rac environment was installed, and users and tables were created. 12c made some changes to database management, searched some articles online, and summarized the changes to facilitate future use.

Oracle 12C introduces new features of CDB and PDB. In the multi-tenant user Environment (Multitenant Environment) introduced by ORACLE 12C, a database container (CDB) is allowed) host multiple pluggable databases (PDB ). CDB is called the Container Database, and the Chinese translation is a Database Container. PDB is called the Pluggable Database, which can be used to plug and unplug the Database. Before ORACLE 12C, an instance and a database have one-to-one or many-to-one relationship (RAC): that is, an instance can only be associated with one database, and the database can be loaded by multiple instances. The relationship between instances and databases cannot be one-to-many. After entering ORACLE 12C, the relationship between the instance and the database can be one-to-many. The following is the relationship between CDB and PDB in the official documents.

In fact, if you are familiar with SQL server, does this CDB and PDB feel the same as the single-instance multi-database architecture of SQL SERVER. For example, PDB $ SEED can be regarded as a system database such as master and msdb, and PDBS can be regarded as a user-created database. The concept of pluggable is the same as that of separating and attaching user databases in SQL SERVER. It seems that ORACLE has also copied the concept of an SQL SERVER, but it just changed its packaging.

Migration from 32-bit to 64-bit for a single Oracle instance

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Oracle RAC 11.2 (12C) correctly closes the order

CDB Components (Components of a CDB)

A cdb database container contains the following components:

ROOT component

ROOT, also known as CDB $ ROOT, stores metadata and Common users provided by ORACLE. An example of metadata is the source code of the PL/SQL package provided by ORACLE ,, common User is a User that exists in each container.

SEED component

Seed is also called PDB $ SEED. This is the template for creating a PDBS database. You cannot add or modify an object in Seed. One CDB can have only one Seed. This sentiment is very similar to the model database in SQL SERVER.

PDBS

There can be one or more PDBS in CDB. PDBS is backward compatible and can be used to operate PDBS as in the database. Most common operations are described here.

Each of these components can be called a container. Therefore, ROOT is a container, Seed is a container, and each PDB is a container. Each container has a unique ID and name in CDB.

1) connect to the CDB Database

Connecting to the CDB database container is very simple, just like connecting to the database

[Oracle @ get-orasvr02 ~] $ Sqlplus/as sysdba
SQL * Plus: Release 12.1.0.1.0 Production on Sun Oct 20 23:41:36 2013 Copyright (c) 1982,201 3, Oracle.
All rights reserved. Connected to an idle instance.
SQL>
[Oracle @ getorasvr02 ~] $ Sqlplus sys/password as sysdba
SQL * Plus: Release 12.1.0.1.0 Production on Sun Oct 20 23:43:17 2013 Copyright (c) 1982,201 3, Oracle.
All rights reserved. Connected to an idle instance.
SQL>

2) check whether the database is CDB

SQL> select name, decode (cdb, 'yes', 'multitenant Option enabled', 'regular 12c Database: ') "Multitenant Option", open_mode, con_id from v $ database;
NAME Multitenant Option OPEN_MODE CON_ID
--------------------------------------------------------------------
Epps Multitenant Option enabled read write 0

YES indicates that the database is CDB, if it is NO indicates that it is a NO-CDB (normal database)

3) view the current Container (Container)

3.1

SQL> show con_name
CON_NAME
------------------------------
CDB $ ROOT
SQL> select sys_context ('userenv', 'Con _ name') "Container DB" from dual;
Container DB
----------------------------------------------------
CDB $ ROOT
SQL>

4) view the PDBS information in the CDB container

Check the number of pluggable databases in CDB

SQL> select con_id, dbid, guid, name, open_mode from v $ pdbs;
CON_ID dbid guid name OPEN_MODE
-------------------------------------------------------------------------------------------
2 4071321146 E89E8DA2866E3157E043DE07A8C09238 PDB $ seed read only 3 1930201447 E89E9418B882350CE043DE07A8C092B6 PDBEPPS MOUNTED
SQL>

5) Start the PDB Database

Method 1:

SQL> alter pluggable database PDBEPPS open;
Pluggable database altered.
SQL> select con_id, dbid, guid, name, open_mode from v $ pdbs;
CON_ID dbid guid name OPEN_MODE
--------------------------------------------------------------------------------------------
2 4071321146 E89E8DA2866E3157E043DE07A8C09238 PDB $ seed read only 3 1930201447 E89E9418B882350CE043DE07A8C092B6 PDBEPPS READ WRITE

Method 2:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.