Data-Base
asked on
cannot connect to Oracle on Linux
Hello,
I installed Oracle 10g 64Bit on Oracle Enterprise Linux (OEL) and it seems it work fine but
when I try to connect to it with SQL Navigator I get error message
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
here is my setup
I have windwos 7 64 Bit with Oracle Client 32Bit
I can connect to all other servers that we have (in tnsnames.ora) with no problems
my OEL is installed on a VMware Workstation (worked fine when I had Windows Server with Oracle)
all what I did is make another VM with OEL and Oracle 10g
when I installed OEL I use the Oracle-Validate package
from the server side all seems OK (I welcome any help to make an internal test)
I just need to connect to it with SQL Navigator and tart using it :-)
here is the files on the server
========================== ========== ========== ========== ========== ======
# listener.ora Network Configuration File: /oracle/product/db/network /admin/lis tener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/db)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /oracle/product/db)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
========================== ========== ========== ========== ========== ======
# tnsnames.ora Network Configuration File: /oracle/product/db/network /admin/tns names.ora
# Generated by Oracle configuration tools.
VM.Linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl)
(GLOBAL_NAME = orcl)
)
(HS = OK)
)
========================== ========== ========== ========== ========== ======
on my Computer (part of the file, I have more servers)
========================== ========== ========== ========== ========== ======
VM.Windows =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.10)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = ORCL))
)
VM.Linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = ORCL))
)
========================== ========== ========== ========== ========== ======
I installed Oracle 10g 64Bit on Oracle Enterprise Linux (OEL) and it seems it work fine but
when I try to connect to it with SQL Navigator I get error message
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
here is my setup
I have windwos 7 64 Bit with Oracle Client 32Bit
I can connect to all other servers that we have (in tnsnames.ora) with no problems
my OEL is installed on a VMware Workstation (worked fine when I had Windows Server with Oracle)
all what I did is make another VM with OEL and Oracle 10g
when I installed OEL I use the Oracle-Validate package
from the server side all seems OK (I welcome any help to make an internal test)
I just need to connect to it with SQL Navigator and tart using it :-)
here is the files on the server
==========================
# listener.ora Network Configuration File: /oracle/product/db/network
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/db)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /oracle/product/db)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
==========================
# tnsnames.ora Network Configuration File: /oracle/product/db/network
# Generated by Oracle configuration tools.
VM.Linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl)
(GLOBAL_NAME = orcl)
)
(HS = OK)
)
==========================
on my Computer (part of the file, I have more servers)
==========================
VM.Windows =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.10)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = ORCL))
)
VM.Linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = ORCL))
)
==========================
tnsping only talks to the listener, not the actual database.
The errors above mean the database itself is down. Go to the server in question and check the alert log for the database and see why it isn't starting up.
The errors above mean the database itself is down. Go to the server in question and check the alert log for the database and see why it isn't starting up.
ASKER
Thanks,
do you have any tips on how to check/test/diagnose the problem?
what logs should I check?
for me when I write the command "dbstart" it does not return any error!
also I can log into sqlplus in the server!
do you have any tips on how to check/test/diagnose the problem?
what logs should I check?
for me when I write the command "dbstart" it does not return any error!
also I can log into sqlplus in the server!
Which entry in the tnsnames.ora file is generating the ORA-01034?
ASKER
on my computer
I want to connect to VM.Linux
I hope it is that what you mean (asked)
yep.
So you have Oracle installed locally and want to connect to Oracle on your Linux VM, correct?
When you are logged in to 192.168.222.20:
You can connect with SQL*Plus?
The listener on the Linux machine is listening for ORCL( lsnrctl status)?
Also, the '.' might be confusing Oracle into thinking a domain setup. try changing the tnsnames.ora file to: VM_Linux
So you have Oracle installed locally and want to connect to Oracle on your Linux VM, correct?
When you are logged in to 192.168.222.20:
You can connect with SQL*Plus?
The listener on the Linux machine is listening for ORCL( lsnrctl status)?
Also, the '.' might be confusing Oracle into thinking a domain setup. try changing the tnsnames.ora file to: VM_Linux
ASKER
Hello,
The Oracle DB is installed on Oracle Enterprise Linux which is running in a Virtual Machine (in my PC)
now from my PC which is running Windows 7 I want to connect to the Oracle Database
I have another Virtual Machine on the same PC which is Windows Server and I could connect to it with no problems at all!
the Windows server had the IP 192.168.222.10 and with the "." it worked perfectly (and the other windows servers at work has also "." and they all work)
but as you said it's maybe the Linus Server who does not like the "." !?!
yes, The listener on the Linux machine is listening for ORCL( lsnrctl status)
within the same server I can connect to the database with SQLPlus using #sqlplus "as sysdba" and it works
but I can not connect to it from the windows client! I get the same error as the SQL Navigator
I will test the vm.linux to vm_linux ? but here at my Computer or the VM ?
The Oracle DB is installed on Oracle Enterprise Linux which is running in a Virtual Machine (in my PC)
now from my PC which is running Windows 7 I want to connect to the Oracle Database
I have another Virtual Machine on the same PC which is Windows Server and I could connect to it with no problems at all!
the Windows server had the IP 192.168.222.10 and with the "." it worked perfectly (and the other windows servers at work has also "." and they all work)
but as you said it's maybe the Linus Server who does not like the "." !?!
yes, The listener on the Linux machine is listening for ORCL( lsnrctl status)
within the same server I can connect to the database with SQLPlus using #sqlplus "as sysdba" and it works
but I can not connect to it from the windows client! I get the same error as the SQL Navigator
I will test the vm.linux to vm_linux ? but here at my Computer or the VM ?
From your computer.
you say from your computer tnsping vm.Linux works? It shows the correct server and service.
It's only when you try: sqlplus /@vm.linux as sysdba that it fails. Please confirm.
you say from your computer tnsping vm.Linux works? It shows the correct server and service.
It's only when you try: sqlplus /@vm.linux as sysdba that it fails. Please confirm.
ASKER
Hi,
when I "tnsping vm.linux" from my computer it works I get OK
and it shows everything right
when I try to "sqlplus /@vm.linux as sysdba"
I get error
ORA-01031: insufficient privileges
then I get a questions to enter username and password, I did and I get another error
ORA-12560: TNS:error with protocol adepter
all this from my PC
now I discovered if I do that within the server I get "sqlplus /@vm.linux as sysdba"
I get error
ORA-01031: insufficient privileges
and asks me for username so I do enter them and I get
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
when I "tnsping vm.linux" from my computer it works I get OK
and it shows everything right
when I try to "sqlplus /@vm.linux as sysdba"
I get error
ORA-01031: insufficient privileges
then I get a questions to enter username and password, I did and I get another error
ORA-12560: TNS:error with protocol adepter
all this from my PC
now I discovered if I do that within the server I get "sqlplus /@vm.linux as sysdba"
I get error
ORA-01031: insufficient privileges
and asks me for username so I do enter them and I get
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
ASKER
I did now changed the "." to "_"
vm.linux ---> vm_linux
and restart the database and the listener and I get the same error!
vm.linux ---> vm_linux
and restart the database and the listener and I get the same error!
Do you need to connect remotely 'as sysdba'? You will need to mess with the password file (orapwd) and remote authentication.
http://it.toolbox.com/wiki/index.php/Remote_login_as_Sysdba_to_Oracle_database_server
From a Linux terminal window: sqlplus / as sysdba
SQL> create user myuser identified by mypassword;
SQL> grant create session to myuser;
Then from your local machine try connecting as myuser (no 'as sysdba').
http://it.toolbox.com/wiki/index.php/Remote_login_as_Sysdba_to_Oracle_database_server
From a Linux terminal window: sqlplus / as sysdba
SQL> create user myuser identified by mypassword;
SQL> grant create session to myuser;
Then from your local machine try connecting as myuser (no 'as sysdba').
ASKER
Hi,
in the server, from a Linux terminal window I run: sqlplus / as sysdba
and I'm in, I did SQL> create user myuser identified by mypassword;
I got ORA-01034: Oracle not available
!!!!!
in the server, from a Linux terminal window I run: sqlplus / as sysdba
and I'm in, I did SQL> create user myuser identified by mypassword;
I got ORA-01034: Oracle not available
!!!!!
OK, I'm not sure where I got off track. The instance is down on the Linux machine.
from the linux machine run the following and post the results:
sqlplus / as sysdba
SQL> startup
from the linux machine run the following and post the results:
sqlplus / as sysdba
SQL> startup
ASKER
ok just to make sure.
in the user "oracle"'s .bash_profile
export ORACLE_BASE=/oracle
export ORACLE_HOME=${ORACLE_BASE} /product/d b
export ORACLE_SID=orcl
export NLS_LANG=NORWEGIAN_NORWAY. WE8ISO8859 P1
PATH=${ORACLE_HOME}/bin:$P ATH
export CDPATH=.:${ORACLE_HOME}:${ ORACLE_BAS E}/admin/$ {ORACLE_SI D}
export LANG=en_US
PS1=$(hostname)':${ORACLE_ SID}> '
now the results of the command
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2020224 bytes
Variable Size 96472192 bytes
Database Buffers 184549376 bytes
Redo Buffers 2170880 bytes
Database mounted.
Database opened.
SQL>
and now I run the commands
SQL> create user mytest identified by mytest;
User created.
SQL> grant create session to mytest;
Grant succeeded.
SQL>
I will test the connection now
in the user "oracle"'s .bash_profile
export ORACLE_BASE=/oracle
export ORACLE_HOME=${ORACLE_BASE}
export ORACLE_SID=orcl
export NLS_LANG=NORWEGIAN_NORWAY.
PATH=${ORACLE_HOME}/bin:$P
export CDPATH=.:${ORACLE_HOME}:${
export LANG=en_US
PS1=$(hostname)':${ORACLE_
now the results of the command
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2020224 bytes
Variable Size 96472192 bytes
Database Buffers 184549376 bytes
Redo Buffers 2170880 bytes
Database mounted.
Database opened.
SQL>
and now I run the commands
SQL> create user mytest identified by mytest;
User created.
SQL> grant create session to mytest;
Grant succeeded.
SQL>
I will test the connection now
ASKER
so I changed vm.linux to vm_linux and tnsping and it is OK
now when I try to "sqlplus /@vm_linux as sysdba"
I get error
ORA-01031: insufficient privileges
then I get a questions to enter username and password, I did and I get another error
ORA-12560: TNS:error with protocol adepter
and I get the same if I run within the server !!!
Forget 'as sysdba' for now. That is a special privilege and normally you don't need to connect as SYS remotely.
You created a test user so from your local PC try: sqlplus mytest/mytest@vm_linux
I assume the tnsnames entry on your local machine is vm_linux and you didn't change it back to vm.linux.
>>ORA-12560: TNS:error with protocol adepter
This is probably because of the tnsnames.ora file on the Linux machine.
You created a test user so from your local PC try: sqlplus mytest/mytest@vm_linux
I assume the tnsnames entry on your local machine is vm_linux and you didn't change it back to vm.linux.
>>ORA-12560: TNS:error with protocol adepter
This is probably because of the tnsnames.ora file on the Linux machine.
ASKER
from within the server
[oracle@oracle ~]$ sqlplus mytest/mytest@vm_linux;
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 20:12:30 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
and it askes for username and password again!
Enter user-name: mytest
Enter password: mytest
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
sql>
ok! so what does that mean?
now when I try to "sqlplus mytest/mytest@vm_linux" from my PC
I get error
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
then I get a questions to enter username and password, I did and I get another error
ORA-12560: TNS:error with protocol adepter
and now what this mean
[oracle@oracle ~]$ sqlplus mytest/mytest@vm_linux;
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 20:12:30 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
and it askes for username and password again!
Enter user-name: mytest
Enter password: mytest
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
sql>
ok! so what does that mean?
now when I try to "sqlplus mytest/mytest@vm_linux" from my PC
I get error
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
then I get a questions to enter username and password, I did and I get another error
ORA-12560: TNS:error with protocol adepter
and now what this mean
Let's back up for a minute and explain a little about Oracle. Oracle out of the box is client-server. The server needs specific config files and the client needs specific config files. One of the main client configs is the tnsnames.ora file. So, every 'client' connection over a network needs the tnsnames.orace file properly configured.
>>from within the server
>>[oracle@oracle ~]$ sqlplus mytest/mytest@vm_linux;
Have you configred the tnsnames.ora file on the linux box to know about vm_linux?
>>and it askes for username and password again!
>>
>>Enter user-name: mytest
>>Enter password: mytest
You did not specify @vm_linux so it didn't use the tnsnames.ora file. I hope this makes sense.
>>now when I try to "sqlplus mytest/mytest@vm_linux" from my PC
Did you reboot the Linux VM?
tripple check:
the database is up and running in the Linux VM:
sqlplus / as sysdba
SQL> select sysdate from dual;
the tnsnames.ora file on the PC to make sure it is pointing the the Linux VM. and tnsping vm_linux still works
>>from within the server
>>[oracle@oracle ~]$ sqlplus mytest/mytest@vm_linux;
Have you configred the tnsnames.ora file on the linux box to know about vm_linux?
>>and it askes for username and password again!
>>
>>Enter user-name: mytest
>>Enter password: mytest
You did not specify @vm_linux so it didn't use the tnsnames.ora file. I hope this makes sense.
>>now when I try to "sqlplus mytest/mytest@vm_linux" from my PC
Did you reboot the Linux VM?
tripple check:
the database is up and running in the Linux VM:
sqlplus / as sysdba
SQL> select sysdate from dual;
the tnsnames.ora file on the PC to make sure it is pointing the the Linux VM. and tnsping vm_linux still works
ASKER
the tnsname.or on the server has
does vm_linux case sensitive ? when I use it with the commands?
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl)
(GLOBAL_NAME = orcl)
)
(HS = OK)
)
sqlplus / as sysdba
SQL> select sysdate from dual;
SYSDATE
----------
12.04.2010
SQL>
I will reboot the system now
but then I need to login as the user oracle
at the command line run
lsnrctl start
then
dbstart
then log in
sqlplus / as sysdba
then run
sql>startup
and it should be ready!?!
does vm_linux case sensitive ? when I use it with the commands?
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl)
(GLOBAL_NAME = orcl)
)
(HS = OK)
)
sqlplus / as sysdba
SQL> select sysdate from dual;
SYSDATE
----------
12.04.2010
SQL>
I will reboot the system now
but then I need to login as the user oracle
at the command line run
lsnrctl start
then
dbstart
then log in
sqlplus / as sysdba
then run
sql>startup
and it should be ready!?!
>>I will reboot the system now
I wish you wouldn't. That might change our current progress.
I wish you wouldn't. That might change our current progress.
>>does vm_linux case sensitive ?
No.
>>sqlplus / as sysdba
This doesn't use the tnsnames.ora file. Only when you add "@vm_linux" does it look in the tnsnames.ora file.
>>then dbstart
or
>>sql>startup
dbstart starts up Oracle databases if told to do so. Nothing more. If you want it to start on boot modify the oratab file. My UNIX is old but it should be in /etc
No.
>>sqlplus / as sysdba
This doesn't use the tnsnames.ora file. Only when you add "@vm_linux" does it look in the tnsnames.ora file.
>>then dbstart
or
>>sql>startup
dbstart starts up Oracle databases if told to do so. Nothing more. If you want it to start on boot modify the oratab file. My UNIX is old but it should be in /etc
ASKER
i do not have oratab !!!!
I saw on the web sites that It's some how used
but I do not have it in my system! should I create it manually ?
I saw on the web sites that It's some how used
but I do not have it in my system! should I create it manually ?
>>i do not have oratab !!!!
Don't worry about this right now. That is a different problem. You will want one eventually so dbshut gets executed on shutdown (otherwise the database isn't being shutdown properly).
>>but I do not have it in my system! should I create it manually ?
probably not. If you don't have it then I'm thinking you didn't run root.sh after the initial install. This used to be the script that created all that.
Don't worry about this right now. That is a different problem. You will want one eventually so dbshut gets executed on shutdown (otherwise the database isn't being shutdown properly).
>>but I do not have it in my system! should I create it manually ?
probably not. If you don't have it then I'm thinking you didn't run root.sh after the initial install. This used to be the script that created all that.
ASKER
[oracle@oracle ~]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-APR-2010 20:44:26
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /oracle/product/db/bin/tns lsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /oracle/product/db/network /admin/lis tener.ora
Log messages written to /oracle/product/db/network /log/liste ner.log
Listening on: (DESCRIPTION=(ADDRESS=(PRO TOCOL=tcp) (HOST=192. 168.222.20 )(PORT=152 1)))
Connecting to (DESCRIPTION=(ADDRESS=(PRO TOCOL=TCP) (HOST=192. 168.222.20 )(PORT=152 1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 12-APR-2010 20:44:27
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/db/network /admin/lis tener.ora
Listener Log File /oracle/product/db/network /log/liste ner.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PRO TOCOL=tcp) (HOST=192. 168.222.20 )(PORT=152 1)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracle ~]$
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-APR-2010 20:44:26
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /oracle/product/db/bin/tns
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /oracle/product/db/network
Log messages written to /oracle/product/db/network
Listening on: (DESCRIPTION=(ADDRESS=(PRO
Connecting to (DESCRIPTION=(ADDRESS=(PRO
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 12-APR-2010 20:44:27
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/db/network
Listener Log File /oracle/product/db/network
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PRO
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracle ~]$
ASKER
I did run the root.sh as root user
>>I did run the root.sh as root user
Maybe they changed things around. My UNIX is pretty old. Anyway, that is a different question.
>>[oracle@oracle ~]$ lsnrctl start
OK? The listener is necessary to connect from a remote client (remember the @vm_linux even when logged in to Linux?).
Is the database up?
Does the Linux tnsnames.ora file have the following entry (I removed a couple of things since you probably don't need it):
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Maybe they changed things around. My UNIX is pretty old. Anyway, that is a different question.
>>[oracle@oracle ~]$ lsnrctl start
OK? The listener is necessary to connect from a remote client (remember the @vm_linux even when logged in to Linux?).
Is the database up?
Does the Linux tnsnames.ora file have the following entry (I removed a couple of things since you probably don't need it):
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
ASKER
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 20:49:07 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2020224 bytes
Variable Size 92277888 bytes
Database Buffers 188743680 bytes
Redo Buffers 2170880 bytes
Database mounted.
Database opened.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
yes the tnsnames.ora in the server has
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl)
(GLOBAL_NAME = orcl)
)
(HS = OK)
)
should I use yours?
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 20:49:07 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 2020224 bytes
Variable Size 92277888 bytes
Database Buffers 188743680 bytes
Redo Buffers 2170880 bytes
Database mounted.
Database opened.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
yes the tnsnames.ora in the server has
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl)
(GLOBAL_NAME = orcl)
)
(HS = OK)
)
should I use yours?
vm_linux =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
>>should I use yours?
Shouldn't matter but I'm not sure what put the 'HS' in yours. For grins, change the name for your entry to vm_linux2 and paste mine in.
Then staying on the linux server.
test the new entry: tnsping vm_linux
then test the connection: sqlplus /@vm_linux as sysdba
Shouldn't matter but I'm not sure what put the 'HS' in yours. For grins, change the name for your entry to vm_linux2 and paste mine in.
Then staying on the linux server.
test the new entry: tnsping vm_linux
then test the connection: sqlplus /@vm_linux as sysdba
ASKER
I did
[oracle@oracle ~]$ tnsping vm_linux
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 12-APR-2010 21:02:56
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/oracle/product/db/network /admin/sql net.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)
[oracle@oracle ~]$
[oracle@oracle ~]$ tnsping vm_linux
TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 12-APR-2010 21:02:56
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/oracle/product/db/network
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.222.20)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)
[oracle@oracle ~]$
ASKER
[oracle@oracle ~]$ sqlplus /@vm_linux as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 21:05:09 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 21:05:09 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
>>ORA-01031: insufficient privileges
That might be a remote auth. issue. Let's skip this for now.
from linux prompt:
sqlplus mytest/mytest@vm_linux
That might be a remote auth. issue. Let's skip this for now.
from linux prompt:
sqlplus mytest/mytest@vm_linux
ASKER
[oracle@oracle ~]$ sqlplus mytest/mytest@vm_linux
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 21:09:50 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Enter user-name:
SQL*Plus: Release 10.2.0.1.0 - Production on Ma Apr 12 21:09:50 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Enter user-name:
hmmmmm OK... Don't see how that's possible since you did the select sysdate from dual above, but let's go with it.
Maybe some ip address conflict?
[oracle@oracle ~]$ nslookup 192.168.222.20
[oracle@oracle ~]$ tracert 192.168.222.20
Maybe some ip address conflict?
[oracle@oracle ~]$ nslookup 192.168.222.20
[oracle@oracle ~]$ tracert 192.168.222.20
ASKER
[oracle@oracle ~]$ nslookup 192.168.222.20
Server: 192.168.222.2
Address: 192.168.222.2#53
** server can't find 20.222.168.192.in-addr.arp a.: NXDOMAIN
I have to run tracert under the user root
[root@oracle oracle]# tracert 192.168.222.20
traceroute to 192.168.222.20 (192.168.222.20), 30 hops max, 40 byte packets
1 192.168.222.20 (192.168.222.20) 0.082 ms 0.013 ms 0.033 ms
[root@oracle oracle]#
Server: 192.168.222.2
Address: 192.168.222.2#53
** server can't find 20.222.168.192.in-addr.arp
I have to run tracert under the user root
[root@oracle oracle]# tracert 192.168.222.20
traceroute to 192.168.222.20 (192.168.222.20), 30 hops max, 40 byte packets
1 192.168.222.20 (192.168.222.20) 0.082 ms 0.013 ms 0.033 ms
[root@oracle oracle]#
This is weird.
If you can connect locally and vm_linux in the linux tnsnames.ora file points to the same ip address, tnsping vm_linux works: You shouldn't get a ORA-01034.
Do you see anything with: ps -ef | grep pmon
If you can connect locally and vm_linux in the linux tnsnames.ora file points to the same ip address, tnsping vm_linux works: You shouldn't get a ORA-01034.
Do you see anything with: ps -ef | grep pmon
ASKER
I do not have greb in my system I'm using Oracle Enterprise Linux !!!! and I do not know how, but it does not have "greb"
grep
ASKER
sorry , it was my fault !!!
yes I do have grep
[root@oracle oracle]# ps -ef | grep pmon
oracle 4499 1 0 20:49 ? 00:00:00 ora_pmon_orcl
root 6018 4902 0 21:28 pts/2 00:00:00 grep pmon
yes I do have grep
[root@oracle oracle]# ps -ef | grep pmon
oracle 4499 1 0 20:49 ? 00:00:00 ora_pmon_orcl
root 6018 4902 0 21:28 pts/2 00:00:00 grep pmon
ASKER
[oracle@oracle ~]$ ps -ef|grep $ORACLE_SID
oracle 4499 1 0 20:49 ? 00:00:00 ora_pmon_orcl
oracle 4501 1 0 20:49 ? 00:00:00 ora_psp0_orcl
oracle 4503 1 0 20:49 ? 00:00:00 ora_mman_orcl
oracle 4505 1 0 20:49 ? 00:00:00 ora_dbw0_orcl
oracle 4507 1 0 20:49 ? 00:00:00 ora_lgwr_orcl
oracle 4509 1 0 20:49 ? 00:00:01 ora_ckpt_orcl
oracle 4511 1 0 20:49 ? 00:00:01 ora_smon_orcl
oracle 4513 1 0 20:49 ? 00:00:00 ora_reco_orcl
oracle 4515 1 0 20:49 ? 00:00:00 ora_cjq0_orcl
oracle 4517 1 0 20:49 ? 00:00:01 ora_mmon_orcl
oracle 4519 1 0 20:49 ? 00:00:00 ora_mmnl_orcl
oracle 4521 1 0 20:49 ? 00:00:00 ora_d000_orcl
oracle 4523 1 0 20:49 ? 00:00:00 ora_s000_orcl
oracle 4542 1 0 20:49 ? 00:00:00 ora_qmnc_orcl
oracle 4552 1 0 20:49 ? 00:00:00 ora_q001_orcl
oracle 4554 1 0 20:49 ? 00:00:00 ora_q002_orcl
oracle 6194 1 0 21:32 ? 00:00:00 ora_j000_orcl
oracle 6215 4252 0 21:33 pts/1 00:00:00 grep orcl
oracle 4499 1 0 20:49 ? 00:00:00 ora_pmon_orcl
oracle 4501 1 0 20:49 ? 00:00:00 ora_psp0_orcl
oracle 4503 1 0 20:49 ? 00:00:00 ora_mman_orcl
oracle 4505 1 0 20:49 ? 00:00:00 ora_dbw0_orcl
oracle 4507 1 0 20:49 ? 00:00:00 ora_lgwr_orcl
oracle 4509 1 0 20:49 ? 00:00:01 ora_ckpt_orcl
oracle 4511 1 0 20:49 ? 00:00:01 ora_smon_orcl
oracle 4513 1 0 20:49 ? 00:00:00 ora_reco_orcl
oracle 4515 1 0 20:49 ? 00:00:00 ora_cjq0_orcl
oracle 4517 1 0 20:49 ? 00:00:01 ora_mmon_orcl
oracle 4519 1 0 20:49 ? 00:00:00 ora_mmnl_orcl
oracle 4521 1 0 20:49 ? 00:00:00 ora_d000_orcl
oracle 4523 1 0 20:49 ? 00:00:00 ora_s000_orcl
oracle 4542 1 0 20:49 ? 00:00:00 ora_qmnc_orcl
oracle 4552 1 0 20:49 ? 00:00:00 ora_q001_orcl
oracle 4554 1 0 20:49 ? 00:00:00 ora_q002_orcl
oracle 6194 1 0 21:32 ? 00:00:00 ora_j000_orcl
oracle 6215 4252 0 21:33 pts/1 00:00:00 grep orcl
no problem. typos happen.
I'm running out of ideas to try. The database appears to be up and running. Everything seems to be configured properly. I can't guess why "sqlplus mytest/mytest@vm_linux" is giving you a ORA-01034.
If we can't get that fixed, I'm thinking there is no way to connect from your host OS.
I've never messed with Oracle Linux but a quick check with our Windows admin (he knows a little Linux), he's thinking it might be the Linux iptables (sort of like a firewall).
For test purposes:
Try changing the listener.ora and tnsnames.ora file to use the local loopback (127.0.0.1).
Then bounce the listener:
lsnrctl stop
lsnrctl start
Make sure ORCL is in the list then try sqlplus again:
--make sure Oracle is still up
sqlplus mytest/mytest
--then test the network
sqlplus mytest/mytest@vm_linux
I'm running out of ideas to try. The database appears to be up and running. Everything seems to be configured properly. I can't guess why "sqlplus mytest/mytest@vm_linux" is giving you a ORA-01034.
If we can't get that fixed, I'm thinking there is no way to connect from your host OS.
I've never messed with Oracle Linux but a quick check with our Windows admin (he knows a little Linux), he's thinking it might be the Linux iptables (sort of like a firewall).
For test purposes:
Try changing the listener.ora and tnsnames.ora file to use the local loopback (127.0.0.1).
Then bounce the listener:
lsnrctl stop
lsnrctl start
Make sure ORCL is in the list then try sqlplus again:
--make sure Oracle is still up
sqlplus mytest/mytest
--then test the network
sqlplus mytest/mytest@vm_linux
ASKER
I disabled Linux firewall and SELinux after I installed OEL, so I do not think it has anything to do with the firewall
I noticed before I change the ip in listner.ora I have to run lsnrctl stop with the old IP
after I changed the IP to 172.0.0.1 I get an erro when running lsnrctl start
TNS-12545: Connect faild becouse target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect faild becouse target host or object does not exist
Linux Error: 99: Cannot assign requested address
Listener faild to start. See the error message(s) above...
I noticed before I change the ip in listner.ora I have to run lsnrctl stop with the old IP
after I changed the IP to 172.0.0.1 I get an erro when running lsnrctl start
TNS-12545: Connect faild becouse target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect faild becouse target host or object does not exist
Linux Error: 99: Cannot assign requested address
Listener faild to start. See the error message(s) above...
>>172.0.0.1
127.0.0.1
127.0.0.1
ASKER
is there any why to try to test connection directly against the IP and ignore the tnsnames.ora ???
>>is there any why to try to test
Yes and no. There are other ways for connecting, like LDAP but TNSNAMES is the simplest ( believe it or not ).
Not that I think there's an issue here but what does your sqlnet.ora file look like?
Yes and no. There are other ways for connecting, like LDAP but TNSNAMES is the simplest ( believe it or not ).
Not that I think there's an issue here but what does your sqlnet.ora file look like?
ASKER
>>172.0.0.1
127.0.0.1
Oh so sorry for that
any why I get the same errors !!! I changed both tnsname.ora and listener.ora to 127.0.0.1
I think I start to make allot typos , it's 22:08 here , need some rest ;-)
but this thing is driving me crazy! it should work
127.0.0.1
Oh so sorry for that
any why I get the same errors !!! I changed both tnsname.ora and listener.ora to 127.0.0.1
I think I start to make allot typos , it's 22:08 here , need some rest ;-)
but this thing is driving me crazy! it should work
ASKER
# listener.ora Network Configuration File: /oracle/product/db/network /admin/lis tener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/db)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /oracle/product/db)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/db)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /oracle/product/db)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
I agree. This should be working.
Get some rest. If I think of anything later I'll post back. When you get back to working on this you might click the 'Request Attention' link above. This will send out a 'call for help' to other experts.
Hopefully they can see what both of us can't.
Get some rest. If I think of anything later I'll post back. When you get back to working on this you might click the 'Request Attention' link above. This will send out a 'call for help' to other experts.
Hopefully they can see what both of us can't.
ASKER
Thanks allot, for your time and help :-)
I will keep trying
I will keep trying
ASKER
I have a question here
when I
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL>
shouldn't it be ORA-01081: cannot start already-running ORCL - shut it down first
Oracle --> ORCL
!?!
when I
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL>
shouldn't it be ORA-01081: cannot start already-running ORCL - shut it down first
Oracle --> ORCL
!?!
>>shouldn't it be ORA-01081
No. ORACLE in the error message is not the database name. It is hard-coded in the error message.
No. ORACLE in the error message is not the database name. It is hard-coded in the error message.
ASKER
I found something interesting, it's mostly related to Oracle security!
it seems no use allows to to connect to Oracle from network requests and I have to create password file and add users to it, still it did not work for me
it seems no use allows to to connect to Oracle from network requests and I have to create password file and add users to it, still it did not work for me
Are you talking about using ORAPWD? That is only for the SYSDBA and SYSOPER users.
ASKER
well I found few examples where using the orapwd will solve my issue !!! but it did not
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your time and help,
even though it did not solve my issue, I did learn allot
I took the case to Oracle
cheers
even though it did not solve my issue, I did learn allot
I took the case to Oracle
cheers
Thanks. There is a lot of good information in this. Please post back what you find out from Oracle in case anyone else has the same problem in the future.
ASKER
Hello,
now the problem was solved :-)
when I run
SQL> select value from v$parameter where name = 'local_listener';
I get nothing
so I needed to:
stop the listener
SQL> alter system set local_listener='(ADDRESS=( PROTOCOL=T CP)(HOST=1 92.168.222 .20)(PORT= 1521))';
SQL> alter system register;
then start the listener and it just worked :-)
thanks to all the help I got at Oracle's Forum
http://forums.oracle.com/forums/thread.jspa?threadID=1063340&tstart=0
cheers
now the problem was solved :-)
when I run
SQL> select value from v$parameter where name = 'local_listener';
I get nothing
so I needed to:
stop the listener
SQL> alter system set local_listener='(ADDRESS=(
SQL> alter system register;
then start the listener and it just worked :-)
thanks to all the help I got at Oracle's Forum
http://forums.oracle.com/forums/thread.jspa?threadID=1063340&tstart=0
cheers
ASKER
when I "tnsping" to my linux server I get OK !!!