test Environment:C:\ora12c\product\12.1.0\dbhome_1\bin>sqlplus.exe/nologsql*plus:release 12.1.0.1.0 Production on Tuesday September 20 03:50:23 2016Copyright (c) 1982, Oracle. All rights reserved. Sql> Conn/as Sysdba is connected. Sql> show PDBs; con_id con_name OPEN MODE RESTRICTED------------------------------------------------------------ 2 Pdb$seed Read Only No 3 POLESTAR1 READ WRITE NO 4 P OLESTAR2 READ WRITE nosql>sql> alter session set CONTAINER=POLESTAR1, session changed. Sql> show PDBs; con_id con_name OPEN MODE RESTRICTED------------------------------------------------------------ 3 POLESTAR1 READ WRITE nosql> sql> Create user Polestar identified by Polestar; User created. Sql> Grant DBA to Polestar;To Configure the Listener listener file:LISTENER = (Description_list = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.100) (PORT = 1523)) (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1523)) ) sid_list_listener= (sid_list= (Sid_desc = (Global_dbname = orcl12c) #CDB信息 (sid_name = orcl12c)) (Sid_desc = (GLO Bal_dbname = polestar1) #PDB信息 (sid_name = orcl12c)))connect to the PDB database with create userC:\ora12c\product\12.1.0\dbhome_1\bin>sqlplus Polestar/[email Protected]:1523/polestar1sql*plus:release 12.1.0.1.0 Production on Tuesday September 02:48:14 2016Copyright (c) 1982, D, Oracle. All rights reserved. Connect to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit productionwith the partitioning, OLAP, Advanced Analytics and Real application testing optionssql> show PDBs; con_id con_name OPEN MODE RESTRICTED------------------------------------------------------------ 3 POLESTAR1 READ WRITE nosql> exit
Oracle 12C Create user connection PDB