- Error code
- ORA-01034
- Product
- Oracle Database
- Versions
- Oracle Database 19c, 21c, 23ai and 26ai (wording differs: see below)
- Category
- Instance State & Internal Errors
- Last reviewed
- 24 October 2026
On this page
What it means
ORA-01034 means the client reached a database server, but the Oracle instance it asked for is not running there, or is identified wrongly, so there is nothing to connect to.
An Oracle instance is the set of memory structures and background processes that serve a database. Oracle's current reference says ORA-01034 occurs when you try to connect to a database, ASM or ASMIOSERVER instance that is not available: it was specified incorrectly, or it was shut down, failed to start or was aborted. The Action is to check that you are connecting to the correct instance and, if so, restart it.
The 19c wording is "ORACLE not available", and that reference names two specific causes: the SGA needs more memory than was allocated for it, and the operating system variable that points to the instance is set wrongly. That variable is ORACLE_SID. A local connection such as sqlplus / as sysdba uses ORACLE_SID (and ORACLE_HOME) to find the instance, so a typo or the wrong home makes a running instance look absent. 19c also says to read the accompanying messages; ORA-27101 "shared memory realm does not exist" is a common companion, meaning no instance memory was found for that SID.
On Windows, the instance runs as a service named OracleService followed by the SID (for example OracleServiceFREE); if that service is stopped, the instance is not running.
Common causes
- The instance is shut down: after a server restart without automatic start, a planned shutdown, or on Windows a stopped OracleServiceSID service.
- ORACLE_SID or ORACLE_HOME is unset or wrong in the shell, so a local connection looks for an instance that does not exist.
- The instance failed to start, for example because the SGA needs more memory than is available (named in the 19c reference), or it crashed and was aborted.
- The client connects to the wrong server or instance name, for example a test host where the database is not running.
- An ASM instance that the database depends on is not available.
Diagnose it
Read-only These queries only read the data dictionary (USER_, ALL_ and DBA_ views) and dynamic performance views (V$). They do not change data, privileges or settings, so they are safe to run first. DBA_ and V$ views need the matching privileges.
Check the environment and the instance processes on the server
On Linux and UNIX, print ORACLE_SID and ORACLE_HOME in the shell you connect from (echo $ORACLE_SID) and look for the instance background processes, for example with ps -ef | grep pmon: each running instance has an ora_pmon_SID process. On Windows, check that the OracleServiceSID service is running and what ORACLE_SID is set to. When SQL*Plus connects as SYSDBA to an instance that is not running, it reports "Connected to an idle instance."
Read the alert log for why the instance stopped or did not start
The alert log is in the ADR trace directory, typically under ORACLE_BASE/diag/rdbms/DB_NAME/SID/trace. With the instance down you cannot query V$ views, so read the file on disk; once it is running, V$DIAG_INFO shows the path.
-- once the instance is running again
SELECT name, value
FROM v$diag_info
WHERE name = 'Diag Trace'; The directory with alert_SID.log. Its last entries before the failure (memory errors, file errors, a shutdown) tell you whether a simple start will work.
Confirm the instance and database state after starting
SELECT instance_name, host_name, status, database_status
FROM v$instance;
SELECT name, open_mode FROM v$pdbs; STATUS OPEN means the database is available. STARTED (after STARTUP NOMOUNT) or MOUNTED means it is not open yet. In a CDB, also check that the PDB you need is READ WRITE.
How to fix it
Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.
Point the session at the right instance
Client or network sideIf the instance is running but your shell has the wrong ORACLE_SID or ORACLE_HOME, set them for the session and connect again. The names are examples: use your own SID and Oracle home.
# Linux and UNIX
export ORACLE_SID=FREE
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1 # your Oracle home
# Windows command prompt
set ORACLE_SID=FREE
Start the instance
Changes database stateIf the instance is down, a DBA connects AS SYSDBA and starts it. STARTUP starts the instance, mounts and opens the database. On Windows, start the OracleServiceSID service first if it is stopped; with Oracle Restart or RAC, use srvctl.
Caution: Read the alert log first if the instance crashed or failed to start: starting again without fixing the cause (for example a memory setting) fails the same way. Only start production databases in line with your change process.
sqlplus / as sysdba
STARTUP
Fix the reason it could not start
Changes configurationFollow the accompanying messages and the alert log, as Oracle's 19c Action advises. If the SGA is larger than the server can provide, the memory parameters in the parameter file must be reduced, or the operating system must make more memory available, before STARTUP can succeed.
Examples
Querying after a server reboot, before the instance was started
Not reproduced here: no Oracle Database is installed for this site. The message text is from Oracle's error reference for current releases; Oracle Database 19c and 21c print "ORACLE not available", often with ORA-27101 on the next line. The "idle instance" reply is the one shown in the SQL*Plus STARTUP reference.
sqlplus / as sysdba
-- SQL*Plus answers: Connected to an idle instance.
SELECT status FROM v$instance;
ORA-01034: The Oracle instance is not available for use. Start the instance.
A local connection with the wrong ORACLE_SID
Not reproduced here: no Oracle Database is installed for this site. The result shows the 19c wordings of ORA-01034 and ORA-27101 from Oracle's error reference; the 19c reference names a wrongly defined instance variable as a cause. Current releases word ORA-01034 as shown at the top of this page. Operating system specific lines that may follow are not shown.
# the instance is called FREE, but the shell says:
export ORACLE_SID=FRE
sqlplus app_user
ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist
How to prevent it
Configure the database to start automatically with the server (Oracle Restart, a systemd unit or the Windows service start type) and monitor that the instance is up. Set ORACLE_SID and ORACLE_HOME in a profile script for each Oracle home rather than by hand.
Connect applications through the listener with a service name rather than relying on local environment variables, and check the alert log after every unplanned restart.
Common questions
What does ORA-01034 ORACLE not available mean?
The instance you are trying to reach is not running, or your connection identifies it wrongly. Check ORACLE_SID and the server you connect to, then start the instance if it is down.
Why do I see ORA-27101 shared memory realm does not exist with it?
ORA-27101 is the accompanying message that says no instance memory was found for the SID you used. Either the instance is down, or ORACLE_SID or ORACLE_HOME points to an instance that does not exist.
Should I just restart the database?
First confirm you are on the right server and SID, and read the alert log. If the instance crashed or failed to start, fix that cause first, or the next start fails too.
Learn more on CodeWithSQL
Official documentation
- ORA-01034 (Oracle Database Error Messages)
- Starting Up and Shutting Down (Oracle Database Administrator's Guide 19c)
- STARTUP (SQL*Plus User's Guide and Reference 19c)
- Starting Oracle Database Services (Oracle Database Platform Guide for Windows 19c)
Last technically reviewed 24 October 2026; examples and diagnostics run on Oracle Database Error Messages reference (26ai, 21c and 19c); not run locally. Messages and explanations follow Oracle's Database Error Messages reference; no Oracle Database was available, so the examples were not run locally.