How to Resolve ORA-27101: Shared Memory Realm Does Not Exist

Resolve ORA-27101 by checking that your connection targets the correct Oracle instance and software home, then starting the instance if it is actually stopped. The error usually means Oracle cannot find the target instance’s shared memory, not necessarily that the server needs more RAM. Check the server-side environment first, then investigate listener routing or a failed startup if those checks pass.

Use the symptoms below to choose your starting point.

Symptom Likely Cause First Action
Local connections fail and the expected instance background process is absent Instance is stopped or startup failed Confirm the intended instance, then check its startup state
SQL*Plus connects to an idle instance even though the expected database is running Incorrect SID, Oracle home, or server environment Match the connection environment to the running instance
Local connections work, but application or remote connections fail Wrong connection target, service registration, or static listener configuration Compare the application’s connection descriptor with listener services
The error appeared after an SGA change or an unsuccessful restart The instance failed to start or terminated during startup Read the startup error stack and alert log before changing anything else

What ORA-27101 Means

An Oracle instance consists of memory structures and background processes. Its System Global Area, or SGA, contains shared memory used by Oracle processes.

ORA-27101 means the connection cannot locate the expected shared-memory realm. That can happen because the instance is not running, or because the connection is looking for a different instance from the one you intended.

This distinction matters: a missing shared-memory realm is not, by itself, evidence of insufficient memory.

A database also does not have to be fully open for its instance memory to exist. When an instance is running in NOMOUNT or MOUNT, ordinary user connections generally encounter ORA-01033 rather than ORA-27101. Do not assume that opening an already mounted database is the correct repair for every shared-memory error.

How to Resolve ORA-27101 on Linux or UNIX

For a local, single-instance connection on Linux or UNIX, verify the connection environment and the instance’s startup state before deciding whether to start it. Run administrative commands on the database server using an account authorized for Oracle administration, not on a laptop containing only Oracle client software.

For Oracle Restart or RAC-managed databases, use the management tools responsible for the database’s lifecycle rather than starting it independently.

Step 1: Inspect the Current Connection Environment

  1. Start SQL*Plus without connecting to a database:
    sqlplus /nolog
  2. At the SQL> prompt, inspect the local SID:
    !echo $ORACLE_SID

    The result must identify the intended local instance. Confirm it against the database’s deployment configuration or startup configuration. A database name, network service name, and instance SID are not interchangeable.

  3. Inspect the Oracle home:
    !echo $ORACLE_HOME

    This must be the database software home configured to run that instance, not an unrelated installation or a client-only home. For a database that has been upgraded, use its current configured home, not automatically the home that originally created it.

There is no universal SID or Oracle home path. Both must match your installation.

If your shell defines TWO_TASK, also check whether it is redirecting what you thought was a local connection through Oracle Net.

Step 2: Check Whether the Intended Instance Is Running

  1. From SQL*Plus, inspect the instance background processes:
    !ps -ef | grep smon
  2. Look for a process such as ora_smon_ORCL. Ignore the line belonging to the grep command itself.
  3. Match the instance suffix to your intended SID.

The presence of SMON indicates that an instance process exists; it does not prove the database is open or that an application service is available.

If the expected process is missing, first confirm that you are on the correct host or container and can see the Oracle processes. An absent process on the wrong server is not a reason to start a new instance there.

If the expected process exists but your connection reaches an idle instance, investigate the environment mismatch before issuing a startup command.

Step 3: Correct the SID and Oracle Home

  1. Leave SQL*Plus so that environment changes apply to the parent shell:
    EXIT

    Running an export through a SQL*Plus host subprocess does not update the environment of the existing SQL*Plus process.

  2. Set the correct SID. This example assumes the configured SID is ORCL; replace it with your actual instance SID:
    export ORACLE_SID=ORCL

    On UNIX, the SID is case-sensitive. An uppercase/lowercase mismatch can make a connection target a nonexistent instance.

  3. Set the database software home. Replace the placeholder path with the configured home:
    export ORACLE_HOME=/path/to/your/database/home
  4. Put that home’s executables first in the command search path:
    export PATH="$ORACLE_HOME/bin:$PATH"

These assignments use sh, bash, or ksh syntax. In csh or tcsh, use setenv instead of export; the SID assignment is:

setenv ORACLE_SID ORCL

