我在 Windows Vista PC 上安装了 Oracle 11g RDBMS 和 11g Forms and Reports。
没有设置环境变量ORACLE_SID
,ORACLE_HOME
或TNS_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
谢谢你尽你所能的帮助。塔姆斯