12C 连接方式和 Oracle Easy Connect Naming method
1.12C 连接方式
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 :
2.Oracle Easy Connect Naming method
sqlplus hddtusr/hddtusr_0824@//192.168.27.145:15021/phddtuat
在Oracle 10g中,Oracle还提供了一种称为“Oracle Easy Connect Naming method"
的连接方式。这种方法是对hostnaming method的一种改进,因为hostnaming method
只能使用缺省的1521 port,而Oracle Easy Connect Naming method则可以指定自己的
port.
配置Oracle Easy Connect Naming method基本要求:
1)Oracle 10g Net Serrices必须安装在client端
2)在服务端和客户端必须同时支持TCP/IP协议
3)使用这种连接方式,不支持比较高级的连接符,比如连接池和外部过程 调用(external procedure calls)
语法比较简单:只需要按照如下的格式指定HOST:PORT/SERVICE_NAME就可以了。 但如果通过url连接的话,
需要在@后面增加2个反斜杠"//"
比如:
sqlplus study/study@localhost:1522/study
sqlplus study/study@//10.10.10.1/study
备注: 1)如果使用默认port,可以不指定:PORT部分,直接HOST/SERVICE_NAME
2)在10g中当安装了Oracle Net后,这种连接方式被自动配置
3)对应sqlnet.ora中names.diretory_path中的方法EZCONNECT
NAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT,HOSTNAME)
下面测试一下看看。
C:sqlplus study/study@127.0.0.1:1521/study
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 11 16:52:44 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
SQL> exit 从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 断开
C:sqlplus study/study@127.0.0.1/study
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 11 16:52:51 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 断开
C:
12C 连接方式和 Oracle Easy Connect Naming method的更多相关文章
- using the easy connect naming method 简单连接測试
一直都不明确sqlnet.ora中的NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)是什么意思.今天看到一篇文档,就是登陆选用的方式.做一个測试: tnsname ...
- Oracle 表连接方式分析 .
一 引言 数据仓库技术是目前已知的比较成熟和被广泛采用的解决方案,用于整和电信运营企业内部所有分散的原始业务数据,并通过便捷有效的数据访问手段,可以支持企业内部不同部门,不同需求,不同层次的用户随时获 ...
- c# Oracle 远程连接方式 plsql 连接oracle 11g 64位
1.本地连接字符串: string connect = "Data Source=orcl;user=XXX;password=XXX;Persist Security Info=Tru ...
- java oracle thin 和 oci 连接方式实现多数据库的故障切换
java oracle thin 和 oci 连接方式实现多数据库的故障切换 一.thin方式 该种方式简便易用非经常见. 当中URL为 jdbc:oracle:thin:@(DESCRIPTION= ...
- Java连接Oracle数据库的三种连接方式
背景: 这两天在学习Oracle数据库,这里就总结下自己上课所学的知识,同时记录下来,方便整理当天所学下的知识,也同时方便日后自己查询. SQL语句的话,这里我就不多讲了,感觉和其他的数据库(MySQ ...
- oracle 12c连接pdb
12c中,如何连接pluggable database: 使用默认的service连接pdb,创建pdb之后,在监听中自动添加以pdb为名的service: 用户在cluster中创建service, ...
- [转帖]ORACLE 12C连接时报ORA28040和ORA01017的错误
ORACLE 12C连接时报ORA28040和ORA01017的错误 http://blog.itpub.net/12679300/viewspace-2150667/ 我一直在的处理方式是让更新or ...
- Oracle表的几种连接方式
1,排序 - - 合并连接(Sort Merge Join, SMJ) 2,嵌套循环(Nested Loops, NL) 3,哈希连接(Hash Join, HJ) Join是一种试图将两个表结合在一 ...
- oracle连接方式、创建数据库用户、忘记数据库密码、用户锁定
一.oracle六种连接方式 ①myEclipse中 打开myEclipse,window----show view----Other---输入DB点击DB browser 选中右键New.出现如下页 ...
随机推荐
- iOS模拟器沙盒使用推荐
iOS沙盒路径的查看和使用 1.模拟器沙盒目录文件都在个人用户名文件夹下的一个隐藏文件夹里,中文叫资源库,他的目录其实是Library.因为应用是在沙箱(sandbox)中的,在文件读写权限上受到限制 ...
- C语言_IP地址解析
#include<stdio.h> #include<stdlib.h> void main() { unsigned long input_IP; unsigned int ...
- Linux下编译C代码,出现tan函数报错的情况
undefined reference to `tan' 但是已经包含了头文件 <math.h>了,可还是报错,说是找不到tan 这个问题的原因不是很清楚, 但是网上给出的方案,就是编译的 ...
- 轻松学会文本处理工具之二 linux sed命令
sed命令的语法格式: sed的命令格式: sed [option] 'sed command'filename sed的脚本格式:sed [option] -f 'sed script'fil ...
- leetcode383
已知两个字符串,然后比较一个字符串是否来自另一个字符串,没有顺序要求. 简单题,用一个数组保存前一个字符串的每一个字符出现的次数,然后循环后一个字符串去检查,如果次数不够了,那么就返回false pu ...
- js 条件判断放大字体
<html> <head> <meta charset="utf-8" /> <title></title> <s ...
- nfs服务器的建立
NFS服务器的配置 一.NFS服务器端的配置,即共享发布者 (一)需启动的服务和需安装的软件 1.NFS服务器必须启动两个daemons服务:rpc.nfsd和rpc.mountd rpc.nfs ...
- Django:之传递数据给JS、Ajax和Ajax CSRF认证
Django传递数据给JS 有时候我们想把一个list或者dict传递给javascript,处理后显示到网页上,比如要用js进行可视化到数据. 请注意:如果是不处理,直接显示在网页上,用Django ...
- <marquee>,视频和音频的插入,正则表达式
1.marquee 页面的自动滚动效果,不仅可以移动文字,也可以移动图片表格. <marquee></marquee>之间加内容即可. marquee的属性 1.滚动方向dir ...
- apache: 503
Any connection over Max, will get a 503 Service Temporarily Unavailable. 503出现的场景:压测url时,发现大量的503错误. ...