Connection problem through sqlplus

This is a discussion on Connection problem through sqlplus within the Oracle Server forums in Oracle Database category; Anoop wrote: > Hi All, > > Need some help in this baffling issue.. > > I have 2 instances of oracle installed on my solaris box. The oracle > versions are 10g and 9i. > > I hardly use the 10g and have 4 databases configured on 9i. > > I have written some shell scripts to connect (from the same box) to the > 9i databases and they all make use of the sqlplus command like this: > > sqlplus /@ > > Of the 4, I can connect successfully to 3 of the databases using the > above format in my shell scripts... > > But the 4th, I just dont seem to be able to ...

Go Back   Database Forum > Oracle Database > Oracle Server

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-15-2006, 01:20 AM
Default Re: Connection problem through sqlplus

Anoop wrote:
> Hi All,
>
> Need some help in this baffling issue..
>
> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>
> I have written some shell scripts to connect (from the same box) to the
> 9i databases and they all make use of the sqlplus command like this:
>
> sqlplus /@
>
> Of the 4, I can connect successfully to 3 of the databases using the
> above format in my shell scripts...
>
> But the 4th, I just dont seem to be able to connect and am not sure
> what the problem is..
> I am connecting from the server box itself, I mean the database is
> installed on the same box.
>
> If I use a complete qualifying command like this, I can connect
> perfectly fine:
>
> sqlplus
> 'rem@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL =TCP)(HOST=redbull)(PORT=1521)))(CONNECT_DATA=(SID =c1remdev)))'
>
> but, if I do the following I cannot connect:
>
> sqlplus rem/cap-at-c1remdev
>
> I get this error:
> ERROR:
> ORA-12154: TNS:could not resolve the connect identifier specified


Have you done any SQLNET tracing? Listener tracing?

Post your SQLNET.ORA

Personally ... I'd be looking for a typo. A very small one that you
can't see because you've looked at it too many times already. Find
someone else to look at it that has never seen it before. ;-)
--
Daniel A. Morgan
University of Washington
damorgan-at-x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Reply With Quote
  #2  
Old 08-15-2006, 01:20 AM
Default Re: Connection problem through sqlplus

Anoop wrote:
> Hi All,
>
> Need some help in this baffling issue..
>
> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>
> I have written some shell scripts to connect (from the same box) to the
> 9i databases and they all make use of the sqlplus command like this:
>
> sqlplus /@
>
> Of the 4, I can connect successfully to 3 of the databases using the
> above format in my shell scripts...
>
> But the 4th, I just dont seem to be able to connect and am not sure
> what the problem is..
> I am connecting from the server box itself, I mean the database is
> installed on the same box.
>
> If I use a complete qualifying command like this, I can connect
> perfectly fine:
>
> sqlplus
> 'rem@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL =TCP)(HOST=redbull)(PORT=1521)))(CONNECT_DATA=(SID =c1remdev)))'
>
> but, if I do the following I cannot connect:
>
> sqlplus rem/cap-at-c1remdev
>
> I get this error:
> ERROR:
> ORA-12154: TNS:could not resolve the connect identifier specified


Have you done any SQLNET tracing? Listener tracing?

Post your SQLNET.ORA

Personally ... I'd be looking for a typo. A very small one that you
can't see because you've looked at it too many times already. Find
someone else to look at it that has never seen it before. ;-)
--
Daniel A. Morgan
University of Washington
damorgan-at-x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Reply With Quote
  #3  
Old 08-15-2006, 01:54 AM
Default Re: Connection problem through sqlplus


> ORA-12154: TNS:could not resolve the connect identifier specified
>
> TNS-03505: Failed to resolve name
>


Just to verify ... how many listeners do you have running?

This should not be a problem in your case, but you mention you have 2
ORACLE_HOMEs and you appear to use manual registration of your instances.
Therefore, if you happen to be using the 10g listener and have not updated
it's listener.ora, you could be running into a problem.

However - the 12154 usually indicates a problem in the TNSNAMES.ORA (or
client side) resolution.

Makes one wonder whether you happen to have multiple tnsnames.ora on the
machine.

Also, have you checked, or tried recreating the entry, using netmgr?

Finally - does the listener recognize the service? When you do 'lsnrctl
status' or 'lsnrctl services', does the remtst service get listed?



I note you are using fairly long aliases (c1rem, c1remtst ...). Due to a
string compare bug (way back when) I had gotten into the habit of putting
the longer names first in the tnsnames.ora file. (I have a vague memory
of the compare happening only to the length of the shortest string.)
That is probably not the problem, just an observation ...



--
Hans Forbrich (mailto: Fuzzy.GreyBeard_at_gmail.com)
*** Feel free to correct me when I'm wrong!
*** Top posting [replies] guarantees I won't respond.

