C:\Users\LEI>sqlplus sys/dwh as sysdba;
SQL*Plus: Release12.1.0.2.0 Production on 星期四 12月 3110:11:292015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
连接到:
Oracle Database 12c Enterprise Edition Release12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
//创建公用用户(此时该用户连接在cdb容器根目录root中)SQL> create user c##test identified by test;
//进入到pdb容器
SQL> alter session set container=PDBORCL;
会话已更改。
SQL> show con_name;
CON_NAME
------------------------------
PDBORCL
1
2
3
4
5
6
7
8
9
10
11
4.创建真正的用户
SQL> startup;
插接式数据库已打开。//创建一个本地用户(pdb内的用户)
SQL> create user test identified by test default tablespace users temporary tablespace temp;
用户已创建。
//给用户授权
SQL> grant create user,drop user,alter user,create any view,connect,resource,dba,create session,create any sequenceto test ;
授权成功。
SQL>
Oracle12C用户创建、授权、登录1.以系统用户登录C:\Users\LEI>sqlplus sys/dwh as sysdba;SQL*Plus: Release 12.1.0.2.0 Production on 星期四 12月 31 10:11:29 2015Copyright (c) 1982, 2014, Oracle. All rights reserved.