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

Posted mfmdaoyou

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了using the easy connect naming method 简单连接測试相关的知识,希望对你有一定的参考价值。

  一直都不明确sqlnet.ora中的NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)是什么意思。今天看到一篇文档,就是登陆选用的方式。做一个測试:
tnsnames.ora 
10.10.32.119 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.32.119)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl11g)
    )
  )
  
sqlnet.ora  
NAMES.DIRECTORY_PATH= (TNSNAMES)

C:\Users\Administrator>sqlplus test/[email protected]

SQL*Plus: Release 11.2.0.1.0 Production on 星期二 6月 2 18:50:57 2015
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> 从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开

C:\Users\Administrator>sqlplus test/[email protected]/orcl11g
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 6月 2 18:55:06 2015
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-12154: TNS: 无法解析指定的连接标识符
请输入username:

sqlnet.ora  
NAMES.DIRECTORY_PATH= (TNSNAMES)

C:\Users\Administrator>sqlplus test/[email protected]
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 6月 2 18:56:47 2015
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-12504: TNS: 监听程序在 CONNECT_DATA 中未获得 SERVICE_NAME
请输入username:

C:\Users\Administrator>sqlplus test/[email protected]/orcl11g
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 6月 2 18:57:03 2015
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options



以上是关于using the easy connect naming method 简单连接測试的主要内容,如果未能解决你的问题,请参考以下文章

[Redux] Using withRouter() to Inject the Params into Connected Components

tp框架报“mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysq

Can't connect to X11 window server using ':1.0' as the value of the DISPLAY variable.(示例

CentOS8安装pycharm报错Can't connect to X11 window server using ':0' as the value of the DIS(

How to fix use the cURL to connect to GitHub with a 443 HTTPS error All In One

JDBC连接数据库报错The driver could not establish a secure connection to SQL Server by using Secure ..