12C cdb/pdb 配置监听
.
PDB is not an instance, so using SID in the connection string will not work.
When the database is an Oracle Database 12c container database, the client must specify a service name in order to connect to it.
Listener status shows TEST as only a service : 监听服务信息应该如下“
Listener status shows TEST as only a service : Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.oracle.com)(PORT=)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "CDB1" has instance(s).
Instance "cdb1", status READY, has handler(s) for this service...
Service "CDB1XDB" has instance(s).
Instance "cdb1", status READY, has handler(s) for this service...
Service "CLRExtProc" has instance(s).
Instance "CLRExtProc", status UNKNOWN, has handler(s) for this service.
Service "TEST" has instance(s).
Instance "cdb1", status READY, has handler(s) for this service...
The command completed successfully .12C 不推荐静态注册,建议动态注册 .动态注册方法信息如下: To resolve this, make sure that you do the following:
. Backup then edit the listener.ora file to REMOVE the "static" SID_DESC sections for these PDBs
. Make sure the Database knows where to register by explicitly setting the LOCAL_LISTENER to any of the end points (addresses) that this listener is listening on.
Within the PDB issue the following statement:
alter session set container=PDB1;
alter system set listener_networks='(( NAME=listener)(LOCAL_LISTENER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle.com)(PORT=15021)))))' scope=spfile;
. Restart the Listener and db.
Always use Dynamic Services for connections. Do not use SID which is very old and obsolete with respect to how connections should be established or serviced.
This would not apply to certain components such as DG or RMAN which sometimes requires connections via a "Static Service" due to the Database not being in an OPEN (and therefore not "ready") status. See the following: Understanding Static Service Registration
-》 静态注册方法信息如下:
•Use of external procedure calls
•Use of Oracle Heterogeneous Services
•Use of Oracle Data Guard
•Remote database startup from a tool other than Oracle Enterprise Manager Cloud Control
•Connections to Oracle databases earlier than Oracle8i release (8.1) 、配置监听 首先要明确,所有的PDB都使用1个监听,配置多个实际上启动时也只有第1个有意义。 LISTENER=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =ora12c_A)(PORT = ))
) 接下来使用SID_LIST_LISTENER来进行静态注册服务。
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC =
(GLOBAL_DBNAME = ora12c) #该服务是我配置的cdb信息
(SID_NAME = ora12c)
) (SID_DESC =
(GLOBAL_DBNAME = pdborcl)#该服务是我配置的pdb信息
(SID_NAME = ora12c)
)
) ADR_BASE_LISTENER= /opt/oracle 、tnsnames.ora配置
观察发现,在tnsnames中配置pdb跟CDB,即原来11g的配置完全一样。这里SERVICE_NAME = pdborcl使用得是PDB的名字,可以在v$pdbs中查看。 ORA12C=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =ora12c_A)(PORT = ))
)
(CONNECT_DATA =
(SERVICE_NAME = ora12c)
)
) pdborcl=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =ora12c_A)(PORT = ))
)
(CONNECT_DATA =
(SERVICE_NAME = pdborcl)
)
) 、为了保险,检查下sqlnet.ora
NAMES.DIRECTORY_PATH=(TNSNAMES, EZCONNECT)
这一句是为了保证优先使用TNSNAMES解析。
配置完,在PDB启动的情况下(怎么启动这里不多讲了),就可以直接连接到PDB了。(Oracle12c是没有scott用户的,我自己在PDB下面新建的)。
12C cdb/pdb 配置监听的更多相关文章
- Oracle 12c CDB PDB 安装/配置/管理
Oracle安装参考:https://www.cnblogs.com/zhichaoma/p/9288739.html 对于CDB,启动和关闭与之前传统的方式一样,具体语法如下: STARTU ...
- oracle 11g 服务启动时提示1053错误,服务启动不了,重新配置监听解决问题
早上发现oracle服务启动不了了,找了很多资料,没找到有用的.通过重新配置监听解决问题.
- 新建Oracle数据库时,提示使用database control配置数据库时,要求在当前oracle主目录中配置监听程序
新建一个oracle数据库时,当提示使用database control配置数据库时,要求在当前oracle主目录中配置监听程序等字样的时候,问题是那个监听的服务没有启动,解决方法如下: 打开cmd命 ...
- 涂抹Oracle笔记1-创建数据库及配置监听程序
一.安装ORACLE数据库软件及创建实例OLTP:online transaction processing 指那些短事务,高并发,读写频繁的数据库系统.--DB_BLOCK_SIZE通常设置较小.O ...
- spring中配置监听队列的MQ
一.spring中配置监听队列的MQ相关信息注:${}是读取propertites文件的常量,这里忽略.绿色部分配置在接收和发送端都要配置. <bean id="axx" ...
- Oracle 配置监听和本地网络服务
一.配置监听 在oracle的配置和移植工具中打开Net Configuration Assistant,然后点击下一步. 点击下一步,然后输入监听的名称点击下一步 点击下一步后如图 点击下一步如图 ...
- oracle12安装软件后安装数据库,然后需要自己配置监听
oracle12安装软件后安装数据库,然后需要自己配置监听 没想到你是这样的oracle12: 不能同时安装软件和数据库,分别安装之后,\NETWORD\ADMIN\下面竟然没有listener.or ...
- Sprinboot优雅配置监听,并记录所有启动事件
在阅读Springboot启动源码的时候,发现Springboot自动启动listeners是通过uopeizhi文件配置的,本文就是采用Springboot方式自动装入listeners. 项目依赖 ...
- gradle 参数配置监听
说明 gradle提供了对project状态配置监听的接口回调,以方便我们来配置一些Project的配置属性,监听主要分为两大类,一种是通过project进行 回调,一种是通过gradle进行回调,作 ...
随机推荐
- POJ 2305 Basic remains(进制转换)
题目链接:http://poj.org/problem?id=2305 ime Limit: 1000MS Memory Limit: 65536K Total Submissions: 5326 ...
- ubuntu 禁用快捷键
System Settings > Keyboard > Shortcuts 点击要禁用的快捷键,按键盘"Backspace"键,就可以禁用了
- linux 添加定时任务脚本
主要分2个步骤第一步 编写要定时执行的脚本touch mytask.shvi mytask.sh里面写入:#! /bin/bashecho `date` >> /tmp/mytask.l ...
- sql 取2个日期之间的数据
select * from table1 where larq between(to_date('2008-9-3','yyyy-mm-dd')) and (to_date('2008-9-5','y ...
- 【转发】彻底理解 JS 中 this 的指向
为什么要学习this?如果你学过函数式编程,面向对象编程,那你肯定知道干什么用的,如果你没有学过,那么暂时可以不用看这篇文章,当然如果你有兴趣也可以看看,毕竟这是js中必须要掌握的东西. 例子1: f ...
- tomcat 配置SSL
本教程使用 JDK 6 和 Tomcat 7,其他版本类似. 基本步骤: 使用 java 创建一个 keystore 文件 配置 Tomcat 以使用该 keystore 文件 测试 配置应用以便使用 ...
- velocity的宏
velocity中的宏macro的使用当中,由于velocity会将宏加载到tomcat中去,但是如果修改之后再加载的话velocity发现有了相同的宏名称,则不会加载 所以这时候的问题就是,在页面上 ...
- shell 之awk 关联数组高级应用
最近由于数据迁移过,有些用户信息需要再次确认下,也许数据量比较大,但是需要最终确认的比如说是用户ID和其对应的用户积分数,这样就会导致出现文本a(老的数据),文本b(新的数据).比如 这是文本a.tx ...
- windows 环境下搭建django 错误分析总结
最近对于python核心编程学习完后,想进一步学习django的web开发,考虑再三还是决定在本机(win7)上搭建环境. 刚接触难免会出现问题,最大的一个问题是安装完django的包后,在cmd命令 ...
- Openjudge-计算概论(A)-与7无关的数
描述: 一个正整数,如果它能被7整除,或者它的十进制表示法中某一位上的数字为7,则称其为与7相关的数.现求所有小于等于n(n < 100)的与7无关的正整数的平方和. 输入输入为一行,正整数n( ...