Ошибка соединения ora 01034

I hit the same shared memory realm does not exist symptom (on Windows) but for a different reason. I had just installed Oracle (XE) and after some troubleshooting, established that my installation was corrupt due to the presence of an ORACLE_HOME environment property at the time I installed it.

If this is TLDR, skip to ‘So to resolve:’!

My initial symptom was:

Message 850 not found; No message file for product=NETWORK, facility=NL

Apparently the Windows install reads the ORACLE_HOME from the registry and doesn’t need (and certainly in my case shouldn’t have…) an environment property.

Remove it, as follows:

  1. Edit the system environment settings (Windows key and start
    typing ‘env’ and you should see this option come up.
  2. Delete any User and System Environment Variables called ORACLE_HOME, if
    present. (make a note of their values, mainly out of interest, but may be of
    use if you want to put them back for some reason!)
  3. Restart your machine. Don’t muck around with just a log off — restart your
    machine. The Windows Oracle install uses Windows services by default
    and your installation is currently very bad — it needs a restart.

Following the restart I was then able to get error messages other than ‘No message file…’ and could start looking at what the issue was.
Setting the ORACLE_SID to XE and connecting @XE I got as far as the errors in this page, namely the following symptoms:

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

Another symptom was:
When launching the ‘Get started’ page it failed to connect, giving a not found error (if I recall correctly), despite the Windows listener & XE services being started. As noted in another answer, this could be due to the windows services not being started. In my case those services were started, so something else was misconfigured.

At this point, I figured maybe my install had just gone so badly wrong due to the presence of my bad ORACLE_HOME environment property that I should reinstall. (Previous reinstalls hadn’t helped, but those had all been before I noticed the ORACLE_HOME system environment property (probably set up by me a year ago!).

So to resolve:

  1. Close any app looking at the Oraclexe install directory (editors/explorer/cmd prompts)
  2. A quick trip to Add/Remove programs and uninstall OracleXe
  3. Double-check you have no ORACLE_HOME environment property set anywhere, remember — Windows will use registry entries to get it.
  4. Restart (take no chances — we’re in this for the long term!)
  5. Did you make sure there was no ORACLE_HOME property?
  6. Run the Oracle installer again (as local admin account if applicable)
  7. You should be able to rejoice in a working install. I did, at least!

I hit the same shared memory realm does not exist symptom (on Windows) but for a different reason. I had just installed Oracle (XE) and after some troubleshooting, established that my installation was corrupt due to the presence of an ORACLE_HOME environment property at the time I installed it.

If this is TLDR, skip to ‘So to resolve:’!

My initial symptom was:

Message 850 not found; No message file for product=NETWORK, facility=NL

Apparently the Windows install reads the ORACLE_HOME from the registry and doesn’t need (and certainly in my case shouldn’t have…) an environment property.

Remove it, as follows:

  1. Edit the system environment settings (Windows key and start
    typing ‘env’ and you should see this option come up.
  2. Delete any User and System Environment Variables called ORACLE_HOME, if
    present. (make a note of their values, mainly out of interest, but may be of
    use if you want to put them back for some reason!)
  3. Restart your machine. Don’t muck around with just a log off — restart your
    machine. The Windows Oracle install uses Windows services by default
    and your installation is currently very bad — it needs a restart.

Following the restart I was then able to get error messages other than ‘No message file…’ and could start looking at what the issue was.
Setting the ORACLE_SID to XE and connecting @XE I got as far as the errors in this page, namely the following symptoms:

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

Another symptom was:
When launching the ‘Get started’ page it failed to connect, giving a not found error (if I recall correctly), despite the Windows listener & XE services being started. As noted in another answer, this could be due to the windows services not being started. In my case those services were started, so something else was misconfigured.

At this point, I figured maybe my install had just gone so badly wrong due to the presence of my bad ORACLE_HOME environment property that I should reinstall. (Previous reinstalls hadn’t helped, but those had all been before I noticed the ORACLE_HOME system environment property (probably set up by me a year ago!).

So to resolve:

  1. Close any app looking at the Oraclexe install directory (editors/explorer/cmd prompts)
  2. A quick trip to Add/Remove programs and uninstall OracleXe
  3. Double-check you have no ORACLE_HOME environment property set anywhere, remember — Windows will use registry entries to get it.
  4. Restart (take no chances — we’re in this for the long term!)
  5. Did you make sure there was no ORACLE_HOME property?
  6. Run the Oracle installer again (as local admin account if applicable)
  7. You should be able to rejoice in a working install. I did, at least!

Oracle databases are widely used in the industry; sometimes, you may encounter errors when working with them. One such error is the ORA-01034 Oracle not available error, which indicates that the Oracle database instance is not available. This error can be frustrating, especially when working on a critical project. In this article, we will discuss what this error is, what causes this error, and how to resolve it.

What is ORA-01034 Error?

ORA-01034 is an error code indicating that the Oracle database instance is unavailable. This error usually occurs when the Oracle database service is not running or is not accessible. When you try to connect to the database, you will get the following error message:

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

This error can occur on any operating system, including Windows, Linux, and Unix.

Causes of ORA-01034 Error

There can be several causes of the ORA-01034 error. Some of the most common causes are:

1. Oracle Service Not Running

If the Oracle service is not running, you cannot connect to the database instance. The Oracle service can stop due to several reasons, including hardware failure, power outage, or software issues.

2. Incorrect Oracle SID

The Oracle SID is a unique identifier for the database instance. If the Oracle SID is incorrect, you cannot connect to the database instance. This error can occur when you try to connect to a different database instance or when the Oracle SID is misspelled.

3. Invalid Login Credentials

If you use incorrect login credentials, you cannot connect to the database instance. This error can occur when you forget your password or when your account is locked.

4. Database Corruption

Database corruption can also cause the ORA-01034 error. If the database files are corrupted, you will not be able to connect to the database instance. This error can occur due to hardware failure, software issues, or power outages.

How to Resolve ORA-01034 Error

Now that we know the causes of the ORA-01034 error, let’s list the possible ways to resolve it. Here are some steps that you can follow:

  • Check Oracle Service
  • Verify Oracle SID
  • Verify Login Credentials
  • Check Database Corruption

Check the Oracle Service

The first step is to check if the Oracle service is running. You can do this by opening the Services app in Windows and checking if the Oracle service is running. If the service is not running, start it and try to connect to the database again.

Verify the Oracle SID

Make sure that you are using the correct Oracle SID. You can check the Oracle SID by running the following command in the command prompt:

If the Oracle SID is incorrect, set it to the correct value by running the following command:

Replace “sid” with the correct Oracle SID.

Verify the Login Credentials

Make sure that you are using the correct login credentials. If you forget your password, you can reset it by running the following command:

alter user username identified by new_password;

Replace “username” with your username and “new_password” with your new password.

Check for Database Corruption

If none of the above steps work, check for database corruption. You can do this by running the following command in the command prompt:

If you get the following error message, the database files may be corrupted:

ORA-01157: cannot identify/lock

If you get the above error message, the database files may be corrupted. In this case, you need to restore the database from a backup or perform recovery operations.

To perform recovery operations, you can follow these steps:

  1. Open the command prompt and connect to the database using the following command:
  1. Check the status of the database using the following command:
  1. Recover the database using the following command:
  1. Open the database using the following command:

Once the database is open, try to connect to it and check if the ORA-01034 error is resolved.

Conclusion

The ORA-01034 error is a common error that occurs when the Oracle database instance is not available. This error can occur due to various reasons, including the Oracle service not running, incorrect Oracle SID, invalid login credentials, and database corruption. To resolve this error, you can follow the steps mentioned above, which include checking the Oracle service, verifying the Oracle SID and login credentials, and checking for database corruption. By following these steps, you can quickly resolve the ORA-01034 error and continue working on your projects.

FAQs

What is the Oracle SID?

Oracle SID is a unique identifier for the database instance.

Why am I getting the ORA-01034 error?

You may be getting the ORA-01034 error due to various reasons, including the Oracle service not running, incorrect Oracle SID, invalid login credentials, and database corruption.

How can I check if the Oracle service is running?

You can check if the Oracle service is running by opening the Services app in Windows and checking if the Oracle service is running.

Can I reset my password if I forget it?

Yes, you can reset your password by running the following command: alter user username identified by new_password;

What should I do if the database files are corrupted?

If the database files are corrupted, you must restore the database from a backup or perform recovery operations.

Error

ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0

Vast majority of errors in Oracle can be divided into two categories. The first of which are errors caused by syntax issues, often small user-generated mistakes in typing or issuing commands. The second types are errors in the network, typically revolving around connectivity issues or memory space management. The ORA-01034 falls into this latter category as a primarily storage-based error.

Causes

An ORA-01034 error is triggered due to the Oracle system not being available or started up. This could derive from the System Global Area (SGA) necessitating more storage space than what is currently being allocated for your Oracle database. It could also be that operating system variable pointing to the instance was not properly defined. The error could also result during an upgrade of your Oracle systems.

Solutions

The ORA-01034 is almost always accompanied with additional error messages, often times ORA-27101: shared memory realm. ORA-01034 error could derive from the database parameters of your SGA being modified and no longer holding a proper amount of storage. You can go back and reissue the original parameters to potentially resolve this issue.

You should also check to make sure ORACLE_HOME and ORACLE_SID properly match. ORACLE_SID is the instance pointer mentioned before. Be sure that ORACLE_HOME is not followed by a trailing slash at the end. Search for ORACLE_SID using ‘echo $ORACLE_SID’ for Unix and by right-clicking the My Computer tab in Windows, clicking on Properties, then the Advance tab, and finally the Environment variable. You may find that ORACLE_SID is undefined or left blank, which is causing your ORA-01034 error.

If you believe the problem is the result of upgrading Oracle, you can check two files (/etc/oratab and /var/opt/oracle/oratab) for an invalid entry. Match the ORACLE_HOME and ORACLE_SID in these files. If they do not match, this needs to be resolved in order to resolve the error.

Actions

Refer to accompanying messages for possible causes and correct the problem mentioned in the other messages. If Oracle has been initialized, then on some operating systems, verify that Oracle was linked correctly. See the platform specific Oracle documentation.

The ORA-01034 error can sometimes be fixed by setting the ORACLE_SID environment variable:

Unix/Linux :

$ORACLE_SID=xxx 
$export ORACLE_SID
$sqlplus sys/manager@xxx as sysdba
SQL> startup

Window :

C:\> set ORACLE_SID=xxx
C:\> sqlplus sys/manager@xxx as sysdba
C:\> startup You may find that you are experiencing ORA-01034 when attempting to upgrade your Oracle database. 

ORA-01034 is thrown during the attempt to upgrade because there is an invalid entry in one of the following files:

  1. /etc/oratab
  2. /var/opt/oracle/oratab

The ORA-01034 is a result of a discrepancy between ORACLE_HOME and ORACLE_SID

To resolve ORA-01034, be sure that the ORACLE_HOME and ORACLE_SID properly match within the files /etc/oratab or /var/opt/oracle/oratab .

As a last step in solving your ORA-01034 problem and running DBUA, make sure that ORACLE_HOME is set to ‘old’ home, not ‘new’ home.

Screenshots

Error ORA-01034: ORACLE not available
Error ORA-01034: ORACLE not available
ORA-01034: ORACLE not available Fix
ORA-01034: ORACLE not available Fix

Oh, that’s a way of the How to solve | ORA-01034: ORACLE Not Available error’ on my website at this time. If you have any suggestions for additional issues just leave a comment below, and I’ll see what I can do. You can find more Oracle related articles from here.

Please feel free to share this post with anyone who might be interested..

About Author

Charaka Hettiarachchi

Charaka is a personal tech blogger who writes about important tech trends on web development, wordpress, day today technical issues. I work as a system support engineer and has over 6 years of industry experience.

Здравствуйте, уважаемые коллеги. Хочу поделиться сегодня с вами ситуацией, с которой столкнулся при подключении к базе данных Oracle 12c из стороннего клиентского приложения (архитектура клиент-сервер). При отладке приложения и запуске команды running fnd_nodes cleanup получил ошибку:

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

При этом я вполне мог подключиться к базе данных и выполнить autoconfig на стороне базы. Но на стороне приложения все также вылетали ошибки  и я не смог подключиться к БД из приложения. При этом база данных Oracle запущена и работает штатно.

Честно говоря, я не особо понял причину этой ошибки. Я проверил файлы XML и DBC, файл TNSNAME и listener, но я понять ничего не смог. Все в норме.

Причина ошибки ORA-01034 и ORA-2710

Поколупавшись еще немного в интернете и своих мозгах, я понял эти ошибки связаны с ограниченной сессией к базе данных (db restricted session). Для того, чтобы запустить adstats.sql в приложении, я должен был разрешить ограниченную сессию к ДБ (restricted session). Но я забыл закрыть ее после того, как запустил adstats.sql. Это и вызывало ошибки.

Как исправить ошибки ORA-01034 и ORA-2710

Просто я отключился от БД один раз (закрыл сессию), так как я не мог выяснить причину проблемы сразу в процессе устранения неполадок. После этого эта ошибка исчезла.

Также вы можете выполнить следующую команду, чтобы избежать этой ошибки и без  необходимости в закрытии сессии:

SQL> alter disable restricted session;

Вас заинтересует / Intresting for you:

Понравилась статья? Поделить с друзьями:
  • Ошибка соединения null
  • Ошибка соединения not local sender over smtp
  • Ошибка скания 784
  • Ошибка скания 719
  • Ошибка скания 65417