求帮忙···tnsname.ora出错,配置Net Configuration Assistant 创建本地net服务名 点击无反应

double27 2012-12-05 11:25:19
求帮忙解决tnsname.ora文件问题
十分感谢

文件内容如下


# This file contains the syntax information for
# the entries to be put in any tnsnames.ora file
# The entries in this file are need based.
# There are no defaults for entries in this file
# that Sqlnet/Net3 use that need to be overridden
#
# Typically you could have two tnsnames.ora files
# in the system, one that is set for the entire system
# and is called the system tnsnames.ora file, and a
# second file that is used by each user locally so that
# he can override the definitions dictated by the system
# tnsnames.ora file.

# The entries in tnsnames.ora are an alternative to using
# the names server with the onames adapter.
# They are a collection of aliases for the addresses that
# the listener(s) is(are) listening for a database or
# several databases.

# The following is the general syntax for any entry in
# a tnsnames.ora file. There could be several such entries
# tailored to the user's needs.

<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have
# one or more descriptions
# If there is just one description, unnecessary ]
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= # Optional depending on whether u have
# one or more addresses
# If there is just one address, unnecessary ]
(ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
[ (ADDRESS=
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=decnet)
(NODE=<nodename>)
(OBJECT=<objectname>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST is used or not
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
(DESCRIPTION=
[ (SDU=2048) ] # Optional, defaults to 2048
# Can take values between 512 and 32K
[ (ADDRESS_LIST= ] # Optional depending on whether u have more
# than one address or not
# If there is just one address, unnecessary
(ADDRESS
[ (COMMUNITY=<community_name>) ]
(PROTOCOL=tcp)
(HOST=<hostname>)
(PORT=<portnumber (1521 is a standard port used)>)
)
[ (ADDRESS=
(PROTOCOL=ipc)
(KEY=<ipckey (PNPKEY is a standard key used)>)
)
]
... # More addresses
[ ) ] # Optional depending on whether ADDRESS_LIST
# is being used
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
[ (SOURCE_ROUTE=yes) ]
)
[ (CONNECT_DATA=
(SID=<oracle_sid>)
[ (GLOBAL_NAME=<global_database_name>) ]
)
]
... # More descriptions
[ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
...全文
272 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
double27 2012-12-06
  • 打赏
  • 举报
回复
谢谢楼上的亲们的鼎力帮助
sky_08_06_02 2012-12-06
  • 打赏
  • 举报
回复
HOST PORT SERVICE_NAME 这几个配置好了,就差不多了
fwzhuo 2012-12-05
  • 打赏
  • 举报
回复
在你的tnsnames.ora文件中,复制下面的内容,更改IP地址为你远程数据库的IP地址 TEADB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = teadb) ) ) 连接字符串TEADB的名称可以随便取一个,注意 1)更改HOST=后面的IP地址为你远程数据库的IP地址; 2)更改SERVICE_NAME=后面的teadb为你数据库的服务名(可以在数据库本机上使用sqlplus执行查询:show parameter service 得到结果) 3)如果远程数据库监听不是使用默认的1521端口的话,注意更改PORT=后面的1521为你远程数据库监听的真实端口。 4.可能需要注意,你sqlnet.ora文件中配置的连接方式,是不是使用tnsnames.ora来解析。 如果sqlnet.ora中包含内容:NAMES.DIRECTORY_PATH= (TNSNAMES) 则就是对了。 5.配置完tnsnames.ora后,可以使用tnsping命令测试连接是否正常。 在命令行(windows下在ms-dos窗口下)执行:tnsping TEADB 10 表示使用oracle的ping(叫tnsping,区别于网络上的物理ping命令)命令,去测试10次该连接字符串TEADB
double27 2012-12-05
  • 打赏
  • 举报
回复
求帮忙··本屌大二学生一枚···实在学识浅薄······
double27 2012-12-05
  • 打赏
  • 举报
回复
顶一个···下午交作业了···数据库无法远程访问···
linwaterbin 2012-12-05
  • 打赏
  • 举报
回复
tnsnames.ora你还没搞清楚哈 你贴的根本就不是tnsnames.ora的内容! 二楼的那个你可以参考一下

17,382

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