Use the corresponding setenv assignments for the home and command search path when working in those shells.

Step 4: Connect Administratively and Start Only a Stopped Instance

  1. Launch SQL*Plus explicitly from the selected database home:
    "$ORACLE_HOME/bin/sqlplus" / as sysdba

    This uses operating-system authentication and requires an appropriately authorized account.

  2. Interpret the connection result: – Connected to the running instance: Do not restart it simply because another connection failed. – Connected to an idle instance, with the intended instance confirmed stopped: Start it using your approved operating procedure. – Connected to an idle instance, but the intended instance process exists: Stop and resolve the targeting mismatch.
  3. For a confirmed stopped, manually managed instance that should be available, run:
    STARTUP

For a database intended for ordinary application use, successful startup normally progresses through instance startup, database mount, and database open.

If startup fails, preserve the complete error output. Do not repeatedly force restarts or reboot the host as a substitute for identifying the failure.

Step 5: Verify the Database and Retry the Original Connection

  1. Check which instance you reached and its status:
    SELECT instance_name, status FROM v$instance;
  2. Check the database’s open mode:
    SELECT name, open_mode FROM v$database;

    Confirm that the results match the intended database and its operational role. A production primary, standby, and recovery session do not necessarily require the same open mode.

  3. Retry the original application, job, or user connection.

The repair is complete only when the original connection succeeds against the intended database. An administrative SQL*Plus connection alone is not sufficient verification.

When Local Connections Work but Remote Connections Fail

A successful tnsping test and a working local SQL*Plus session can coexist with failing application or listener-based connections. They exercise different parts of the connection path.

A working local connection does not prove that the application reaches the correct database service.

Check the Application’s Actual Destination

  1. Inspect the connection descriptor used by the failing application, not just a similarly named alias in your interactive shell.
  2. Confirm its host, listener port, and service name or SID.
  3. Check which Oracle Net configuration the application actually uses. A different TNS_ADMIN, deployment secret, connection pool setting, or container environment can select another destination.

Local operating-system authentication and remote database authentication are also different tests. Do not change application passwords merely because an administrative local connection works.

Check Listener Services and Static Entries

  1. On the database server, inspect the listener and the services it knows about:
    lsnrctl status
    lsnrctl services

    These examples address the default listener. Use the configured listener name if your installation uses a different one, and run the commands from the appropriate listener software home.

  2. Compare the reported services and instance names with the application’s connection descriptor. A statically registered instance can appear with status UNKNOWN; that status alone does not prove the instance is down.
  3. Use the listener status output to identify the active listener.ora, rather than editing an arbitrary copy.
  4. If the listener uses static SID_DESC entries, inspect their SID_NAME and ORACLE_HOME values. The static entry’s Oracle home must identify the database software home. It need not be the same home that runs the listener, particularly with Grid Infrastructure. A trailing slash in a static ORACLE_HOME value is a known failure case. Use the configured database home path without the final slash. For a legacy installation whose actual home is the directory below, the entry would be:
    (ORACLE_HOME = /u01/app/oracle/product/10.2.0)

    This is an illustrative legacy path, not a directory to create or a software version to install.

  5. After an approved static configuration correction, reload the listener:
    lsnrctl reload

For dynamically registered services, a missing static entry is not automatically a defect. Correct the relevant service and listener-address configuration; once those settings are correct, an authorized DBA can request registration from the running instance:

ALTER SYSTEM REGISTER;

Inspect listener services again, then retry the exact application connection. Do not treat a listener reload or a successful network probe as the final test.

When ORA-27101 Follows a Startup or SGA Change

If the error began after changing memory settings, the crucial question is whether the instance successfully restarted. An invalid or unsatisfiable memory configuration can prevent startup, leaving subsequent connections with no instance memory to attach to.

Similarly, startup can allocate the SGA and mount the database, then terminate while opening it. ORA-01092 during startup followed by ORA-27101 on later connections requires investigation of the termination, not SID guessing.

Use this sequence:

  1. Preserve the complete startup output. Capture errors preceding the final disconnection message.
  2. Read the alert log around the failed startup. Find the first causal error, not merely the last unavailable-instance message.
  3. Match that error to the relevant subsystem. Possible causes include invalid memory parameter combinations, operating-system memory allocation failures, inaccessible storage, or database-file problems.
  4. Correct only the identified cause. If a memory change caused the failure, restore the last known working settings in the startup configuration actually used by the instance.
  5. Start through the database’s normal management mechanism.
  6. Confirm the expected open state and retry the application connection.