Reply With Quote
  #4  
Old 08-15-2006, 01:54 AM
Default Re: Connection problem through sqlplus


> ORA-12154: TNS:could not resolve the connect identifier specified
>
> TNS-03505: Failed to resolve name
>


Just to verify ... how many listeners do you have running?

This should not be a problem in your case, but you mention you have 2
ORACLE_HOMEs and you appear to use manual registration of your instances.
Therefore, if you happen to be using the 10g listener and have not updated
it's listener.ora, you could be running into a problem.

However - the 12154 usually indicates a problem in the TNSNAMES.ORA (or
client side) resolution.

Makes one wonder whether you happen to have multiple tnsnames.ora on the
machine.

Also, have you checked, or tried recreating the entry, using netmgr?

Finally - does the listener recognize the service? When you do 'lsnrctl
status' or 'lsnrctl services', does the remtst service get listed?



I note you are using fairly long aliases (c1rem, c1remtst ...). Due to a
string compare bug (way back when) I had gotten into the habit of putting
the longer names first in the tnsnames.ora file. (I have a vague memory
of the compare happening only to the length of the shortest string.)
That is probably not the problem, just an observation ...



--
Hans Forbrich (mailto: Fuzzy.GreyBeard_at_gmail.com)
*** Feel free to correct me when I'm wrong!
*** Top posting [replies] guarantees I won't respond.

Reply With Quote
  #5  
Old 08-15-2006, 02:00 AM
Default Re: Connection problem through sqlplus

On Mon, 14 Aug 2006 20:32:07 -0700, Anoop wrote:

> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>


Please clarify my confusion:

You state you have two instances, one being the 10g.

Therefore you have one 9i instance. And you have four 9i databases.

But an instance can only be associated to one database at a time.

Are you stating that you have three of the four 9i databases shutdown at
all times? Or is it simply a mis-use of the terms instance and database.


If the former, that may have an impact on your problem.

--
Hans Forbrich (mailto: Fuzzy.GreyBeard_at_gmail.com)
*** Feel free to correct me when I'm wrong!
*** Top posting [replies] guarantees I won't respond.

Reply With Quote
  #6  
Old 08-15-2006, 02:00 AM
Default Re: Connection problem through sqlplus

On Mon, 14 Aug 2006 20:32:07 -0700, Anoop wrote:

> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>


Please clarify my confusion:

You state you have two instances, one being the 10g.

Therefore you have one 9i instance. And you have four 9i databases.

But an instance can only be associated to one database at a time.

Are you stating that you have three of the four 9i databases shutdown at
all times? Or is it simply a mis-use of the terms instance and database.


If the former, that may have an impact on your problem.

--
Hans Forbrich (mailto: Fuzzy.GreyBeard_at_gmail.com)
*** Feel free to correct me when I'm wrong!
*** Top posting [replies] guarantees I won't respond.

Reply With Quote
  #7  
Old 08-15-2006, 03:00 AM
Default Re: Connection problem through sqlplus


Anoop wrote:
> Hi All,
>
> Need some help in this baffling issue..
>
> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>
> I have written some shell scripts to connect (from the same box) to the
> 9i databases and they all make use of the sqlplus command like this:
>
> sqlplus /@
>
> Of the 4, I can connect successfully to 3 of the databases using the
> above format in my shell scripts...
>
> But the 4th, I just dont seem to be able to connect and am not sure
> what the problem is..
> I am connecting from the server box itself, I mean the database is
> installed on the same box.
>
> If I use a complete qualifying command like this, I can connect
> perfectly fine:
>
> sqlplus
> 'rem@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL =TCP)(HOST=redbull)(PORT=1521)))(CONNECT_DATA=(SID =c1remdev)))'
>
> but, if I do the following I cannot connect:
>
> sqlplus rem/cap-at-c1remdev
>
> I get this error:
> ERROR:
> ORA-12154: TNS:could not resolve the connect identifier specified
>
> Also, the tnsping works for all 3 except the above database. Here is
> the output...
>
> [oracle-at-redbull ~]$ tnsping c1remdev
>
> TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on
> 14-AUG-2006 22:02:30
>
> Copyright (c) 1997, 2005, Oracle. All rights reserved.
>
> Used parameter files:
> /opt/app/oracle/product/10/network/admin/sqlnet.ora
>
> TNS-03505: Failed to resolve name
>
>
> I have also tried updating / fiddling with the tnsnames.ora and
> listener.ora files. Here are the contents (but to no avail):
>
>
> [oracle-at-redbull ~]$ more product/10/network/admin/listener.ora
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (GLOBAL_DBNAME = fedex)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = fedex)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = captest)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = captest)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1rem)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1rem)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1apdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1apdev)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remtst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remtst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1aptst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1aptst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remdev)
> )
> )
>
> LISTENER =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
>
> [oracle-at-redbull ~]$ more product/9.2.0/network/admin/tnsnames.ora
> c1aptst =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1aptst)
> )
> )
> c1apdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1apdev)
> )
> )
> c1remdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1remdev)
> )
> )
>
>
> Can somebody please point me as to where am I making the obvious
> mistake?
>
> I do not want to use the long version of sqlplus to connect (which
> always works) because I have a lot of shell scripts and I do not want
> to modify all of them for this sake.
>
> Thanks,
> Anoop


