DEV Community

umzzil nng
umzzil nng

Posted on • Originally published at oraerror.com

Oracle ORA-01100 Error: Causes and Solutions Complete Guide

ORA-01100: database already mounted — Causes, Fixes & Prevention

What Is ORA-01100?

ORA-01100 is an Oracle error that occurs when you attempt to mount a database that is already in a MOUNTED or OPEN state. Oracle prevents duplicate mount operations to protect data integrity, and immediately raises this error when it detects the database has already been mounted by the current or another instance. This error is commonly encountered during repeated startup script executions, RAC environment mismanagement, or recovery attempts after an abnormal shutdown.


Top 3 Causes

1. Duplicate MOUNT Command on an Already-Mounted Database

The most frequent cause is executing STARTUP MOUNT or ALTER DATABASE MOUNT without first checking the current database state. This often happens in automated scripts that lack proper status validation logic.

-- Check current instance and database status FIRST
SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS
FROM V$INSTANCE;

-- If already MOUNTED, simply open the database
ALTER DATABASE OPEN;

-- If a full restart is needed
SHUTDOWN IMMEDIATE;
STARTUP;
Enter fullscreen mode Exit fullscreen mode

2. RAC Environment — Instance State Confusion

In Oracle RAC setups, multiple instances share the same database. If one node has already mounted the database and another node or instance attempts to mount it again without proper coordination, ORA-01100 is triggered. This is especially common after network partitions or node failures.

-- Check all instance statuses in RAC
SELECT INST_ID, INSTANCE_NAME, STATUS, DATABASE_STATUS
FROM GV$INSTANCE
ORDER BY INST_ID;

-- If a specific instance needs restart
SHUTDOWN ABORT;
STARTUP MOUNT;
ALTER DATABASE OPEN;
Enter fullscreen mode Exit fullscreen mode

3. Stale Processes or Lock Files After Abnormal Shutdown

After a database crash, residual background processes, shared memory segments, or lock files may persist at the OS level. Oracle may incorrectly interpret this as the database still being mounted, blocking any new mount attempt with ORA-01100.

-- Check active sessions and processes
SELECT SID, SERIAL#, USERNAME, STATUS, PROGRAM
FROM V$SESSION
WHERE STATUS = 'ACTIVE';

-- Force restart to clear stale state
STARTUP FORCE;

-- If STARTUP FORCE fails, use:
SHUTDOWN ABORT;
-- Then clean up OS-level lock files manually before retrying
STARTUP;
Enter fullscreen mode Exit fullscreen mode

Quick Fix Solutions

-- Step 1: Always verify the database state before any action
SELECT NAME, OPEN_MODE FROM V$DATABASE;
SELECT INSTANCE_NAME, STATUS FROM V$INSTANCE;

-- Step 2a: If MOUNTED → open it
ALTER DATABASE OPEN;

-- Step 2b: If OPEN → no action needed
-- Step 2c: If truly stuck, force a clean restart
SHUTDOWN ABORT;
STARTUP;

-- Step 3: Confirm successful open
SELECT OPEN_MODE FROM V$DATABASE;
-- Expected result: READ WRITE
Enter fullscreen mode Exit fullscreen mode

Prevention Tips

1. Always validate database state in startup scripts.
Add a status check at the beginning of every automation script to prevent blind execution of mount or startup commands.

-- Embed this check in your startup scripts
DECLARE
  v_status VARCHAR2(20);
BEGIN
  SELECT STATUS INTO v_status FROM V$INSTANCE;
  IF v_status != 'STARTED' THEN
    DBMS_OUTPUT.PUT_LINE('DB is in ' || v_status || ' state. Skipping mount.');
  ELSE
    EXECUTE IMMEDIATE 'ALTER DATABASE MOUNT';
    EXECUTE IMMEDIATE 'ALTER DATABASE OPEN';
  END IF;
END;
/
Enter fullscreen mode Exit fullscreen mode

2. Implement real-time monitoring with alerting.
Use Oracle Enterprise Manager (OEM), Zabbix, or equivalent tools to monitor instance states continuously. Configure alerts for any unexpected state transitions so DBAs are notified immediately, reducing the chance of manual errors that lead to ORA-01100.


Related Errors

Error Code Description
ORA-01081 Cannot start already-running Oracle instance
ORA-01507 Database not mounted (opposite scenario)
ORA-01012 Not logged on — common after abnormal shutdowns
ORA-27140 Attach to post/wait facility failed — OS resource issue

📖 Want a more detailed guide?
Check out the full in-depth version (Korean) on oraerror.com — includes detailed analysis, additional SQL examples, and prevention tips.

Top comments (0)