HiveBrain v1.2.0
Get Started
← Back to all entries
patternMajor

How check that the Oracle Database is up?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thecheckdatabasethathoworacle

Problem

For our application we have a configuration file for connecting to the Oracle database (URL, username, password).

The application takes 2-5 minutes to start. If there is something wrong with database I see this in logs, but I have to wait 2-5 minutes. This is a lot of time.

So I want to find out quickly and simply a way to determine that the database is all OK and online.

Do you have any idea how I might do it ?

Solution

If you run the following query:

SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS FROM V$INSTANCE;


It should return:

INSTANCE_NAME    STATUS       DATABASE_STATUS
---------------- ------------ -----------------
YOUR_DBASE       OPEN         ACTIVE

Code Snippets

SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS FROM V$INSTANCE;
INSTANCE_NAME    STATUS       DATABASE_STATUS
---------------- ------------ -----------------
YOUR_DBASE       OPEN         ACTIVE

Context

StackExchange Database Administrators Q#4718, answer score: 31

Revisions (0)

No revisions yet.