did you check your tnsnames in the 10g Oracle Home ?
Which Client are you using (10G or 9i) ?
It seems your path is pointing to the 10g Client.

regards

stefan Kapitza

Reply With Quote
  #8  
Old 08-15-2006, 03:00 AM
Default Re: Connection problem through sqlplus


Anoop wrote:
> Hi All,
>
> Need some help in this baffling issue..
>
> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>
> I have written some shell scripts to connect (from the same box) to the
> 9i databases and they all make use of the sqlplus command like this:
>
> sqlplus /@
>
> Of the 4, I can connect successfully to 3 of the databases using the
> above format in my shell scripts...
>
> But the 4th, I just dont seem to be able to connect and am not sure
> what the problem is..
> I am connecting from the server box itself, I mean the database is
> installed on the same box.
>
> If I use a complete qualifying command like this, I can connect
> perfectly fine:
>
> sqlplus
> 'rem@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL =TCP)(HOST=redbull)(PORT=1521)))(CONNECT_DATA=(SID =c1remdev)))'
>
> but, if I do the following I cannot connect:
>
> sqlplus rem/cap-at-c1remdev
>
> I get this error:
> ERROR:
> ORA-12154: TNS:could not resolve the connect identifier specified
>
> Also, the tnsping works for all 3 except the above database. Here is
> the output...
>
> [oracle-at-redbull ~]$ tnsping c1remdev
>
> TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on
> 14-AUG-2006 22:02:30
>
> Copyright (c) 1997, 2005, Oracle. All rights reserved.
>
> Used parameter files:
> /opt/app/oracle/product/10/network/admin/sqlnet.ora
>
> TNS-03505: Failed to resolve name
>
>
> I have also tried updating / fiddling with the tnsnames.ora and
> listener.ora files. Here are the contents (but to no avail):
>
>
> [oracle-at-redbull ~]$ more product/10/network/admin/listener.ora
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (GLOBAL_DBNAME = fedex)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = fedex)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = captest)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = captest)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1rem)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1rem)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1apdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1apdev)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remtst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remtst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1aptst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1aptst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remdev)
> )
> )
>
> LISTENER =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
>
> [oracle-at-redbull ~]$ more product/9.2.0/network/admin/tnsnames.ora
> c1aptst =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1aptst)
> )
> )
> c1apdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1apdev)
> )
> )
> c1remdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1remdev)
> )
> )
>
>
> Can somebody please point me as to where am I making the obvious
> mistake?
>
> I do not want to use the long version of sqlplus to connect (which
> always works) because I have a lot of shell scripts and I do not want
> to modify all of them for this sake.
>
> Thanks,
> Anoop


did you check your tnsnames in the 10g Oracle Home ?
Which Client are you using (10G or 9i) ?
It seems your path is pointing to the 10g Client.

regards

stefan Kapitza

Reply With Quote
  #9  
Old 08-15-2006, 10:59 AM
Default Re: Connection problem through sqlplus

