Solved

sqlplus on Solaris ignoring $ORACLE_SID?

Posted on 2000-03-29
3
1,794 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
  • 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now