Ora 01041 внутренняя ошибка hostdef расширение не существует

Home » Articles » Misc » Here

This article provides an example of using the SYSRESV utility to identify the shared memory segments associated with an Oracle instance.

This specific issue is not the only cause of an ORA-01041.

  • The Problem
  • The Solution (SYSRESV Utility)

The Problem

A couple of times we’ve had problems with instances not responding. When we try to connect to the database from the server we get something like this.

$ export ORACLE_SID=orcl
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 13 08:41:23 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-01041: internal error. hostdef extension doesn't exist

$

When you check on the OS you can see the processes running, but there is no way to connect. Even a preliminary connection fails. There is nothing you can do with the instance, so the obvious thing to try and do is kill it, but you can’t do this with a «shutdown» or «shutdown abort» because you can’t connect. Instead you try to kill it at the OS level.

$ kill -9 `ps -ef | grep orcl | awk '{print $2}'`

After this you see all the processes gone, but you still can’t connect to the instance.

$ export ORACLE_SID=orcl
$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jul 13 08:41:23 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-01041: internal error. hostdef extension doesn't exist

$

The Solution (SYSRESV Utility)

The last time this happened we guessed it might be about shared memory segments hanging around after the instance has died. You can check the shared memory directly, but it can be difficult to relate this back to the instances. One way is by comparing the creation time of the shared memory segment with the V$INTANCE.STARTUP_TIME column of other running instances on the server and use a process of elimiation. The type of output you can expect from «ipcs -mpt» is shown below.

$ ipcs -mpt
IPC status from /dev/kmem as of Wed Jul 13 10:04:09 2016
T         ID     KEY        MODE        OWNER     GROUP  CPID  LPID   ATIME    DTIME    CTIME
Shared Memory:
m          0 0x411c0123 --rw-rw-rw-      root      root   957 29670  7:14:00  7:14:00  9:47:13
m          1 0x4e0c0002 --rw-rw-rw-      root      root   957  4731  9:06:51  9:15:11  9:47:13
m          2 0x41200006 --rw-rw-rw-      root      root   957 29670  7:14:00  7:14:00  9:47:13
m          3 0x00a5c581 --rw-------     sfmdb     users  2065  2102  9:48:14  9:48:14  9:48:14
m          4 0x06347849 --rw-rw-rw-      root      root  2623  2629  9:48:50  9:48:47  9:48:47
m          5 0x0c6629c9 --rw-r-----      root      root  2644  4295 10:33:52 10:34:17  9:48:47
m      32774 0xa90c08cc -----------      root      root  2954  2955  9:49:03 no-entry  9:49:03
m          7 0x012009d0 --rw-rw-r--      root      root  2660  2660  9:48:48  9:48:48  9:48:48
m          8 0x012009cc --rw-rw-r--      root      root  2662  2662  9:48:48  9:48:48  9:48:48
m          9 0x012009c4 --rw-rw-r--      root      root  2666  2666  9:48:48 no-entry  9:48:48
m         10 0x49143b35 --rw-r--r--      root      root  2629  2629 10:04:00 10:04:00  9:48:49
m         11 0x012009ce --rw-rw-r--      root      root  2709  2709  9:48:49 no-entry  9:48:49
m      32780 0x00000000 --rw-r-----    oracle  oinstall  6230 11639 10:03:44 10:03:44 12:00:36
m         13 0x00000000 --rw-r-----    oracle  oinstall  6230 11639 10:03:44 10:03:44 12:00:36
m         14 0x00000000 --rw-r-----    oracle  oinstall  6230 11639 10:03:44 10:03:44 12:00:36
m         15 0x588c2d20 --rw-r-----    oracle  oinstall  6230 11639 10:03:44 10:03:44 12:00:36
m      32784 0x00000000 --rw-r-----    oracle  oinstall  6560 11683 10:04:03 10:04:03 12:01:02
m         17 0x00000000 --rw-r-----    oracle  oinstall  6560 11683 10:04:03 10:04:03 12:01:02
m         18 0x375d46a0 --rw-r-----    oracle  oinstall  6560 11683 10:04:03 10:04:03 12:01:02
m      32787 0x00000000 --rw-r-----    oracle  oinstall  7117 11663 10:04:00 10:03:46 12:04:33
m         20 0x00000000 --rw-r-----    oracle  oinstall  7117 11663 10:04:00 10:03:46 12:04:33
m         21 0x00000000 --rw-r-----    oracle  oinstall  7117 11663 10:04:00 10:03:46 12:04:33
m         22 0x00000000 --rw-r-----    oracle  oinstall  7117 11663 10:04:00 10:03:46 12:04:33
m         23 0x10badea0 --rw-r-----    oracle  oinstall  7117 11663 10:04:00 10:04:00 12:04:33
m      98328 0x00000000 --rw-r-----    oracle  oinstall  7969 11681 10:04:02 10:04:02 12:06:39
m         25 0x00000000 --rw-r-----    oracle  oinstall  7969 11681 10:04:02 10:04:02 12:06:39
m         26 0x00000000 --rw-r-----    oracle  oinstall  7969 11681 10:04:02 10:04:02 12:06:39
m         27 0x00000000 --rw-r-----    oracle  oinstall  7969 11681 10:04:02 10:04:02 12:06:39
m         28 0x09c1865c --rw-r-----    oracle  oinstall  7969 11681 10:04:02 10:04:02 12:06:39
m     196637 0x00000000 --rw-r-----    oracle  oinstall  8741 11665 10:04:00 10:03:49 12:08:13
m         30 0x00000000 --rw-r-----    oracle  oinstall  8741 11665 10:04:00 10:03:49 12:08:13
m         31 0x00000000 --rw-r-----    oracle  oinstall  8741 11665 10:04:00 10:03:49 12:08:13
m         32 0x00000000 --rw-r-----    oracle  oinstall  8741 11665 10:04:00 10:03:49 12:08:13
m         33 0xb747ec2c --rw-r-----    oracle  oinstall  8741 11665 10:04:00 10:04:00 12:08:13
m     426018 0x00000000 --rw-r-----    oracle  oinstall  2869  9042 10:03:02 10:04:00  8:55:00
m      32803 0x00000000 --rw-r-----    oracle  oinstall  2869  9042 10:03:02 10:04:00  8:55:00
m      32804 0x00000000 --rw-r-----    oracle  oinstall  2869  9042 10:03:02 10:04:00  8:55:00
m      32805 0x00000000 --rw-r-----    oracle  oinstall  2869  9042 10:03:02 10:04:00  8:55:00
m      32806 0x472f4a20 --rw-r-----    oracle  oinstall  2869  9042 10:03:02 10:04:00  8:55:00
$

