Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle 12c users create     - Getting CentOS Learning Notes (Linux)

- NFS-based services and service utilization Corosync DRBD high availability cluster configuration, respectively (Server)

- Seven kinds of NIC binding mode Detail (Linux)

- VMware virtual machine Ubuntu install arm-linux-gcc cross-compiler environment (Linux)

- React Getting Started Tutorial (Linux)

- Ubuntu 64-bit installation Adobe Reader 9.5.5 (Linux)

- Ubuntu way of decompressing files (Linux)

- Binary search and modification (Programming)

- Storm basic framework for analysis (Programming)

- FreeBSD install Gnome 3 Desktop (Linux)

- To achieve Linux Security (Linux)

- wget command examples (Linux)

- To install Internet security firewall Raiders (Linux)

- Difference LVS three scheduling modes (Server)

- C ++ containers (Programming)

- Nagios (centreon) monitoring LVS (Server)

- Four levels of intrusion on Linux server and counter-measures (Linux)

- How to merge two pictures in Cacti (Linux)

- Android Studio utility plug organize, create sharp artifact (Programming)

- Embedded Linux to solve the problem in the time zone (Linux)

 
         
  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:      
 
- pga_aggregate_target and _pga_max_size can not use absolute limit actual PGA (Database)
- Hadoop 1 and 2.x installation notes (Server)
- Oracle10g 64-bit installation solution in Windows 2008 Server R2 (Database)
- Ubuntu 14.04 VirtualBox can not start solution (Linux)
- Go performed using iOS and Android programming (Programming)
- VMware Workstation + Ubuntu 10.04 Download the Android 2.2 source code (Linux)
- Python KNN algorithm of actual realization (Programming)
- Android development, may cause a memory leak problem (Programming)
- After SSH change the default port, how to use Git (Linux)
- How to install MySQL on Linux Dock (Database)
- Windows environment Android Studio v1.0 Installation Guide (Linux)
- Definition Format Oracle basis of various statements (Database)
- Installation and Configuration OpenVPN server and client on Ubuntu 15.04 (Server)
- Linux productivity tools and tips (Linux)
- Linux system started to learn: how to solve the xxx is not in the sudoers file error (Linux)
- Linux (RHEL5) general optimization system security (Linux)
- How to create a secure and easy to remember password (Linux)
- How to set cache valid time in Apache (Server)
- Drawing from the Android source code analysis View (Programming)
- Four Methods of Self - Learning Linux (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.