Solved

sqlplus on Solaris ignoring $ORACLE_SID?

Posted on 2000-03-29
3
1,817 Views
Last Modified: 2013-12-05
This really must be an easy question, but I need an answer quickly and
don't have the time to look deeper into this, so here it is:

We used to be running Oracle 8.0.5 on Solaris 2.7. When the
environment variable $ORACLE_SID was defined, it sufficed to issue the command:

$ sqlplus USER/PWD

i.e without connect string.

now we had to upgrade Oracle to 8.1.5. and downgrade Solaris to 2.6. All
of a sudden the above command results in an error message saying that
Oracle is not available. When I add the connect string:

$ sqlplus USER/PWD@DB

all works fine.

Can anyone tell me what triviality I am overlooking? If there is no
solution I will have to modify a zillion scripts!

Thanks for any help,

JM
0
Comment
Question by:jmvalk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
habushad earned 100 total points
ID: 2667287
Dear JM,
The solution is simple.
Define an environment variable TWO_TASK and this will automatically connect to your database.
In your example, do the following:
setenv TWO_TASK DB.
0
 

Author Comment

by:jmvalk
ID: 2668004
It worked: Thanks!

I 've graded your answer, but I'm still a bit puzzled:

we still have the machine with the old configuration, and there the TWO_TASK variable was NOT set. Is this a difference between 8.1.5. and 8.0.5? And what exactly is the difference in 8.1.6. between ORACLE_SID and TWO_TASK, and does ORACLE_SID still have a function?
0
 
LVL 1

Expert Comment

by:habushad
ID: 2671347
ORACLE_SID is still in use in 8.1.5 and 8.1.6. It is used to identify the the current Oracle SID.
TWO_TASK specifies the name of the service name in tnsnames.ora that you would like to connect by default.
You have probably used sqlnet and in 8.1.5 the default is Net8.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question