简体   繁体   中英

Oracle connection problems on Windows

I have Oracle 11g RDBMS and 11g Forms and Reports installed on my Windows Vista PC.

No environment variables are set for ORACLE_SID , ORACLE_HOME or TNS_ADMIN

Registry settings in 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

Thanks for any help you can offer. Tams

It looks as though the listener is not listening for any databases. The only entry in the listener.ora is the listener definition itself. Normally there is also a list of databases the listener is listening for. The Network Manager can be used to configure the listener to listen for the local databases. Once the listener.ora is listening for the databases the connect user/pass@net-service-name should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM