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 :

Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.oracle.com)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc))) Services Summary...
Service "CDB1" has 1 instance(s).
Instance "cdb1", status READY, has 1 handler(s) for this service... Service "CDB1XDB" has 1 instance(s).
Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service.
Service "TEST" has 1 instance(s). I
nstance "cdb1", status READY, has 1 handler(s) for this service... The command completed successfully 

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的更多相关文章

  1. using the easy connect naming method 简单连接測试

    一直都不明确sqlnet.ora中的NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)是什么意思.今天看到一篇文档,就是登陆选用的方式.做一个測试: tnsname ...

  2. Oracle 表连接方式分析 .

    一 引言 数据仓库技术是目前已知的比较成熟和被广泛采用的解决方案,用于整和电信运营企业内部所有分散的原始业务数据,并通过便捷有效的数据访问手段,可以支持企业内部不同部门,不同需求,不同层次的用户随时获 ...

  3. c# Oracle 远程连接方式 plsql 连接oracle 11g 64位

    1.本地连接字符串:   string connect = "Data Source=orcl;user=XXX;password=XXX;Persist Security Info=Tru ...

  4. java oracle thin 和 oci 连接方式实现多数据库的故障切换

    java oracle thin 和 oci 连接方式实现多数据库的故障切换 一.thin方式 该种方式简便易用非经常见. 当中URL为 jdbc:oracle:thin:@(DESCRIPTION= ...

  5. Java连接Oracle数据库的三种连接方式

    背景: 这两天在学习Oracle数据库,这里就总结下自己上课所学的知识,同时记录下来,方便整理当天所学下的知识,也同时方便日后自己查询. SQL语句的话,这里我就不多讲了,感觉和其他的数据库(MySQ ...

  6. oracle 12c连接pdb

    12c中,如何连接pluggable database: 使用默认的service连接pdb,创建pdb之后,在监听中自动添加以pdb为名的service: 用户在cluster中创建service, ...

  7. [转帖]ORACLE 12C连接时报ORA28040和ORA01017的错误

    ORACLE 12C连接时报ORA28040和ORA01017的错误 http://blog.itpub.net/12679300/viewspace-2150667/ 我一直在的处理方式是让更新or ...

  8. Oracle表的几种连接方式

    1,排序 - - 合并连接(Sort Merge Join, SMJ) 2,嵌套循环(Nested Loops, NL) 3,哈希连接(Hash Join, HJ) Join是一种试图将两个表结合在一 ...

  9. oracle连接方式、创建数据库用户、忘记数据库密码、用户锁定

    一.oracle六种连接方式 ①myEclipse中 打开myEclipse,window----show view----Other---输入DB点击DB browser 选中右键New.出现如下页 ...

随机推荐

  1. AutoTile 自动拼接 番外篇(自动融合技术)

    http://pan.baidu.com/s/1dDQyfSl 密码:ttud 先睹为快吧. 之后 还差一个 智能替换 技术.

  2. Shell变量:Shell变量的定义、删除变量、只读变量、变量类型

    http://c.biancheng.net/cpp/shell/ 1.打印 2.运算符

  3. 解决VS2010中winsock.h与winsock2.h冲突(重复定义)——转载

    解决VS2010中winsock.h与winsock2.h冲突(重复定义)——转载 当这两个头文件顺序颠倒时,编译会出现许多莫名其妙的错误,错误如下: 1>…\include\ws2def.h( ...

  4. MFC模态和非模态对话框编程

    MFC中对话框有两种形式,一个是模态对话框(model dialog box),一个是非模态对话框(modeless dialog box). 一.模态对话框(model dialog box) 在程 ...

  5. word转pdf swf 在线预览

    来源:http://www.cnblogs.com/wuhenke/archive/2010/08/01/1789750.html 之前在项目中研究使用了一套word转PDF,然后将PDF转成SWF的 ...

  6. jquery滚动条加载数据

    //滚动条  $(window).scroll(function () {   var scrollTop = $(this).scrollTop();   var scrollHeight = $( ...

  7. intent.putExtra()方法参数详解

    [开篇骂几句:fuck]1.扯淡intent.putExtra()怎么使用?2.胡说intent.putExtra(); [扯淡:其实你在问它怎么用的时候,你要明白,你知道不知道这是个什么东东,有必要 ...

  8. PHP中json序列化后中文的编码显示问题

    在接口返回数据中,我们经常会返回json或者xml格式,php的json序列化函数json_encode非常好用,但是默认会把中文编码为ASCII码(注意,很多人认为这是乱码,其实不是),尤其在调试接 ...

  9. c语言的编译过程和GCC 编译参数

    原文: http://www.cnblogs.com/zhangShanGui/p/4912135.html C语言的编译过程和GCC编译参数 C语言的编译一般有三个步骤: 预编译: gcc -E - ...

  10. shell 入门教程

    打开文本编辑器,新建一个文件,扩展名为sh(sh代表shell),扩展名并不影响脚本执行,见名知意就好.     一  惯例,第一个shell #!/bin/bash echo "Hello ...