首页 > 代码库 > using the easy connect naming method 简单连接測试
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 =http://www.mamicode.com/
(SERVICE_NAME = orcl11g)
)
)
sqlnet.ora
NAMES.DIRECTORY_PATH= (TNSNAMES)
C:\Users\Administrator>sqlplus test/test@10.10.32.119
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/test@10.10.32.119/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/test@10.10.32.119
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/test@10.10.32.119/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
tnsnames.ora
10.10.32.119 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.32.119)(PORT = 1521))
)
(CONNECT_DATA =http://www.mamicode.com/
(SERVICE_NAME = orcl11g)
)
)
sqlnet.ora
NAMES.DIRECTORY_PATH= (TNSNAMES)
C:\Users\Administrator>sqlplus test/test@10.10.32.119
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/test@10.10.32.119/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/test@10.10.32.119
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/test@10.10.32.119/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 简单连接測试
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。