"Anoop" wrote in message
news:1155612727.627326.123500-at-b28g2000cwb.googlegr oups.com...
> Hi All,
>
> Need some help in this baffling issue..
>
> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>
> I have written some shell scripts to connect (from the same box) to the
> 9i databases and they all make use of the sqlplus command like this:
>
> sqlplus /@
>
> Of the 4, I can connect successfully to 3 of the databases using the
> above format in my shell scripts...
>
> But the 4th, I just dont seem to be able to connect and am not sure
> what the problem is..
> I am connecting from the server box itself, I mean the database is
> installed on the same box.
>
> If I use a complete qualifying command like this, I can connect
> perfectly fine:
>
> sqlplus
> 'rem@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL =TCP)(HOST=redbull)(PORT=1521)))(CONNECT_DATA=(SID =c1remdev)))'
>
> but, if I do the following I cannot connect:
>
> sqlplus rem/cap-at-c1remdev
>
> I get this error:
> ERROR:
> ORA-12154: TNS:could not resolve the connect identifier specified
>
> Also, the tnsping works for all 3 except the above database. Here is
> the output...
>
> [oracle-at-redbull ~]$ tnsping c1remdev
>
> TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on
> 14-AUG-2006 22:02:30
>
> Copyright (c) 1997, 2005, Oracle. All rights reserved.
>
> Used parameter files:
> /opt/app/oracle/product/10/network/admin/sqlnet.ora
>
> TNS-03505: Failed to resolve name
>
>
> I have also tried updating / fiddling with the tnsnames.ora and
> listener.ora files. Here are the contents (but to no avail):
>
>
> [oracle-at-redbull ~]$ more product/10/network/admin/listener.ora
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (GLOBAL_DBNAME = fedex)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = fedex)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = captest)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = captest)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1rem)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1rem)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1apdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1apdev)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remtst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remtst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1aptst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1aptst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remdev)
> )
> )
>
> LISTENER =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
>
> [oracle-at-redbull ~]$ more product/9.2.0/network/admin/tnsnames.ora
> c1aptst =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1aptst)
> )
> )
> c1apdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1apdev)
> )
> )
> c1remdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1remdev)
> )
> )
>
>
> Can somebody please point me as to where am I making the obvious
> mistake?
>
> I do not want to use the long version of sqlplus to connect (which
> always works) because I have a lot of shell scripts and I do not want
> to modify all of them for this sake.
>
> Thanks,
> Anoop
>


Your 9.2 tnsnames.ora has only 3 entries (whereas you are expecting 4), so
it appears that is the one being picked up by your script.

--
Terry Dykstra


Reply With Quote
  #10  
Old 08-15-2006, 10:59 AM
Default Re: Connection problem through sqlplus

"Anoop" wrote in message
news:1155612727.627326.123500-at-b28g2000cwb.googlegr oups.com...
> Hi All,
>
> Need some help in this baffling issue..
>
> I have 2 instances of oracle installed on my solaris box. The oracle
> versions are 10g and 9i.
>
> I hardly use the 10g and have 4 databases configured on 9i.
>
> I have written some shell scripts to connect (from the same box) to the
> 9i databases and they all make use of the sqlplus command like this:
>
> sqlplus /@
>
> Of the 4, I can connect successfully to 3 of the databases using the
> above format in my shell scripts...
>
> But the 4th, I just dont seem to be able to connect and am not sure
> what the problem is..
> I am connecting from the server box itself, I mean the database is
> installed on the same box.
>
> If I use a complete qualifying command like this, I can connect
> perfectly fine:
>
> sqlplus
> 'rem@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL =TCP)(HOST=redbull)(PORT=1521)))(CONNECT_DATA=(SID =c1remdev)))'
>
> but, if I do the following I cannot connect:
>
> sqlplus rem/cap-at-c1remdev
>
> I get this error:
> ERROR:
> ORA-12154: TNS:could not resolve the connect identifier specified
>
> Also, the tnsping works for all 3 except the above database. Here is
> the output...
>
> [oracle-at-redbull ~]$ tnsping c1remdev
>
> TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on
> 14-AUG-2006 22:02:30
>
> Copyright (c) 1997, 2005, Oracle. All rights reserved.
>
> Used parameter files:
> /opt/app/oracle/product/10/network/admin/sqlnet.ora
>
> TNS-03505: Failed to resolve name
>
>
> I have also tried updating / fiddling with the tnsnames.ora and
> listener.ora files. Here are the contents (but to no avail):
>
>
> [oracle-at-redbull ~]$ more product/10/network/admin/listener.ora
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (GLOBAL_DBNAME = fedex)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = fedex)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = captest)
> (ORACLE_HOME = /opt/app/oracle/product/10)
> (SID_NAME = captest)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1rem)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1rem)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1apdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1apdev)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remtst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remtst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1aptst)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1aptst)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = c1remdev)
> (ORACLE_HOME = /opt/app/oracle/product/9.2.0)
> (SID_NAME = c1remdev)
> )
> )
>
> LISTENER =
> (DESCRIPTION =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
>
> [oracle-at-redbull ~]$ more product/9.2.0/network/admin/tnsnames.ora
> c1aptst =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1aptst)
> )
> )
> c1apdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1apdev)
> )
> )
> c1remdev =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = redbull)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = c1remdev)
> )
> )
>
>
> Can somebody please point me as to where am I making the obvious
> mistake?
>
> I do not want to use the long version of sqlplus to connect (which
> always works) because I have a lot of shell scripts and I do not want
> to modify all of them for this sake.
>
> Thanks,
> Anoop
>


Your 9.2 tnsnames.ora has only 3 entries (whereas you are expecting 4), so
it appears that is the one being picked up by your script.

--
Terry Dykstra


Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 10:13 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.