Oracle 12c Create user is "ora-65096:invalid common user or role name" error-Calvinr____oracle

Source: Internet
Author: User
Tags informix unique id

This article mainly introduces the basic management of CDB and PDB, the source Oracle official.

Basic concepts:

Multitenant Environment: Multi-tenant environment

CDB (Container db): Database Container

PD (Pluggable database): pluggable databases

CDB and PDB diagram

COMMON users (ordinary users): often built on the CDB layer, the user name in C # #或c # #开头;

Local Users: Only the PDB layer is established and the container is specified.

In Oracle 12c, the concept of a container (container) is used, let's take a look at the official introduction to it, in order to retain the original meaning, here in English instead of translation.

The data dictionary in each container in a CDB are separate, and the current container is the container whose data Dictiona Ry is used to name resolution and for privilege authorization. The current container can is the root or a PDB. Each session has exactly one of the container at any point in time, but it are possible for a sessions to switch from one C Ontainer to another.

Each container has a unique ID and name in a CDB. can use the con_id and Con_name parameters in the USERENV namespace to determine the current container ID and NAME wit H the Sys_context function.

1, view the Oracle 12c version

Sql> select * from V$version;

Sql>select sys_context (' USERENV ', ' Con_name ') from dual; 
Sys_context (' USERENV ', ' con_name ') 
------------------------------------------------------------------------ ----------------------------
 Cdb$root

2. We can specify other containers through alter session SET CONTAINER

Sql>select Con_id,dbid,name,open_mode from V$pdbs;

3, the PDB open:

sql> Alter pluggable database PDBORCL open;

4, view the container

Sql>select Con_id,dbid,name,open_mode from V$pdbs;

5. Switch containers to PDB

Sql> alter session set CONTAINER=PDBORCL;

6, view the current use of containers

Sql>select sys_context (' USERENV ', ' Con_name ') from dual;

7. Create user

Sql>create user Informix identified by GMGL;

Sql>grant dba to Informix;

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.