Home » Other » Client Tools » ora-01034 for users other than oracle (oracle standard, 10,2, redhat enterprise 4)
icon5.gif  ora-01034 for users other than oracle [message #599579] Sat, 26 October 2013 07:00 Go to next message
corn_pops
Messages: 6
Registered: October 2013
Junior Member
Hello.

I am having an issue when trying to connect local through SQLPLUS. If I login to sqlplus using oracle user everything is fine, I,m able to login to the database which is already opened and mounted. But if I try to login to sqlplus with another linux user I get the following:

[metro_ctl@LX-TSC2 ~]$ sqlplus metro_ctl/xxxx

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 26 07:22:31 2013

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or direct
ory

I am able to succesfully login to the instance if I do it this way:

[metro_ctl@LX-TSC2 ~]$ sqlplus metro_ctl/xxxx@TSC

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 26 07:43:18 2013

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Release 10.2.0.4.0 - Production

S
QL>

Enviroment variables ORACLE_SID, ORACLE_HOME, PATH to oracle lib and bin are already defined for user metro_ctl, but I still cannot login using sqlplus without putting the SID at the end of sqlplus command line.

listener.ora and tnsnames.ora already have the SID defined in uppercase, the instance is already running:

[oracle@LX-TSC2 client]$ ps -ef|grep pmo
oracle 24463 1 0 06:32 ? 00:00:00
ora_pmon_TSC

[metro_ctl@LX-TSC2 ~]$ tnsping TSC

TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 26-OCT-2013 07:46:01

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = LX-TSC2)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TSC)))
OK (0 msec)


