I have the following situation:

  • a windows 7, 64-bit OS;
  • in which I have an Oracle 10g setup;
  • on top of Win 7 - XP Mode;
  • in which I have Oracle 11 client.

As I try to connect to the Oracle Server from XP mode I got the two situations:

  1. sqlplus username/password@ host

    -> I log in successfully!

  2. sqlplus then username, then password (i.e. 3 separate rows)

    -> I get ORA - 12560

I believe this is due to the fact that the Oracle client 'forgets' or doesn't know which host to turn to in order to connect to server.

How do I set the host for the Oracle client? One more - I do not see any tnsnames.ora files in the installation directory of Oracle client.

link|improve this question

80% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Use the LOCAL environment variable in Windows (same as TWO_TASK in Unix).

set LOCAL=service_name 

By the way, the meaning and syntax of connection string is not

username/password@ host

but instead

username/password@service_name

In your case probably the service_name is the same as hostname.

link|improve this answer
thank you very much for the quick and accurate response! – karla Jan 4 at 12:39
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.