1

我在 Windows Vista PC 上安装了 Oracle 11g RDBMS 和 11g Forms and Reports。

没有设置环境变量ORACLE_SIDORACLE_HOMETNS_ADMIN

注册表设置HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\

#Database
ORACLE_HOME = E:\app\Tams\product\11.1.0\db_1
ORACLE_SID = orcl
#Forms and Reports
ORACLE_HOME = C:\bimwh\Oracle_FRHome1
TNS_ADMIN = E:\app\Tams\product\11.1.0\db_1\NETWORK\ADMIN

#tnsnames.ora
tams=
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Tams-PC)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

#sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

#listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = Tams-PC)(PORT = 1521))
    )
  )

#tnsping
C:\>tnsping tams

Used parameter files:
E:\app\Tams\product\11.1.0\db_1\NETWORK\ADMIN\sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Tams-PC)
(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)

#sqlplus
C:\>sqlplus user/pass@tams  - HANGS.
C:\>sqlplus user/pass@orcl  - ORA-12154.
C:\>sqlplus user/pass       - CONNECTS.

#Forms and Reports Builder
user/pass/tams - ORA-12154 on Reports - HANGS on Forms.
user/pass/orcl - ORA-12154 on both.
user/pass      - CONNECTS.

#Forms Runtime
ORA-12560 TNS protocol adapter error

谢谢你尽你所能的帮助。塔姆斯

4

1 回答 1

0

看起来侦听器似乎没有在侦听任何数据库。listener.ora 中唯一的条目是监听器定义本身。通常还有一个侦听器正在侦听的数据库列表。网络管理器可用于配置侦听器以侦听本地数据库。一旦 listener.ora 正在侦听数据库,connect user/pass@net-service-name 应该可以工作。

于 2012-06-28T01:50:46.447 回答