ANy help will be appreciate.
Re: ora-01034 for users other than oracle [message #599580 is a reply to message #599579] Sat, 26 October 2013 07:44 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Check this, https://forums.oracle.com/thread/59128
Re: ora-01034 for users other than oracle [message #599581 is a reply to message #599580] Sat, 26 October 2013 08:08 Go to previous messageGo to next message
corn_pops
Messages: 6
Registered: October 2013
Junior Member
Thanks for your fast reply Lalit. I really appreciate it Razz

I had followed some replies I saw there, but still no luck after reboot listener and oracle instance, I keep getting the same error with non-oracle users Sad

[metro_ctl@LX-TSC2 ~]$ sqlplus metro_ctl/metro_ctl

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 26 08:47:08 2013

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such
file or directory

I have no problem if I work through SQL*Net (abcd/efgh@SID). But how can I manage to login with (abcd/efg) without specifying the SID name which is already defined as env variable.

Thanks in advanced.
Re: ora-01034 for users other than oracle [message #599582 is a reply to message #599581] Sat, 26 October 2013 08:39 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I have no problem if I work through SQL*Net (abcd/efgh@SID). But how can I manage to login with (abcd/efg) without specifying the SID name which is already defined as env variable.

@SID is an entry in the tnsnames.ora file; where "SID" may be the same as ORACLE_SID or different from it.

post the results from the following OS commands

id
env | sort
ps -ef | grep SMON | grep -v grep
ls -ltr $ORACLE_HOME/dbs
cat $ORACLE_HOME/network/admin/tnsnames.ora

COPY the results from above then PASTE all back here

[Updated on: Sat, 26 October 2013 08:48]

Report message to a moderator

Re: ora-01034 for users other than oracle [message #599583 is a reply to message #599582] Sat, 26 October 2013 08:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And also
env | sort | egrep 'TNS|ORA|PATH'
Re: ora-01034 for users other than oracle [message #599587 is a reply to message #599583] Sat, 26 October 2013 09:23 Go to previous messageGo to next message
corn_pops
Messages: 6
Registered: October 2013
Junior Member
Ok Smile Here I go.

[metro_ctl@LX-TSC2 ~]$ id
uid=500(metro_ctl) gid=500(metro_ctl) groups=500(metro_ctl),501(dba),502(oracle) context=user_u:system_r:unconfined_t

[metro_ctl@LX-TSC2 ~]$ env | sort
_=/bin/env
CLASSPATH=/home/metro_ctl/fuentes/java/classes:/home/metro_ctl/fuentes/java/lib/classes12.zip:/home/metro_ctl/fuentes/java/bcprov-jdk 14-128.jar
DIR_CLASS=/home/metro_ctl/fuentes/java
DIR_CONFIG=/home/metro_ctl/config/difusion
DIR_CONFIG_HSM=/home/metro_ctl/config/difusion/HSM
DIR_LOG=/home/metro_ctl/log
FICHERO_CLAVE=/home/metro_ctl/ficheros_clave
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HISTTIMEFORMAT=%F %T
HOMEAPLIC=/home/metro_ctl
HOME=/home/metro_ctl
HOSTNAME=LX-TSC2
INPUTRC=/etc/inputrc
KDEDIR=/usr
LANG=en_US.UTF-8
LD_LIBRARY_PATH=/oracle/product/10.2.0/db_1/lib
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=metro_ctl
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32: *.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*. zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/metro_ctl
NIVEL_TRAZA=100
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/product/10.2.0/db_1
ORACLE_SID=TSC
PATH=/home/metro_ctl/fuentes/java/classes:/home/metro_ctl/fuentes/java/lib/classes12.zip:/home/metro_ctl/fuentes/java/bcprov-jdk14-12 8.jar:/usr/java/j2sdk1.4.1_01:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/metro_ctl/bin:.:/oracle/product/10. 2.0/db_1:/oracle/product/10.2.0/db_1/bin:/oracle/product/10.2.0/db_1/lib:/home/metro_ctl/pipe:/home/metro_ctl/bin
PATH_LOG=/home/metro_ctl/log
PWD=/home/metro_ctl
SHELL=/bin/bash
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT=::ffff:10.250.130.157 19196 22
SSH_CONNECTION=::ffff:10.250.130.157 19196 ::ffff:192.168.166.19 22
SSH_TTY=/dev/pts/3
TERM=xterm
TNS_ADMIN=/oracle/product/10.2.0/db_1/network/admin
USER=metro_ctl


[metro_ctl@LX-TSC2 ~]$ ps -ef | grep SMON | grep -v grep
---------- This didn,t show up nothing Confused ---------------


[metro_ctl@LX-TSC2 ~]$ ls -ltr $ORACLE_HOME/dbs
total 68
-rwxrwxr-x 1 oracle dba 8385 Sep 11 1998 init.ora
-rwxrwxr-x 1 oracle dba 12920 May 3 2001 initdw.ora
-rwxrwxr-x 1 oracle dba 24 Sep 27 16:42 lkTSC
-rwxrwxr-x 1 oracle dba 1544 Sep 27 17:18 hc_TSC.dat
-rw-rw---- 1 oracle dba 1536 Oct 15 16:47 orapwTSC
-rwxrwxr-x 1 oracle dba 3584 Oct 26 06:32 spfileTSC.ora

[metro_ctl@LX-TSC2 ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

TSC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LX-TSC2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TSC)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

[metro_ctl@LX-TSC2 ~]$ env | sort | egrep 'TNS|ORA|PATH'
CLASSPATH=/home/metro_ctl/fuentes/java/classes:/home/metro_ctl/fuentes/java/lib/classes12.zip:/home/metro_ctl/fuentes/java/bcprov-jdk 14-128.jar
LD_LIBRARY_PATH=/oracle/product/10.2.0/db_1/lib
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/product/10.2.0/db_1
ORACLE_SID=TSC
PATH=/home/metro_ctl/fuentes/java/classes:/home/metro_ctl/fuentes/java/lib/classes12.zip:/home/metro_ctl/fuentes/java/bcprov-jdk14-12 8.jar:/usr/java/j2sdk1.4.1_01:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/metro_ctl/bin:.:/oracle/product/10. 2.0/db_1:/oracle/product/10.2.0/db_1/bin:/oracle/product/10.2.0/db_1/lib:/home/metro_ctl/pipe:/home/metro_ctl/bin
PATH_LOG=/home/metro_ctl/log
TNS_ADMIN=/oracle/product/10.2.0/db_1/network/admin
Re: ora-01034 for users other than oracle [message #599588 is a reply to message #599587] Sat, 26 October 2013 09:27 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>ps -ef | grep SMON | grep -v grep

should have been as below

ps -ef | grep -i SMON | grep -v grep
Re: ora-01034 for users other than oracle [message #599589 is a reply to message #599588] Sat, 26 October 2013 09:32 Go to previous messageGo to next message
corn_pops
Messages: 6
Registered: October 2013
Junior Member
BlackSwan wrote on Sat, 26 October 2013 09:27
>ps -ef | grep SMON | grep -v grep

should have been as below

ps -ef | grep -i SMON | grep -v grep



Got it:

[metro_ctl@LX-TSC2 ~]$ ps -ef | grep -i SMON | grep -v grep
oracle 24476 1 0 06:32 ? 00:00:00
ora_smon_TSC

Smile
Re: ora-01034 for users other than oracle [message #599591 is a reply to message #599589] Sat, 26 October 2013 10:30 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
[oracle@localhost ~]$ ipcs -a

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x78827044 1474561    oracle    660        4096       0                       
0x00000000 1540099    oracle    600        393216     2          dest         
0x00000000 1572868    oracle    600        393216     2          dest         
0x00000000 1605637    oracle    600        393216     2          dest         
0x00000000 1638406    oracle    600        393216     2          dest         
0x00000000 1671175    oracle    600        393216     2          dest         
0x00000000 1703944    oracle    600        393216     2          dest         
0x00000000 1736713    oracle    600        393216     2          dest         
0x00000000 1769482    oracle    600        393216     2          dest         
0x00000000 1802251    oracle    600        393216     2          dest         
0x00000000 1835020    oracle    600        393216     2          dest         
0x00000000 1867789    oracle    600        393216     2          dest         
0x00000000 1900558    oracle    600        393216     2          dest         

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x7c882eac 163842     oracle    660        154       


NOTE: the OS permissions mask (perms) is either 600 or 660
which means that if you are not in owner or group that you are prevented from accessing the SGA
This reality matches the previously reported error "Linux Error: 2: No such file or directory"
Re: ora-01034 for users other than oracle [message #599592 is a reply to message #599591] Sat, 26 October 2013 10:42 Go to previous messageGo to next message
corn_pops
Messages: 6
Registered: October 2013
Junior Member
I don,t know if this is relevant or not, but I did check the server on which I am having this issue:

[oracle@LX-TSC2 ~]$ ipcs -a

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 131072 oracle 600 393216 2 dest
0x00000000 163841 oracle 600 393216 2 dest
0x00000000 196610 oracle 600 393216 2 dest
0x00000000 229379 oracle 600 393216 2 dest
0x00000000 262148 oracle 600 393216 2 dest
0x00000000 294917 oracle 600 393216 2 dest
0x00000000 327686 oracle 600 393216 2 dest
0x00000000 360455 oracle 600 393216 2 dest
0x00000000 589832 oracle 600 393216 2 dest
0x00000000 425993 oracle 600 393216 2 dest
0x00000000 458762 oracle 600 393216 2 dest
0x1129c258 1081355 oracle 640 1243611136 17
0x00000000 786444 oracle 600 393216 2 dest

------ Semaphore Arrays --------
key semid owner perms nsems
0xdc3069ec 622592 oracle 640 154

------ Message Queues --------
key msqid owner perms used-bytes messages


All the other servers on which I don,t have this problem, I only have 1 entry in Shared Memory Segments :

[oracle@LX-PTS ~]$ ipcs -a

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0bb6f9ec 65536 oracle 640 2149580800 22

------ Semaphore Arrays --------
key semid owner perms nsems
0x78c97834 360448 oracle 640 154

------ Message Queues --------
key msqid owner perms used-bytes messages



Maybe this is irrelevant, but I wanted to point it out just in case maybe the problem comes from some 'extra' segments running and that shouldn,t be running?
Re: ora-01034 for users other than oracle [message #599596 is a reply to message #599592] Sat, 26 October 2013 13:01 Go to previous messageGo to next message
corn_pops
Messages: 6
Registered: October 2013
Junior Member
Hello.

I finally did solved my problem . I want to thank to all the people who tried to help me with my issue. I am now able to use sqlplus without using SID at the end:

metro_ctl@LX-TSC2$ sqlplus metro_ctl/metro_ctl
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 26 13:41:51 2013
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Release 10.2.0.4.0 - Production

SQL> select * from cat where rownum < 7;

TABLE_NAME TABLE_TYPE
------------------------------ -----------
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


I solved it doing the following steps:
1)Log on as root and change permission.

bash-3.00$ su Password:
# umask 022
# cd $ORACLE_HOME
# chmod 755 *
# cd $ORACLE_BASE/admin/$ORACLE_SID
# chmod 755 *
# cd $ORACLE_HOME/bin
# chmod 6751 oracle
# exit
Re: ora-01034 for users other than oracle [message #599616 is a reply to message #599596] Sat, 26 October 2013 16:13 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I think that perhaps you have not run the $ORACLE_HOME/root.sh script on this Oracle Home. You should do so, it adjusts the permissions on several files - if you don't do it, you'll have other problems later.
Previous Topic: Audit logging issue with SQL Developer
Next Topic: ORA-01031: insufficient privileges
Goto Forum:
  


Current Time: Thu Mar 28 09:29:36 CDT 2024