Problem of CDB User Creation and tablespace allocation in Oracle 12c database, 12 ccdb

Source: Internet
Author: User

Problem of CDB User Creation and tablespace allocation in Oracle 12c database, 12 ccdb

In Oracle12c, the concept of database plug-in is added, that is, PDB, which allows a database container (CDB) to carry multiple plug-ins.

Database pulling (PDB ). CDB is called ContainerDatabase, and Chinese translation is a database container. PDB is called Plugga.

BleDatabase. Before ORACLE 12C, the instance has one-to-one or many-to-one relationship with the database.

(RAC): An instance can only be associated with one database, and the database can be loaded by multiple instances. Instances and databases

It cannot be a one-to-many relationship. After entering ORACLE 12C, the relationship between the instance and the database can be one-to-many. Below is the official

This document describes the relationship between CDB and PDB.



It does bring many benefits to programmers for PDB, but it also brings some differences to managers. First, create a container Database

When a new user allocates a table space, it must do so without PDB or when PDB and CDB have the same tablespace. Otherwise

An error is reported. If the table space is allocated to the CDB user when the PDB and CDB have the same tablespace, the CDB tablespace is allocated.

The tablespace for the user's PDB is not affected. In addition, CDB users must start with 'C # '. Otherwise, they cannot be created. However

I have read an article at http://blog.csdn.net/liou825/article/details/10054589. I will create it based on my other documents.

After that, it was created successfully and assigned various permissions to him. However, I cannot see me in Oracle Enterprise Manager.

The created role cannot be seen in the SQL-plus window. You can only Log On As A dba when logging on.

I don't know if it's my computer problem or not. Users starting with 'C #'


Create the user c # admin. the user does not grant the dba permission to connect to the user. This is to create a user without PDB

"C # ADMIN" and allocate the "USERS" tablespace. We connect to the database again as a system, and then in the number of containers

Create a tablespace test in the data database (CDB). Note that the tablespace test is not found in the plug-in Database (PDB,

Create a new user c # test in the container database (CDB) and assign the test tablespace to it as its default tablespace.

. Because no tablespace exists in PDBORCL, an error is returned. As shown in:



---- Switch to PDB "PDBORCL"

SQL> alter sessionset container = pdborcl;

The session has been changed.

SQL> createtablespace test -- create a tablespace test

2 datafile 'f: \ oracledata \ test. dbf'

3 size1m autoextend on;

The tablespace has been created.

-- Since table space test is available in both CDB and PDB, creating users and allocating table null

.


SQL> createuser c # test

2 identified by test

3 default tablespace test

4 temporary tablespace temp;

The user has been created.

SQL>


In Oracle12c, the concept of database plug-in is added, that is, PDB, which allows a database container (CDB) to host multiple pluggable databases (PDB ). CDB is called ContainerDatabase, and the Chinese translation is a database container. PDB is called PluggableDatabase, 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.

It does bring many benefits to programmers for PDB, but it also brings some differences to managers.

First, the container database must create a new user and allocate table space without PDB or when the PDB and CDB have the same tablespace. Otherwise, an error is reported. If the table space is allocated to the CDB user when the PDB and CDB have the same tablespace, The tablespace allocated to the user's PDB is not affected. In addition, CDB users must start with 'C # '. Otherwise, they cannot be created. However, I saw an article on the Internet, I can't see my own role under the Enterprise Manager address, nor can I see the user I just created in the SQL-plus window. I can only Log On As A dba at login, I don't know if it's my computer problem or not. Users starting with 'C #'

Create the user c # admin. the user does not grant the dba permission to connect to the user.

This is to create the user "C # ADMIN" without PDB and allocate the "USERS" tablespace.

We connect to the database again as a system, and then create the tablespace test in the container database (CDB). Note that there is no test tablespace in the plug-in Database (PDB, create a new user c # test in the container database (CDB) and assign the test tablespace to it as its default tablespace. Because no tablespace exists in PDBORCL, an error is returned. As shown in:

---- Switch to PDB "PDBORCL"

SQL> alter sessionset container = pdborcl;

The session has been changed.

SQL> createtablespace test -- create a tablespace test

2 datafile 'f: \ oracledata \ test. dbf'

3 size1m autoextend on;

The tablespace has been created.

-- Since table space test is available in both CDB and PDB, the user is created and the table space is allocated successfully.

SQL> createuser c # test

2 identified by test

3 default tablespace test

4 temporary tablespace temp;

The user has been created.

SQL>

Related Article

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.