Oracle 12C 创建用户连接pdb

测试环境:

C:\ora12c\product\12.1.0\dbhome_1\BIN>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:\ora12c\product\12.1.0\dbhome_1\BIN>sqlplus polestar/[email protected]: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
时间: 2024-10-06 09:32:02

Oracle 12C 创建用户连接pdb的相关文章

Oracle 12c创建用户是出现“ORA-65096: invalid common user or role name”的错误

这篇文章主要介绍CDB和PDB的基本管理,资料来源oracle官方. 基本概念: Multitenant Environment:多租户环境 CDB(Container Database):数据库容器 PD(Pluggable Database):可插拔数据库 CDB与PDB关系图 COMMON USERS(普通用户):经常建立在CDB层,用户名以C##或c##开头: LOCAL USERS(本地用户):仅建立在PDB层,建立的时候得指定CONTAINER. 在oracle 12c中,使用了一个

Oracle 12c JDBC方式连接PDB数据库

1.配置监听 这里假定CDB数据库名为ORCL,PDB在CDB下面名称为PDBORCLlistener.ora添加(#后面为注释,不要添加进去) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (SID_NAME = ORCL) #这里是SID名 ) (SID_DESC = (GLOBAL_DBNAME = PDBORCL)#这里是PDB数据库名 (SID_NAME = ORCL) #这里是SID名 ) ) t

oracle 12c 创建用户

--确认当前cdb SQL> select name,cdb from v$database;    NAME     CDB ------------------ ------ ORCL     YES --查询当前pdb基本信息 col pdb_name for a30 select pdb_id,pdb_name,dbid,status,creation_scn from dba_pdbs; select con_id,dbid,NAME,OPEN_MODE from v$pdbs; 创建

2.oracle 12c 创建-访问-关闭-删除PDB

1.创建PDB SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/ora12c/system01.dbf /u01/app/oracle/oradata/ora12c/pdbseed/system01.dbf /u01/app/oracle/oradata/or

6.14 12c创建用户 ,授权,创建pdb

12c创建用户create user c##lyoo2 identified by oracle;12c用户授权SQL> grant resource,connect to c##abiao12c;SQL> show parameter db_create创建pdbSQL> create pluggable database pdb_songcc admin user songcc identified by oracle;切换pdbSQL> alter pluggable dat

oracle 12c 创建PDB用户即Local User (PDB与CDB)

Oracle 12C用户创建与表空间分配 数据库安装完成后,首先用系统用户链接数据库容器(CDB), 在数据库容器(CDB)中创建表空间‘imei’ SQL>create tablespace iemi datafile'E:\Oracle_DB\ cdb_iemi.dbf'size 10240m autoextend on next 200m; 表空间已创建. 接下来在Oracle 12C数据库中创建用户时会报ORA-65096错误. SQL> create user imei identi

Oracle 12c 创建表空间和用户并为用户授权

创建临时表空间 create temporary tablespace test_temptempfile 'D:\app\orcl\oradata\temproryTestUserSpace\test_temp1.dbf'size 10m autoextendon next 10m maxsize 50m extent management local; 创建数据表空间create tablespace test_data loggingdatafile 'D:\app\orcl\oradat

12c通过service 连接pdb

<roidb01:cdb1:/home/oracle>$lsnrctl service LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 06-MAR-2018 06:52:45 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl)(PORT=1521)))

oracle如何创建用户并赋予权限

本文将从用户创建讲起,特别讲述Oracle授予用户权限的一个实例,希望对大家了解Oracle授予用户权限有所帮助. 这两天在测数据库同步软件的时候,需要在Oracle里创建一个用户名和密码均为SYSDATA的用户,找了找资料,创建成功,现将Oracle中用户的创建和授予命令摘录下来:  1.Linux 下Oracle的启动 以Oracle身份登录 启动lsnrctl start 登录sqplus /nolog 连接数据库connect/assysdba 启动数据库startup 关闭数据库shu