zoukankan      html  css  js  c++  java
  • 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 :

    Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.oracle.com)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.pipeEXTPROC1521ipc))) 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:

  • 相关阅读:
    55域TLV说明
    iOS开发之指定UIView的某几个角为圆角
    常逛的博客
    猿题库 iOS 客户端架构设计
    NSData
    base64编码
    RSA算法原理
    无法安装64位版本的office因为在您的pc
    mysql导出导入数据
    设置mysql的字符集
  • 原文地址:https://www.cnblogs.com/feiyun8616/p/5970198.html
Copyright © 2011-2022 走看看