?
Solved

sqlplus on Solaris ignoring $ORACLE_SID?

Posted on 2000-03-29
3
Medium Priority
?
1,829 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 400 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to recover a database from a user managed backup
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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