Linux error 2 no such file or directory oracle

Ошибка после установки на Ubuntu ORA-27101: shared memory realm does not exist

SQL*PLUS выдаёт ошибку:

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0

Ставила по этой инструкции.
Но пропустила шаг:

потому, что при простой замене имени каталога /dev/shm у меня пропал интернет. Просто так удалять системные файлы, боязно. Теперь не могу удалить /dev/shm , т.к. он занят.

1 ответ 1

Сообщение об ошибке:

ORA-27101: shared memory realm does not exist

означает, что процесс (обычно Listener, sqlplus ) не может подсоединиться к System Global Area (SGA).

В основном это вызывают две причины:

SGA действительно не существует, так как инстанция БД не стартовала. Стартуйте инстанцию БД под пользователeм oracle :

Shared memory segment Id для подключения к SGA генерируется из значений переменных окружения: $ORACLE_SID + $ORACLE_HOME . Если эти значения не соответствуют тем, которые были использованы при запуске инстанции БД, то будет выше указанная ошибка, так как такого сегмента не существует. Проверьте переменные окружения:

Значения $ORACLE_SID + $ORACLE_HOME , которые были использованы при установке хранятся в /etc/oratab и устанавливаются так:

Например, если попытаться установить вручную и при этом ошибиться:

Всё хорошо, директория существует и sqlplus из неё будет вызываться, но незначащий слэш даст при подсчёте shmid другое значение:

Источник

Errors — ORA-01034, ORA-27101 & Linux-x86_64 Error: 2: No such file or dir

I have installed Oracle 10g database and AS 10g on SUSE linux EE 10 (SP2)

When I try to log in as system/system using sqlplus locally on the server, it works fine. However, when I try the following I get error messages:

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

I tried the same from my laptop through sqlplus and the error message is the same.

I checked if the database was up and to check this I executed follwing commands whicle still being logged as system/system:

SQL>Select * from v$database;

SQL>Select * from v$instance;

SQL>Select * from tab;

These do bring results. Also if I try to start up the database again, it gives error message that the database is already up. I have restarted the db number of times, checked if my listener was listening on the service BOTSDB and these all seem fine.

It is very intriguing that when @BOTSDB is attached while connecting, the connection fails.

Can someone please guide me to sort this error?

Thanks and kind regards,
Aparna

Best Answer

Your problem might be the trailing backslashes in the ORACLE_HOME lines in listener.ora.

Suggest you try removing the trailing / characters and restarting the listener.

Answers

ps -ef |grep pmon

can you post back the results.

I sounds like you have not set the ORACLE_SID correctly for your databaes.

I am answering all the three questions here.

1) No of instances on the machine, I understand it is 1.

Читайте также:  Windows operating system threads

2) Results of lsnrctl status

LSNRCTL for Linux: Version 10.1.0.4.2 — Production on 28-JUL-2010 09:19:33

Copyright (c) 1991, 2004, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxserv.dcdm.mu)(PORT=1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 10.1.0.4.2 — Production
Start Date 27-JUL-2010 11:24:12
Uptime 0 days 21 hr. 55 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/ora10ginfra/network/admin/listener.ora
Listener Log File /oracle/app/ora10ginfra/network/log/listener.log
Listening Endpoints Summary.
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linuxserver.dcdm.mu)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary.
Service «PLSExtProc» has 1 instance(s).
Instance «PLSExtProc», status UNKNOWN, has 1 handler(s) for this service.
Service «metarep.dcdm.mu» has 1 instance(s).
Instance «metarep», status READY, has 3 handler(s) for this service.
The command completed successfully

—Note that lsnrctl status command was issued after loading 10ginfra.env file.

Please note that the listener for the database is set as DBLISTENER and lsnrctl status DBLISTENER was executed after loading 10gdb.env file. The results of lsnrctl status DBLISTENER are as follows:

> lsnrctl status DBLISTENER

