Linux error 2 no such file or directory oracle

How to Resolve ORA-09925: Unable to create audit trail file

There’re two error scenarios of ORA-09925 in this post:

Single-instance Databases

Tried to startup a test database that was duplicated from the production one.

SQL> startup
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925

ORA-09925 told us that it cannot find the audit destination ( AUDIT_FILE_DEST ) specified in the initialization parameters to put new audit files. Usually, it’s because the audit directory does not exist or due to a permission problem.

Before we inspect the problem more deeply, we should know current audit file destination.

Check Audit File Destination

We can check the parameter file which is a plain-text file that we can check. Suppose SPFILE is at the default location:

SQL> create pfile=’/home/oracle/pfile’ from spfile;

Please note that, if SPFILE is not at the default location, you might get ORA-01565: error in identifying file ‘?=/dbs/spfile@.ora’

A simple grep can know it.

[oracle@test ~]$ grep -i audit_file_dest /home/oracle/pfile
*.audit_file_dest=’/u01/app/oracle/admin/ORCLCDB/adump’

No Such Directory

Now let’s see the condition of the path.

[oracle@test ~]$ ll /u01/app/oracle/admin/ORCLCDB/adump
ls: cannot access ‘/u01/app/oracle/admin/ORCLCDB/adump’: No such file or directory

There’s no such directory. Possibly, it has been moved to another place or the permission of the directory has been changed, then you should inspect the directory and make sure it’s existing:

[oracle@test ~]$ cd $ORACLE_BASE/admin
[oracle@test admin]$ ll
.

No Space Left

If this is a database running for a long time, you may see errors like this:

ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 28: No space left on device
Additional information: 9925

There’s could be that the mount point is 100% used:

[oracle@test admin]$ df -h /u01
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-u01 100G 100G 0 100% /u01

Solutions to ORA-09925

For cases with no space left, we should either clear some audit files to release some space or add more space to the mount point.

For cases with no such directory, we should create one for the audit file destination.

[oracle@test ~]$ mkdir -p /u01/app/oracle/admin/ORCLCDB/adump

SQL> startup
.
SQL> select name, open_mode from v$database;

Читайте также:  Установить gta san andreas linux

RAC Databases

Tried to start a newly created and empty standby RAC database to NOMOUNT, but it failed with ORA-09925.

[oracle@standby01 ~]$ srvctl start database -d orclstb -o nomount
PRCD-1332 : failed to start database ORCLSTB
PRCR-1079 : Failed to start resource ora.orclstb.db
CRS-5017: The resource action «ora.orclstb.db start» encountered the following error:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
. For details refer to «(:CLSN00107:)» in «/u01/app/grid/diag/crs/standby02/crs/trace/crsd_oraagent_oracle.trc».

CRS-2674: Start of ‘ora.orclstb.db’ on ‘standby02’ failed
CRS-2632: There are no more servers to try to place resource ‘ora.orclstb.db’ on that would satisfy its placement policy
CRS-5017: The resource action «ora.orclstb.db start» encountered the following error:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
. For details refer to «(:CLSN00107:)» in «/u01/app/grid/diag/crs/standby01/crs/trace/crsd_oraagent_oracle.trc».

CRS-2674: Start of ‘ora.orclstb.db’ on ‘standby01’ failed

As you can see, there’re a lot of errors in stack, but the most useful error message is ORA-09925: Unable to create audit trail file.

Check Audit File Destination

If you don’t have any parameter file, you should make one for further inspection. In addition, you should specify the location of SPFILE in the statement. For examples:

Create PFILE From ASM

SQL> create pfile=’/home/oracle/pfile’ from spfile=’+DATA/ORCLSTB/spfile’;

No matter the database is idle or not, you can always create PFILE anytime as long as ASM instance is running in this node.

Create PFILE From Local OS

SQL> create pfile=’/home/oracle/pfile’ from spfile=’/tmp/spfile’;

Then we can check the parameter file that we created above by a simple grep .

[oracle@standby01 ~]$ grep -i audit_file_dest /home/oracle/pfile
*.audit_file_dest=’/u01/app/oracle/admin/ORCLSTB/adump’

OK, we set a path for audit files in SPFILE.

Solutions to ORA-09925

We should make the directory on both nodes.

[oracle@standby01 ~]$ mkdir -p /u01/app/oracle/admin/ORCLSTB/adump [oracle@standby02 ~]$ mkdir -p /u01/app/oracle/admin/ORCLSTB/adump

[oracle@standby01 ~]$ srvctl start database -d orclstb -o nomount
[oracle@standby01 ~]$ srvctl status database -d orclstb
Instance ORCLSTB1 is running on node standby01
Instance ORCLSTB2 is running on node standby02

Источник

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

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

Не совсем понял, как отключение от интернета повлияло на переименование /dev/shm ? И там не переименование, а пересоздание, хотя и оно не нужно, достаточно перемотирование.

1 ответ 1

ORA-27101: shared memory realm does not exist

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

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

Читайте также:  Linux with amd support

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

$ echo startup|sqlplus / as sysdba 
env | egrep -i "oracle_(sid|home)" 

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

export ORACLE_SID=orcl; . oraenv 

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

