Question about Oracle and sqlplus
Steve Flynn
anothermindbomb at gmail.com
Thu Sep 24 17:49:08 UTC 2009
On Thu, Sep 24, 2009 at 5:52 PM, Martin McCormick
<martin at dc.cis.okstate.edu> wrote:
> I really know very little about Oracle but know
> something about Unix and have been asked to get this going so we
> can query the remote data base, modify some fields and use them
> to feed back to yet another remote system so we are doing
> back-end processing. It took me some time to even understand
> what the instant client did so I am slowly learning. Here is the
> sqlnet.ora file followed by a redacted version of tnsnames.ora:
>
> # SQLNET.ORA
>
> NAMES.DEFAULT_DOMAIN = it.okstate.edu
> # SQLNET.AUTHENTICATION_SERVICES= (NTS)
> NAMES.DIRECTORY_PATH= (HOSTNAME, TNSNAMES)
>
> _______________________________________________________________________________
> _
> # TNSNAMES.ORA
>
> dbhost.it.okstate.edu =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = dbhost.it.okstate.edu)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = cartoon_sounds)
> )
> )
>
> _______________________________________________________________________________
> _
>
> Presently, it prompts for a login name, password and
> then tells you you have the wrong service name and starts
> prompting all over again. If the libraries are not present, it
> crashes with the appropriate error message so right now, the
> only thing it appears not to be doing is finding the remote
> Oracle server because it is not reading tnsnames.ora.
Your tnsnames.ora file specifies that you are trying to connect to a
database named dbhost.it.okstate.edu - this this correct? Looks more
like the machine name the database is hosted on to me.
I suspect you might have the name of the database (cartoon_sounds) in
your service name setting.
For example, if you "tnsping dbhost.it.okstate.edu" you should get
this entry displayed onscreen, followed by an OK and the ping time. Do
you get this far?
I thing you want something along the lines of
cartoon_sounds =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost.it.okstate.edu)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = the service name on the database you're
attemtping to connect to. Your DBA should be able to tell you this.)
)
)
If you'd like to drop me an email at steve.flynn at remove_this capita
dot co dot uk I can give you some assistance when I'm at work with on
of my own tnsnames.ora files (and an sqlnet.ora file should you need
it)/
--
Steve
When one person suffers from a delusion it is insanity. When many
people suffer from a delusion it is called religion.
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
More information about the ubuntu-users
mailing list