• Oracle 12C 创建用户连接pdb


    测试环境:
    
    C:ora12cproduct12.1.0dbhome_1BIN>sqlplus.exe /nolog
    SQL*Plus: Release 12.1.0.1.0 Production on 星期二 9月 20 03:50:23 2016
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    SQL> conn /as sysdba
    已连接。
    SQL> show pdbs;
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             2 PDB$SEED                       READ ONLY  NO
             3 POLESTAR1                      READ WRITE NO
             4 POLESTAR2                      READ WRITE NO
    SQL>
    SQL> alter session set container=polestar1;
    
    会话已更改。
    
    SQL> show pdbs;
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             3 POLESTAR1                      READ WRITE NO
    SQL> 
    SQL> create user polestar identified by polestar;
    
    User created.
    
    SQL> grant dba to polestar;
    
    配置监听listener文件:
    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 =
      (GLOBAL_DBNAME = polestar1) #PDB信息
      (SID_NAME = orcl12c)
      )
    )
    
    
    
    用创建用户连接pdb数据库
    C:ora12cproduct12.1.0dbhome_1BIN>sqlplus polestar/polestar@192.168.0.100:1523/POLESTAR1
    
    SQL*Plus: Release 12.1.0.1.0 Production on 星期二 9月 20 02:48:14 2016
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    连接到:
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt
    ions
    
    SQL> show pdbs;
    
        CON_ID CON_NAME                       OPEN MODE  RESTRICTED
    ---------- ------------------------------ ---------- ----------
             3 POLESTAR1                      READ WRITE NO
    SQL> exit
  • 相关阅读:
    UVA 12545 Bits Equalizer
    UVA 1610 Party Games
    UVA 1149 Bin Packing
    UVA 1607 Gates
    UVA 12627 Erratic Expansion
    UVA10562-Undraw the Trees(递归)
    UVA10129-Play on Words(欧拉路径)
    UVA816-Abbott's Revenge(搜索进阶)
    UVA1103-Ancient Messages(脑洞+dfs)
    UVA839-Not so Mobile
  • 原文地址:https://www.cnblogs.com/polestar/p/5892410.html
Copyright © 2020-2023  润新知