How to Resolve “Connected to an idle instance”

  • by

Connected to an idle instance

Actually, Connected to an idle instance is a message rather than an error, it indicates that the database you enter is idle, stopped or shutdown. It’s exactly normal if your database is not started up, you can just start the Oracle database up and check the open status.

However, if the message surprised you, then you should know what happened. In this post, I will talk about Connected to an idle instance on Linux and Windows respectively below.

On Linux

Let’s see the symptom.

[oracle@test ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Oct 30 00:38:10 2019
Version 19.3.0.0.0

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

Connected to an idle instance.

If you think the instance should be up and running, but you saw Connected to an idle instance, may be you should check $ORACLE_SID first.

[oracle@test ~]$ echo $ORACLE_SID
ERPFIN

Oh, the running instance should be ERPACC, I went to the wrong place. To correct this, I exported the environment variable like this.

[oracle@test ~]$ export ORACLE_SID=ERPACC

If you have confirmed that $ORACLE_SID is the correct one, maybe you should know why the running instance decided to shutdown itself due to some severe incidents.

One more guess, your colleagues turned the database off and didn’t tell you.

On Windows

Let’s check oracle database services on Windows server.

Oracle Services are Running on Windows

Oracle Services are Running on Windows

It appeared that all oracle services are running on this Windows server.

Let’s try to connect to the database locally:

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Wed Oct 30 00:55:22 2019

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

Connected to an idle instance.

“Connected to an idle instance”? It’s confusing. The statuses between above two are inconsistent. What happened?

The reasons to the inconsistency could be:

By the way, if you tried to connect to the stopped database from an outside client, the listener could refuse to establish the connection. In such moment, you have to know how to connect to an idle database remotely.

Leave a Reply

Your email address will not be published. Required fields are marked *