Solved

sqlplus on Solaris ignoring $ORACLE_SID?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

914 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

15 Experts available now in Live!

Get 1:1 Help Now