If the instance remains running, review its alert log for startup errors rather than relying only on diagnostic query output:

SELECT value FROM v$diag_info WHERE name = 'Diag Trace';

If you can connect only to an idle instance, use ADRCI or filesystem access to examine the diagnostic files; querying an instance view is not a substitute.

Do not invent an SGA size from the ORA-27101 message. The appropriate allocation depends on the database configuration and available operating-system resources. If there is no known working configuration, preserve the failed settings and error stack for diagnosis rather than guessing.

Avoid deleting shared-memory segments, changing kernel limits, or broadly changing permissions without an error that specifically supports that action.

Windows and Cluster-Managed Oracle Instances

On Windows or in cluster-managed deployments, verify the intended database service or managed resource state before starting the correctly targeted instance.

Windows Database Services

On Windows, check the service belonging to the intended SID, commonly named OracleService<SID>. The presence of an oracle.exe process alone does not identify which database is available.

  1. Open Windows Services and locate the intended database service.
  2. If it is stopped and the database should be running, start it using an authorized account.
  3. Open Command Prompt with the environment for the correct database home.
  4. Set the intended SID. For an instance configured as ORCL:
    set ORACLE_SID=ORCL
  5. Connect administratively:
    sqlplus / as sysdba
  6. If the service is running but the correctly targeted instance is idle, start the instance:
    STARTUP

Starting the Windows service does not always guarantee that the database has opened; automatic instance startup depends on its configuration.

Verify the intended instance and database state, then retry the original connection. If the service or database startup fails, examine the service error and Oracle alert log instead of repeatedly restarting it.

Oracle Restart and RAC

For a database managed by Oracle Restart or Clusterware, check its managed resource state and configured Oracle home before changing a shell environment or starting anything manually.

Use the management tools responsible for that deployment to start the database and its services. With RAC, also establish which instance should run on the node you are examining; one node’s missing process does not establish that the entire database is unavailable.

Finish by confirming both the managed resource state and a successful connection through the application’s intended service.

How to Confirm the Fix and Prevent Recurrence

Before closing the incident, verify these outcomes:

  • The connection reaches the intended database and instance.
  • The database has the open mode required by its role.
  • The original application or job connects successfully.
  • The alert log shows no new startup termination associated with the test.
  • Any listener configuration change is active, not just saved in an unused file.

Make the correction persistent in the place that actually launches the failing process. An export in an interactive shell does not repair a scheduled job, system service, container, or application connection pool.

For prevention:

  • Keep each database’s SID and software-home mapping explicit.
  • Update startup scripts and static listener entries after Oracle home changes.
  • Keep client service names distinct from local instance identifiers.
  • Preserve known working startup parameter configurations.
  • Record the server, instance, home, service, and original error stack when investigating failures.

Once the original connection works, save the verified configuration change and its cause so the next restart uses the same working setup.

Frequently Asked Questions

Why Do ORA-01034 and ORA-27101 Appear Together?

ORA-01034 says Oracle is unavailable to the connection, while ORA-27101 says the expected shared-memory realm could not be located. Together, they commonly indicate a stopped instance or a connection targeting the wrong instance environment. They do not, by themselves, establish a password problem or database corruption.

How Do I Resolve ORA-27101 for a Pluggable Database?

For ORA-27101 on a PDB connection, first verify the intended instance’s startup state and the application’s connection target. Keep the local SID set to the CDB’s instance SID, and connect applications through the intended PDB service.

Once the CDB instance is running, an authorized DBA can inspect PDB states:

SHOW PDBS

If the application PDB is intended to be open, replace app_pdb with its actual name, open it, and then retry the application through that PDB’s service:

ALTER PLUGGABLE DATABASE app_pdb OPEN;

Does a Shared-Memory Accessibility Message Prove That Startup Succeeded?

No: shared-memory accessibility concerns whether an Oracle process can access the required operating-system memory, not whether the database completed startup and opened. Capture the complete Oracle and operating-system error stack, including the exact error code accompanying that wording. Diagnose allocation, attachment, or permissions from that evidence rather than treating every shared-memory message as the same failure.