"Translate from MOS article" to build users in Oracle 12c-avoid ORA-65096 or ORA-65049 errors ____oracle

Source: Internet
Author: User

Create a user in 12c--avoid ORA-65096 or ORA-65049 errors

From:
Creating users in 12c-avoiding ORA-65096 or ORA-65049. (Document ID 1572404.1)


Apply to:
Oracle database-enterprise edition-version 12.1.0.1 and later
Information in this document applies to any platform.
When you use the previous version of SQL syntax to create user in 12c, if you use pluggable Database,an ORA-65096 or ORA-65049 encounter.

Goal:
A new user is created in the pluggable database.

Solution:
First, determine whether the new user is common_users or local_users. Sqlplus/as SYSDBA

For common_users, user names must be in C # #开头

Sql>create user Scott identified by Tiger;

Ora-65096:invalid common user or role name

sql>create User C # #scott identified by Tiger;

User created.


V$services will display the available PDB

Sql>select PDB from V$services;

PDB

--------------------------

pdborcl

cdb$root

cdb$root

cdb$root

cdb$root show

con _name

con_name

-----------------

cdb$root

If you create a local user for a pluggable database, you must select the pluggable database before you establish the user.

Sql> alter session set CONTAINER=PDBORCL;
Sql> show Con_name

con_name
-----------------
pdborcl

sql>create user scott1 by  Tiger1;

User created.


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.