Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .