Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle 12c users create     - To install Gitolite in Ubuntu / Fedora / CentOS (Linux)

- C ++ multithreading and critical resource instance (Programming)

- Linux operating system boot process analysis (Linux)

- Node.js v4.0.0 installation configuration on Ubuntu 14.04 / 15.04 (Linux)

- Java development environment to build under Ubuntu (Linux)

- OpenJDK7 source compiler installation on CentOS 6.5 (Linux)

- Oracle 12C truncate table cascade (Database)

- Expert advice: Do not use the computer security IE browser (Linux)

- MySQL use benchmarking tool sysbench (Database)

- Based Corosync + Pacemaker + DRBD + LNMP Web server to achieve high availability cluster (Server)

- Execute command sentence can result in equipment permanently bricked in Linux laptop (Linux)

- Linux System Getting Started Learning: The Linux ac command (Linux)

- Ubuntu 14.10 used ifconfig commands to manage your network configuration (Linux)

- Use PDFBox processing PDF documents (Linux)

- Node.js development environment deployment (Server)

- Git Rebase Tutorial: Using Git Rebase turn back the clock (Linux)

- Linux / Unix: chroot command examples to explain (Linux)

- How to install Ubuntu applications Device 7 (Linux)

- CentOS6 5 source compiler installation Hadoop2.5.1 (Server)

- Depth Java Singleton (Programming)

 
         
  Oracle 12c users create
     
  Add Date : 2018-11-21      
         
       
         
  Oracle 12c can be divided into public accounts and local user accounts, there are accounts created in the CDB, the PDB can give all users, local accounts are accounts that can be created in the PDB

Create a common user
 alter session set container = CDB $ ROOT;
create USER C ## u02 identified by oracle container = all;
Create a local user
 alter session set container = pdb4;
create USER u01 identified by oracle container = current;

SQL> SELECT USERNAME, CON_ID, USER_ID FROM CDB_USERS WHERE USERNAME = 'U01';
USERNAME CON_ID USER_ID
------------------------------ ---------- ----------
U01 4 105

Create a test account in the CDB
1 Create an account must begin with C ## in the CDB
 alter session set container = CDB $ ROOT;
SQL> create user orcl identified by a;
create user orcl identified by a
            *
ERROR at line 1:
ORA-65096: invalid common user or role name

SQL> create user p ## orcl identified by a;
create user p ## orcl identified by a
            *
ERROR at line 1:
ORA-65096: invalid common user or role name

SQL> create user c ## a identified by a;
User created.


SQL> select username from dba_users where username like 'C ##%';
USERNAME
-------------------------------------------------- ------------------------------
C ## A

--- Description Local users can not begin with C ##
 alter session set container = pdb4;
SQL> create user c ## B identified by B;
 create user c ## B identified by B
            *
ERROR at line 1:
ORA-65094: invalid local user or role name

SQL> SELECT USERNAME, CON_ID, USER_ID FROM CDB_USERS WHERE USERNAME like 'C ##%' ORDER BY USERNAME;
USERNAME CON_ID USER_ID
------------------------------ ---------- ----------
C ## BOSWLL 4 103
C ## BOSWLL 3 110
C ## BOSWLL 1 102
C ## BOSWLL 5 103
C ## U02 4 106
C ## U02 5 104
C ## U02 1 103
C ## U02 3 111

 When --- create public users can not create pdb, you must create a public user in the cdb
 SQL> alter session set container = pdb4;
Session altered.

SQL> create USER C ## u02 identified by oracle container = all;
create USER C ## u02 identified by oracle container = all
                                *
ERROR at line 1:

ORA-65050: Common DDLs only allowed in CDB $ ROOT

to sum up:
1 public users must, local users start with a letter, the user can not begin only in the beginning of the C ## to C ##
2 Create a public user, must be in the CDB $ ROOT
3 If there is already a user or role in the PDB, in the CDB can not create the same account name or role
     
         
       
         
  More:      
 
- How to Install Foreman under Ubuntu (Server)
- PHP call a Python program (Programming)
- Examples of testing and installation Mesos on CentOS (Linux)
- Recover accidentally deleted Nginx logs (Server)
- Java in the inverter and covariance (Programming)
- Linux dd command applies amplification SWAP partition (Linux)
- How to modify the Ubuntu terminal user name changed to red color (Linux)
- Why HBase need to build SQL engine layer (Database)
- Python developer of time-saving method (Programming)
- CentOS 7 hard disk expansion toss record (Linux)
- imp / exp Oracle Database import and export commands (Database)
- Bad name two variables (Linux)
- JavaScript function definition mode (Programming)
- To establish a secure and reliable Linux operating system (Linux)
- View and modify Linux machine name (Linux)
- Build RubyMine + Ruby On Rails + MySQL development environment under Windows (Server)
- How to back up Debian system backupninja (Linux)
- Linux centos rm directory does not prompt (Linux)
- Ubuntu will be written in a command file, executable file, source command (Linux)
- C ++ type conversion and RTTI (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.