$ echo exit|sqlplus -l user/pass Connected to: Oracle Database 11g Release 11.2.0.1.0 - Production $ ORACLE_HOME=$ORACLE_HOME/; test -d $ORACLE_HOME && echo "directory exists" # ------^ directory exists 

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

$ echo exit|sqlplus -l user/pass ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory 

Источник

My Previous Experience

More information you Share, More information you Get.

HOW TO RESOLVE ORA-09925 ?

I get the ORA-09925 error when trying to log on to SQL*Plus:
ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
ORA-01075: you are currently logged on

ORACLE was not able to create the file being used to hold audit trail records. that could be becaouse of

1) AUDIT_FILE_DEST is not writable
2) $ORACLE_BASE/admin/$ORACLE_SID/adump exists and is not writable
3) $ORACLE_HOME/rdbms/audit is not writable

1) AUDIT_FILE_DEST is not writable

$ env
_=/usr/bin/env
ORACLE_SID=FOO
TERM=dtterm
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_3
PWD=/u01/app/oracle/product/10.2.0/db_3
$ $ORACLE_HOME/bin/sqlplus -L “/ as sysdba”
SQL> startup
ORA-09925: Unable to create audit trail file
Linux Error: 2: No such file or directory
Additional information: 9925
ORA-01075: you are currently logged on
$ grep -i audit_file_dest $ORACLE_HOME/dbs/*$ORACLE_SID.ora
audit_file_dest=/u01/app/oracle/admin/orcl/adump
$ ls -lad /u01/app/oracle/admin/orcl/adump
/u01/app/oracle/admin/orcl/adump not found
$ mkdir -p /u01/app/oracle/admin/orcl/adump
$ $ORACLE_HOME/bin/sqlplus -L “/ as sysdba”
SQL> startup nomount
ORACLE instance started.
SQL> shutdown normal
ORACLE instance shut down.

2) $ORACLE_BASE/admin/$ORACLE_SID/adump exists and is not writable

$ ls -ltr $ORACLE_BASE/admin/$ORACLE_SID
dr-xr-xr-x. 2 oracle oinstall 4096 Dec 9 14:15 adump/
$ $ORACLE_HOME/bin/sqlplus -L “/ as sysdba”

SQL*Plus: Release 10.2.0.3.0 –
Production on Mon Dec 17 09:02:29 2007

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

ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
ORA-01075: you are currently logged on

$ chmod +w /u01/app/oracle/admin/orcl/adump
$ $ORACLE_HOME/bin/sqlplus -L “/ as sysdba”

SQL*Plus: Release 10.2.0.3.0 –
Production on Mon Dec 17 09:02:48 2007

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

Connected to an idle instance.

3) $ORACLE_HOME/rdbms/audit is not writable

$ cat $ORACLE_HOME/dbs/init$ORACLE_SID.ora
db_name=MTS01
$ $ORACLE_HOME/bin/sqlplus -L “/ as sysdba”

SQL*Plus: Release 10.2.0.3.0 –
Production on Mon Dec 17 09:02:29 2007

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

ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
ORA-01075: you are currently logged on

Читайте также:  Astra linux postgresql contrib

$ ls -ltr $ORACLE_HOME/rdbms/audit
dr–r–r–. 2 oracle oinstall 4096 Dec 8 11:13 audit
$ cd $ORACLE_HOME
$ chmod 755 ./rdbms/audit
$ $ORACLE_HOME/bin/sqlplus “/ as sysdba”

SQL*Plus: Release 10.2.0.3.0 –
Production on Mon Dec 17 08:49:12 2007

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

Connected to an idle instance.

Источник

Login into Oracle Database Error

I had installed Oracle 12 to my Linux box. I tried to login using sqlplus but it prompt out this error at below. How to solve it?

Enter user-name: SYSDBA Enter password: ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 3701 Additional information: 542678011 Process ID: 0 Session ID: 0 Serial number: 0

1 Answer 1

[oracle@myserver ~]$ ps -ef | grep pmon oracle 29336 1 0 Apr27 ? 00:00:22 ora_pmon_oracdb 
[oracle@myserver Desktop]$ export ORACLE_SID=orcl 
[oracle@myserver Desktop]$ sqlplus sys SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:23:50 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Enter password: ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 3701 Additional information: -923528497 Process ID: 0 Session ID: 0 Serial number: 0 
[oracle@myserver ~]$ export ORACLE_SID=oracdb [oracle@myserver ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:28:40 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 

When your instance is down and connected as a non-sys user Use the following linux command to check whether some of the important background processes are running or not such PMON or SMON.

[oracle@myserver ~]$ ps -ef| grep pmon oracle 57587 57044 2 00:52 pts/3 00:00:00 grep pmon 

My oracle instance is down. Now, as you have tried, I attempt to connect to the database using non-sys user, sysdba is a privilege not a database user.

[oracle@myserver ~]$ sqlplus sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:53:04 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Enter password: ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 3701 Additional information: -688980181 Process ID: 0 Session ID: 0 Serial number: 0 Enter user-name: 

I got the same error as you have got. Now, connect as sysdba / sysoper and start the database instance.

[oracle@myserver ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:53:36 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup 

Источник

Оцените статью
Adblock
detector