Windows上的Oracle连接问题

时间:2012-06-20 17:36:52

标签: windows oracle connection

我的Windows Vista PC上安装了Oracle 11g RDBMS和11g表单和报告。

没有为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

感谢您提供的任何帮助。 噬细胞

1 个答案:

答案 0 :(得分:0)

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