I have three systems 1 Windows 2000 and the other 2 running Linux. The ORACLE server is a LINUX server 192.168.1.220 (MDLITTLE). The other Linux system is a client that boot from a CD that is created from the server. For the oracle client I install the standard oracle9i client software into /home/oracle9i and then tar the information and move it into the CD directory.
I can access the ORACLE database without problem on the Linux server and from the Window 2000 system. Yet I receive an error from the Linux client. I have the following files.
Window 2000 client: tnsnames.ora
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\ad
min\tnsnam
es.ora
# Generated by Oracle configuration tools.
PROACT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.220)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = proact.proactivemonitoring
.com)
)
)
Window 2000 client: sqlnet.ora
# SQLNET.ORA Network Configuration File: C:\oracle\ora92\network\ad
min\sqlnet
.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERV
ICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES)
On the Linux server that works I have:
/home/oracle9i/network/adm
in/tnsname
s.ora:
# TNSNAMES.ORA Network Configuration File: /home/oracle9i/network/adm
in/tnsname
s.ora
# Generated by Oracle configuration tools.
PROACT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.220)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = proact.proactivemonitoring
.com)
)
)
/ home/oracle9i/network/admi
n/sqlnet.o
ra
# SQLNET.ORA Network Configuration File: /home/oracle9i/network/adm
in/sqlnet.
ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
Results from the test:
TNS Ping Utility for Linux: Version 9.2.0.1.0 - Production on 12-FEB-2003 11:48:20
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/home/oracle9i/network/adm
in/sqlnet.
ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.220)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = proact.proactivemonitoring
.com)))
OK (10 msec)
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Feb 12 11:48:48 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
The Linux client system that does not work has:
/home/oracle9i/network/adm
in/tnsname
s.ora:
# TNSNAMES.ORA Network Configuration File: /home/oracle9i/network/adm
in/tnsname
s.ora
# Generated by Oracle configuration tools.
PROACT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.220)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = proact.proactivemonitoring
.com)
)
)
/ home/oracle9i/network/admi
n/sqlnet.o
ra
# SQLNET.ORA Network Configuration File: /home/oracle9i/network/adm
in/sqlnet.
ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
Results from the tests are:
TNS Ping Utility for Linux: Version 9.2.0.1.0 - Production on 12-FEB-2003 01:43:57
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/home/oracle9i/network/adm
in/sqlnet.
ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.220)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = proact.proactivemonitoring
.com)))
OK (10 msec)
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Feb 12 01:45:14 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve service name
Enter user-name: ERROR:
ORA-06413: Connection not open.
Enter user-name: ERROR:
ORA-06413: Connection not open.
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
On both Linux server and client I used the oracle user with the bash shell. Also in both cases I have a .bash_profile file with:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
ORACLE_BASE=/home/oracle9i
; export ORACLE_BASE
ORACLE_HOME=/home/oracle9i
; export ORACLE_HOME
ORACLE_SID=proact; export ORACLE_SID
PATH=$PATH:$ORACLE_HOME/bi
n; export PATH
LD_LIBRARY_PATH=$ORACLE_HO
ME/lib:/li
b:/usr/lib
:/usr/loca
l/lib; export LD_LIBRARY_PATH
unset USERNAME
From the above error ORA-12154 you would think that the tnsnames.ora file is not found. I do not understand why not since the tnsping can find the file.
Can anyone help?