LSNRCTL for Linux: Version 10.2.0.1.0 — Production on 28-JUL-2010 09:24:44

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.107.123)(PORT=1650)))
STATUS of the LISTENER
————————
Alias DBLISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 — Production
Start Date 27-JUL-2010 15:11:28
Uptime 0 days 18 hr. 13 min. 15 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/ora10gdb/network/admin/listener.ora
Listener Log File /oracle/app/ora10gdb/network/log/dblistener.log
Listening Endpoints Summary.
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.107.123)(PORT=1650)))
Services Summary.
Service «BOTSDB» has 1 instance(s).
Instance «BOTSDB», 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

3) The output of ps -ef |grep pmon is

> ps -ef |grep pmon
oracle 12524 12091 0 09:16 pts/1 00:00:00 grep pmon
oracle 12525 1 0 Jul27 ? 00:00:00 ora_pmon_metarep
oracle 25776 1 0 Jul27 ? 00:00:00 ora_pmon_BOTSDB

The contents of listener.ora in two different Oracle Homes (one for AS infrastrcuture and another one for database) are as follows:

[email protected]:/oracle/app/ora10ginfra/network/admin> vi listener.ora
# listener.ora Network Configuration File: /oracle/app/ora10ginfra/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/ora10ginfra)
(PROGRAM = extproc)
)
)

[email protected]:/oracle/app/ora10gdb/network/admin> vi listener.ora
# Generated by Oracle configuration tools.

SID_LIST_DBLISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/ora10gdb/)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = BOTSDB)
(ORACLE_HOME = /oracle/app/ora10gdb/)
)
)

Источник

ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory

I downloaded the oracle webcenter linux VM and had a problem connecting to the database

when i try to connect to the db using sqlplus, i get the error.

ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux-x86_64 Error: 2: No such file or directory

Session ID: 0 Serial number: 0

I have set my ORACLE_HOME and ORACLE_SID. export ORACLE_HOME=/oracle/db/ohome and ORACLE_SID=orcl. The same values set in my listener.ora and tnsnames.ora

My hosts file had 2 entries for 127.0.0.1, so i commented one and now only 1 localhost entry

::1 localhost localhost.localdomain

I restarted my vm after the changes but i still get the same error — ORA-27101 shared memory realm does not exist.

Appreciate if i could get help here resolving this problem and able to connect to my db.

Answers

Copy pate the output of the following command:-

ps -ef | grep ora_

and which user u are trying to connectvthe db .

Читайте также:  Sftp ������ ��� mac os

The error means the SGA (sharem mem struct) of the database does not exist.

Typically caused by one of two issues.

Attempting to connect to the wrong SGA — SGA is uniquely identified by server process trying to attach to the SGA via ORACLE_HOME and ORACLE_SID.

The SGA does not exist as the database instance has not yet been started and the SGA not yet created.

So is the database instance started? Is the environment used for a local connection correct?

That’s an odd value for ORACLE_HOME. It needs to be where the executables are, so for example ls -l $ORACLE_HOME/bin/oracle should show you something like

oinstall 284467056 May 29 2008 /oracle/app/oracle/product/10.2.0/db_1/bin/oracle

(of course, with your version, not my old one)

You also need to adjust you path so you can say things like

In other words, don’t confuse $ORACLE_HOME with your user home directory.

There are several questions. The first would be, is the database online?

ps -aef |grep smon

ps -aef |grep pmon

The only two times that I’ve seen this error, or had users report this error, the database was either simply offline or the volume housing the database, sqlplus etc. was no longer presented to the server.

As mentioned before, it would be pertinent to check the /etc/oratab to make sure the database is registered with the server.

If you left everything default, «orcl» SID and port 1521.

# This file is used by ORACLE utilities. It is created by root.sh

# and updated by the Database Configuration Assistant when creating

# A colon, ‘:’, is used as the field terminator. A new line terminates

# the entry. Lines beginning with a pound sign, ‘#’, are comments.

# Entries are of the form:

# The first and second fields are the system identifier and home

# directory of the database respectively. The third filed indicates

# to the dbstart utility that the database should , «Y», or should not,

# «N», be brought up at system boot time.

# Multiple entries with the same $ORACLE_SID are not allowed.

