Solved oracle: fatal: open failed:

Posted on 2005-10-19
Last Modified: 2007-12-19
Running Oracle 10g under solaris 9

When I try going into sqlplus as user b, i get message:

Enter user-name: oracle: fatal: open failed: No such file or directory
ORA-12547: TNS:lost contact

I go in as user a and everything is fine.  I've copied user a .profile to user b and still get the error.
Any ideas what is the problem?
Question by:xoxomos
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
  • 4

Author Comment

ID: 15114780
I've just noticed, the userid that works has both a .profile and a .bash_profile
The one that doesn't has only a .profile.  
LVL 48

Expert Comment

ID: 15115029
The OS user B has to have same Oracle environment variables as user A
in order to get access to the Oracle binaries and libraries.

Author Comment

ID: 15117548
Yeah, I copied Oracles .profile into user b but that doesn't seem to make a difference.
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.


Author Comment

ID: 15118242
If I go:
psdwp /sysadm/xoxomos $ sqlplus

SQL*Plus: Release - Production on Wed Oct 19 10:50:56 2005

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: student
Enter password: oracle: fatal: open failed: No such file or directory
ORA-12547: TNS:lost contact

Enter user-name:

But  as the same os user I can go

psdwp /sysadm/xoxomos $ sqlplus student/nt311m3nt@dwproddb

SQL*Plus: Release - Production on Wed Oct 19 10:52:17 2005

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP and Data Mining options


And everything is fine.???????????


Accepted Solution

argonux earned 300 total points
ID: 15119149
Try to follow this thread, it is simular to your problem.

The way you tried to connect before is called a direct/bequeath connection. This works by directly creating a new oracle process from sqlplus and comunicating with it using a pipe (no listener involved) . But since you were running it as a different user it was having some problems starting, I am not sure exactly why, maybe its permissions on the shared memory segments or the actual data files. In principle it should be able to work this way,even from another user, but maybe not on all platforms and depending on permissions, I am not sure.

The second way was connecting via the network listener (dependant on your tnsnames configuration) and the oracle process will get started by the oracle user, so there are no problems with permissions on shared memory or files.

You can set a TWO_TASK environment variable to dwproddb and the it would connect without specifying the @dwproddb.
When TWO_TASK is defined any connection you make without specifying a TNS entry will get "@TWO_TASK" glued to it before trying to connect. This works exactly as if you have connected to "sqlplus user/pass@dwproddb".

Author Comment

ID: 15119584
I'll close this and try to follow that thread you mentioned.  Exporting the TWO_TASK inside the script even has the cron job running again ok.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to Comment Out Lines of Code in a Pass Through Query In MS Access 2016 19 101
Oracle 12c Default Isolation Level 17 64
plsql job on oracle 18 111
Oracle Errors 11 90
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to recover a database from a user managed backup
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

710 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