创建PDB后有2种方式连接pdb
1、tnsname
[oracle@ora12c ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 22 18:57:31 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
SQL> alter system register;
System altered.
SQL> exit
[oracle@ora12c ~]$ tnsping pdb
TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production on 22-JUL-2013 19:04:26
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
/oracle/12c/db1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = pdborcl12c)))
OK (0 msec)
[oracle@ora12c ~]$ sqlplus awen/oracle@pdb
SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 22 19:01:12 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Last Successful login time: Mon Jul 22 2013 18:58:03 +08:00
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
SQL> show con_name;
CON_NAME
------------------------------
PDBORCL12C
SQL> exit
2、alter session
[oracle@ora12c ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 22 19:00:43 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
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> ALTER SESSION SET CONTAINER = pdborcl12c;
Session altered.
SQL> show con_name;
CON_NAME
------------------------------
PDBORCL12C
SQL> exit
最后修改时间:2021-01-14 10:39:43
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




