Create local users in Oracle 12c

1. One Way
Step 1.

sqlplus sys/password@127.0.0.1:1522/pdborcl as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Thu Jul 18 13:39:23 2013
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


Step 2.

SQL> create user test1 identified by test;
User created.
SQL> grant connect to test1;
Grant succeeded.
SQL> quit

Step 3.
C:\>sqlplus test1/test@127.0.0.1:1522/pdborcl
SQL*Plus: Release 12.1.0.1.0 Production on Thu Jul 18 13:36:45 2013
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options




2. Other way

SQL>  col name format a20;
SQL> SELECT NAME, PDB FROM V$SERVICES  ORDER BY PDB, NAME;
 NAME                 PDB
-------------------- ------------------------------
SYS$BACKGROUND       CDB$ROOT
SYS$USERS                       CDB$ROOT
orcl12c1                               CDB$ROOT
orcl12c1XDB                      CDB$ROOT
pdborcl                                PDBORCL


SQL> alter session set container=pdborcl;
Session altered.
SQL> select sys_context('userenv','con_name') as cur_container from dual;

CUR_CONTAINER
--------------------------------------------------------------------------
PDBORCL

SQL> create user mvdemo12 identified by mvdemo12;

User created.


Ref:
--. d b form.com/html/2013/2098.html/comment-page-1#comment-81033
--d ocs. oracle.com/cd/E16655_01/server.121/e17633/cdblogic.htm#CNCPT89259
--h alimdba.blogspot.ca/2013/07/ora-65096-invalid-common-user-or-role .h t m l

评论

此博客中的热门博文

XML, XSL, HTML

Input in element.eleme.io

Data URI是由RFC 2397 ACE