Solved

sqlplus on Solaris ignoring $ORACLE_SID?

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
database upgrade 8 110
PL/SQL Display based on value 4 39
Require data to appear on a single line 2 69
Oracle - Query link database loop 8 40
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.
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

856 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