Not connecting to oracle without specifying oracle_sid
Hi,
When I try to connect to the db directly..
$sqlplus username/password
it gives me......
ERROR:
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
SVR4 Error: 13: Permission denied
But when I give
$sqlplus username@oracle_sid/password
Its getting connected.
My oracle_sid has been set in by the env varibale.
$echo $ORACLE_SID
sid
$
Can anyone please tell me where the problem might be?
Displayed below are the messages of the selected thread.
Thread Status: Closed
From: Edward Yuan 23-Aug-02 22:18
Subject: ORA-27121 error when tried to use sqlplus to connect
RDBMS Version: 9.0.1
Operating System and Version: SunOS 5.7
Error Number (if applicable): ORA-27121
Product (i.e. SQL*Loader, Import, etc.):
Product Version:
ORA-27121 error when tried to use sqlplus to connect
Hi,
I have Oracle 9i installed on SunOS 5.7. As owner (oracle) logged in to the unix, I have no problem. But when I logged as other users on to the Unix, and tried to connect to the instance using Sqlplus, I got error as bellow:
SQL*Plus: Release 9.0.1.0.0 - Production on Fri Aug 23 17:00:36 2002
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Enter user-name: scott/tiger
ERROR:
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
SVR4 Error: 13: Permission denied
I'm sure the ORACLE_HOME,ORACLE_SID,LD_... are setup well. And the SGA size is only 60M ( and tiny test database only).
The OS permission for Sqlplus, Oracle etc. are fine.
ocean$ ls -al sqlplus
-rwxr-xr-x 1 oracle dba 936340 Jun 18 12:40 sqlplus
ocean$ ls -al oracle
-rwsr-s--x 1 oracle dba 46664820 Jun 18 12:42 oracle
I've searched the Metalink but found nothing helpful.
Thanks for any hints.
Thanks.
Edward.
From: Seshagiri Rao Gangupantulu 26-Aug-02 15:57
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
This is most trickest question to answer.
1. Set umask for the other user 022
2. Check the oratab file for the database names and check the case.
Please verify the case of database running and the SID in oratab file.
I am not sure of this.
Thanks,
Sesha
From: Edward Yuan 26-Aug-02 18:40
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
The instance name is TST9i, which is consistent in oratab, ORACLE_SID and running instance.
From: Edward Yuan 26-Aug-02 18:59
Subject: Re : Re : ORA-27121 error when tried to use sqlplus to connect
New finding:
I can connect to the database if I unset the ORACLE_SID and use sqlplus scott/tiger@TST9i, or sqlplus scott/tiger with TWO_TASK set to TST9i. It's strange that the ORACLE_SID doesn't work. I'm on local server!!
And, with this same local normal unix userid ( not oracle owner), I CAN connect to an 8.1.7 local test database with ORACLE_SID setup. So seems like the problem exists in 9.0.1 only.
Any idea? Thx.
Thanks.
Edward.
From: Seshagiri Rao Gangupantulu 26-Aug-02 19:17
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
Can you please export ORACLE_SID, ORACLE_HOME, ORACLE_PATH, PATH to include ORACLE_HOME/bin, TNS_ADMIN to $ORACLE_HOME/network/admin for Oracle 9i database in .profile or at the command prompt and try the operation.
I suspect the environment variables setup for the user is the culprit here and not Oracle 9i.
Please create two scripts by including one set up of above variables for Oracle 8i and other for Oracle 9i and execute each of the specific script to connect to Oracle.
I think for Oracle 8i, for the user, it is already setup through .profile but not the case with Oracle 9i.
Thanks,
Sesha
From: Edward Yuan 26-Aug-02 21:10
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
No luck here. The environment variables are properly setup.
And they are the same scripts as the ones used by the oracle owner user id.
Thanks.
Edward.
From: Oracle, Chandrasekhar Madathil 27-Aug-02 08:49
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
Hi,
Please see that the filesystem /opt/oracle has been mounted with setuid enabled. I think you can
get this information from /etc/mnttab file. Please get in touch with the system admin and confirm the same ..
Thanks,
Chandra
@OSS
From: Edward Yuan 27-Aug-02 15:26
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
Hi,
The oracle ( the executable file under $ORACLE_HOME/bin) shown above is setuid enabled. The /opt filesystem is not. See bellow cut from /etc/mnttab file:
/dev/md/dsk/d3 /var ufs rw,suid,dev=1540003,largefiles 1026770080
/dev/md/dsk/d4 /opt ufs largefiles,dev=1540004 1026770122
The Oracle 8i works fine. I used the same unix userid (oracle) to install both 8i and 9i ( in /opt/oracle/product/8.1.7 and /opt/oracle/product/9.0.1 respectively ). So there should not be problem there.
Thanks.
Edward.
From: Oracle, Chandrasekhar Madathil 28-Aug-02 14:33
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
Hi,
I am not sure why it is working fine in 8i. But you need to mount the filesystem with setuid enabled.
So please unmount /opt and mount it with setuid enabled and see if that fixes the issue.
If the issue does not resolve even after enabling setuid at filesyatem level, we need to take a truss output
of sqlplus and analyze. In order to do this effectively, I would suggest you to log a TAR with Oracle Support
and upload the details ...
Thanks,
Chandra
@OSS
From: Edward Yuan 28-Aug-02 21:45
Subject: Re : ORA-27121 error when tried to use sqlplus to connect
Super...
You are right. After I have my system admin remount the file system without nosuid, everything works fine now. Thx.
Bookmarks