Instead, you can use the «$ORACLE_HOME/bin/sysresv» command to give you the shared memory segments associated with a named instance.

$ sysresv -l orcl

IPC Resources for ORACLE_SID "orcl" :
Shared Memory:
ID              KEY
98338           0x00000000
35              0x00000000
36              0x00000000
37              0x00000000
38              0x472f4a20
Semaphores:
ID              KEY
12312           0xdd03b17c
Oracle Instance not alive for sid "orcl"
$ 

So we can see there are shared memory segments for an instance that is now dead.

It worked as expected, but if for some reason it is not able to link the dead instance to the shared memory segments, you can always work backwards. Check the segments for all the running instances. If there are any shared memory segments for «oracle oinstall» from the «ipcs -mpt» command that are not seen in the following output, by a process of elimination, they must belong to the dead instance.

$ sysresv -l instance1 instance2 instance3

Once we know the dodgy shared memory segments (directly or indirectly) we can we can remove them using «ipcrm».

$ ipcrm -m 98338
$ ipcrm -m 35
$ ipcrm -m 36
$ ipcrm -m 37
$ ipcrm -m 38

Once that is done, you should be able to connect to, and start the instance normally.

It’s possible once you remove the first segment (98338) the others will no longer be seen as linked to the instance, but you will still need to remove them or you will be able to connect, but the instance will not start.

For more information see:

  • SYSRESV Utility (Doc ID 123322.1)

Hope this helps. Regards Tim…

Back to the Top.

Category:

  • IT
  • Cancel

При попытке подключится к базе ErWin выругался

Oracle Vers. 8.xx/9i/10g error 1041, severity 16:
ORA-01041: внутренняя ошибка. hostdef расширение не существует


Проблема решилась просто.
Способ 1.
Нужно в поле Connection String вписать алиас базы данных, который прописан в файле tnsnames.ora.
Этот файлик лежит в %ORACLE_HOME%network\admin\
Способ 2.
Нужно в поле Connection String вписать параметры соединения те содержимое алиаса
Пример:

(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.200.28) (PORT = 1521)))(CONNECT_DATA = (SID = ORCL)))
Подчеркнутые значения IP и SID заменить на собственные.

May 10, 2021

I got ” ORA-01041: internal error. hostdef extension doesn’t exist ”  error in Oracle database.

ORA-01041: internal error. hostdef extension doesn’t exist

Details of error are as follows.

ORA-01041: internal error. hostdef extension doesn"t exist

Cause: Pointer to hstdef extension in hstdef is null.

Action: Report as a bug


After some system changes, e.g. replacing the motherboard, in the server, trying to connect or startup the database fails.
The service is running, but you are unable to connect as sysdba using a domain account:

SQL> connect / as sysdba
ORA-01041: internal error. hostdef extension doesn't exist

SQL> startup
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-01041: internal error. hostdef extension doesn't exist

