Solved

Oracle TWO_TASK setting and default database logon

Posted on 2001-07-31
6
2,487 Views
Last Modified: 2012-06-27
Hi,

We are attempting to configure our application with a dedicated Oracle 8.0 database server on a separate Solaris 2.7 host.

We've set the TWO_TASK environment variable to the separate alias name configured in the tnsnames.ora file, and it works fine. All connections are diverted to the dedicated database server.

The problem is that the default username and password logon are disabled as soon as TWO_TASK is set.  Hence, all the supporting shell scripts which use default logon in the form "sqlplus /", or "sqlplus -s /" now fail.  Default logon has been used extensively in our application environment, so this is a major hurdle.

Any suggestions or tips that don't require major rework of the shell scripts would be most welcome.

Thanks

Phillip Prince
0
Comment
Question by:phillp
6 Comments
 
LVL 3

Accepted Solution

by:
ramkb earned 75 total points
ID: 6338520


The TWO_TASK variable is set so that you can connect to a database thro' Net8 listener without specifying a connect string.

Unless this is your requirement, you need not use TWO_TASK to connect to your database in the first place.  Instead set the ORACLE_SID in your user's .profile.  This is commonly the way to connect locally from the server in which your database is running.

If you have your TWO_TASK variable set and try connecting using OS authentication (/ or OPS$USER), Oracle cannot verify your OS authentication (in Unix member of DBA group) since you are connecting thro' Net8 at this point.
You should then Unset TWO_TASK everytime before you connect using O/S Authentication (and use ORACLE_SID to point to your DB).

Hope this helps..
- Ramesh
0
 
LVL 2

Expert Comment

by:Kong
ID: 6339066
That's right, good point Ramesh. So before calling the shell scripts:

unset TWO_TASK
export ORACLE_SID=yoursid

Then run the shell scripts as per usual.
0
 

Expert Comment

by:johnnyce
ID: 6339129
Hi, Philip,

Perhaps:

export ORACLE_SID=$TWO_TASK
unset TWO_TASK
0
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.

 
LVL 6

Expert Comment

by:Mindphaser
ID: 7038219
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7055626
Recommended disposition:

    Accept ramkb's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7056957
Thanks, Dan.
I finalized this today and will monitor it in the event an adjustment is needed.
Moondancer - EE Moderator
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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Stay Alert! 13 62
how to change the query from oracle to  mysql. 3 39
oracle query help 29 62
PL/SQL Search for multiple strings 5 20
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…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
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 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.

707 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