patternMajor
How check that the Oracle Database is up?
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 ?
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:
It should return:
SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS FROM V$INSTANCE;It should return:
INSTANCE_NAME STATUS DATABASE_STATUS
---------------- ------------ -----------------
YOUR_DBASE OPEN ACTIVECode Snippets
SELECT INSTANCE_NAME, STATUS, DATABASE_STATUS FROM V$INSTANCE;INSTANCE_NAME STATUS DATABASE_STATUS
---------------- ------------ -----------------
YOUR_DBASE OPEN ACTIVEContext
StackExchange Database Administrators Q#4718, answer score: 31
Revisions (0)
No revisions yet.