orcl:/oracle/db/ohome and ORACLE_SID:N

Источник

Linux Error: 2: No such file or directory

Trying to complete my installation or Oracle 9i (9.2.0.4) on RedHat Linux AS2.1. One last error (I hope):

I have set ORACLE_SID=bluetest and can connect to the database ok with:
# sqlplus «/ as sysdba»
SQL> startup pfile=/path/to/pfile

database is mounted and opened. I can even run queries such as ‘select tname from tab». I even created new tables etc. No problems there.

However, when I try to connect using:
# sqlplus user/[email protected]

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

# tnsping bluetest works fine and user does exist and has connect privilege.

I have checked bdump/alert_bluespace.log and udump/*.trc files but I cannot find any errors in there.

Also, the $ORACLE_HOME directory and subdirectories are all owned by user «oracle», group «oinstall» and have rwxr-xr-x permissions.

Is there anybody out there that could give me a clue what file or directory it is looking for.

Thanks in advance,

Comments

If local connection works, but listener connection does not, most likely reason is ORACLE_HOME setting in listener.ora is wrong (directory does not exist, setting has syntax errors, for example a / at the end is not allowed).

I did check that, below is my listener.ora file:

# LISTENER.ORA Network Configuration File: /home/oracle/OraHome1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /home/oracle/OraHome1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = bluetest)
(ORACLE_HOME = /home/oracle/OraHome1)
)
)

What could be slightly more worrying is the following:
[[email protected] admin]$ lsnrctl status

LSNRCTL for Linux: Version 9.2.0.4.0 — Production on 06-DEC-2004 13:48:00

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 — Production
Start Date 06-DEC-2004 09:50:20
Uptime 0 days 3 hr. 57 min. 39 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /home/oracle/OraHome1/network/admin/listener.ora
Listener Log File /home/oracle/OraHome1/network/log/listener.log
Listening Endpoints Summary.
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary.
Service «PLSExtProc» has 1 instance(s).
Instance «PLSExtProc», status UNKNOWN, has 1 handler(s) for this service.
Service «bluetest» has 1 instance(s).
Instance «bluetest», status UNKNOWN, has 1 handler(s) for this service.
Service «bluetest.domain» has 1 instance(s).
Instance «bluetest.domain», status READY, has 2 handler(s) for this service.
The command completed successfully

I don’t know how to correct the status for the bluetest instance though.
# sqlplus user/[email protected] results in ORA-12154

Источник

Linux Error: 2: No such file or directory

Comments

Hello,
that may be necessary, because I can’t see any errors in configuration files.
Let the installation process do all the work once more , including all configuration files.

Oracle screwed the pooch on this one.
In their zeal to secure the database after several high profile exploits were published, some propeller head decided to change the permissions on all files, so any user not in the privilege group (usually dba) can’t access the files in $ORACLE_HOME. You may see where some dolt suggests adding any user who needs to use the oracle binaries to the dba group, but that will open a HUGE security hole. **don’t do it**
Who ever is in the dba group can connect as user SYS without a password ala:

connect / as sysdba

There is a patch for bug 4516865 available on Metalink

After applying this patch, you may still need to set the SUID bit for the oracle executable. Try:

chmod 6711 $ORACLE_HOME/bin/oracle

Basically the message is that there is no instance called ‘bluetest’ up and running. This can be
a) because it’s not up, or
b) because it’s not up even though you think it is.
In the second case, there may be a service name, instance name or tns name mismatch.

Go into the database using «/ as sysdba» and show the parameters, specifically the INSTANCE

SQL> show parameter instance

you should get an instance name.

Check if the database is registering itself with the listener, by entering the command

and see what instances it’s watching.

Also, try sqlplus user/password (without @bluetest), after setting the ORACLE_SID.

I note that you seem to be using root — generally considered a bad idea, and I have had a few hiccups, especially when I’ve tried to start the database under root. If so, try starting it as the official oracle database owner and see what happens.

Источник

Читайте также:  Инсталлер для mac os
Оцените статью
-rwsr-s—x 1 oracle