A domain administrator account is used to connect.  If the local system account is used, the connection as sysdba works fine.

internal error. hostdef extension doesn’t exist

This ORA-01041 error is related with the Pointer to hstdef extension in hstdef is null.

Report as a bug.

The system time was set incorrectly.

The local system time did not match the time on the domain server causing the authentication to fail.

To implement the solution, please execute the following steps:

1. Set the local system time correctly. Consult your operating system documentation for instructions on setting the system time.

2. Reboot the server.

3. Verify that the database starts and that sysdba connections can be made.

OR

Second case’s solution is to set SQLNET.AUTHENTICATION_SERVICES = (NONE) in sqlnet.ora ( under $ORACLE_HOME/network/admin )


Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Oracles documentation states:

ORA-01041: internal error. hostdef extension doesn't exist
    Cause: Pointer to hstdef extension in hstdef is null.
    Action: Report as a bug

So, if you have support from them, I’d suggest that you contact them. Digging into errors in Oracle can really drive you mad sometimes.

But from what I have understood the error have to do with the connection between the databases (or the database and the client), so there are a few things you can check.

First of all, it could be that simple that the files just doesn’t exists.

So verify that these files exists (and can be read by the database):

/home/u01/app/oracle/oradata/orcl/system01.dbf
/home/u01/app/oracle/oradata/orcl/sysaux01.dbf

Also verify that the ORACLE_HOME is set correctly, and that the tnsnames.ora contains the definition to both of the databases (it should since you are connected to both of them, but better verify it), and also check if you’re using a different tnsnames than the database.

The listener could be a problem as well, perhaps the stdby never gets registered there, you can try to add it manually in the listener file instead of letting it register itself.

I have also had problems if the hostname used doesn’t exist in the /etc/hosts file, even if using a dns, so that is something you could try as well.

If it still doesn’t help. have a look in the alert log and trace files, perhaps they provide more information of the problem.

That’s all the ideas I’ve got, hope it helps you a bit at least.

Update:
hmm, after checking a bit more, it looks to me that one issue could be that you actually don’t specify the location of the db-files.

Try to add:

set db_file_name_convert='/home/u01/app/oracle/oradata/orcl/', 
    '/home/u01/app/oracle/oradata/stdby/'

after the spfile statement

You might also want to add parameter_value_convert 'orcl','stdby' not sure if it is neccessary, but it looks like it could be a good idea.

I want to disable the archive logs in my oracle db. But when i shutdown and try to mount the database i am getting the following error.

C:\>sqlplus scott/tiger@ORCL as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 18 10:44:17 2012

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
SQL> startup mount
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist

Can any one please help me in resolving this issue.

Edit1:- Listener.ora

# listener.ora Network Configuration File:    E:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
     (SID_NAME = PLSExtProc)
     (ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
     (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = INHOS.dg.server.com)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
  )

)

asked Sep 18, 2012 at 5:30

Andromeda's user avatar

AndromedaAndromeda

12.7k20 gold badges77 silver badges103 bronze badges

Not sure if this is root cause, but after shutdown and before startup, try exiting and re-entering SQL*Plus.

First edit:
Ok, so, two different problems. The «hostdef extension doesn’t exist» error happens when you try to startup from the same SQL*Plus session you shutdown from. Solution is to exit and re-enter SQL*Plus between shutdown and startup.

The ORA-12514 «Listener does not currently know of service requested in connect descriptor» is due to trying to remotely start (your SQL*Plus connect string is scott/tiger@ORCL as sysdba which specifies @ORCL) the instance, and the listener is configured only for dynamic service registration. If your listener is configured only for dynamic service registration, then trying to remotely start the instance will give you an ORA-12514. It’s a bit of a catch-22. The problem is, until the instance is started, it can’t register with the listener. If it’s not registered with the listener, you can’t start it up. There are two possible solutions:

  1. You could add a static listener configuration to the listener.ora file and bounce the listener.
  2. You could directly login as the Oracle software owner, to the server that the database is installed on, and set ORACLE_HOME and ORACLE_SID, then connect as / as sysdba.

Hope that helps.

Mat's user avatar

Mat

203k41 gold badges393 silver badges406 bronze badges

answered Sep 18, 2012 at 6:17

Mark J. Bobak's user avatar

Mark J. BobakMark J. Bobak

13.8k6 gold badges40 silver badges68 bronze badges

2

ORA-24324 can mean that the database simply has not been started, and so the resolution would be to
first start the database and listeners (if any)

answered Mar 14, 2014 at 17:57

user3421054's user avatar

Понравилась статья? Поделить с друзьями:
  • Osstatus ошибка 19 mac os
  • Osstatus ошибка 1 дисковая утилита
  • Ora 01403 описание ошибки
  • Osf ошибка частотника
  • Ora 01034 ora 27101 ошибка