How to check if Oracle database is up and running (Linux)

Configurare noua (How To)

Situatie

As a Database Administrator you usually have to check the status of a database.

Solutie

Pasi de urmat

Check if the Oracle Process run or not

Syntax :

#> ps -ef | grep pmon

Output :

[oracle@host ~]$ ps -ef | grep pmon

oracle   10632     1  0  2020 ?        00:01:10 ora_pmon_BP1

If no pmon process is listed, your database might be down.

Check the instance status

Syntax :

SQL>select instance_name, status from v$instance;

Output :

[oracle@host~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jan 8 07:51:56 2021
Version 19.7.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.7.0.0.0

SQL> select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
BP1              OPEN
SQL>

Check the database open mode (read / write):

Syntax :

SQL>select name, open_mode from v$database;

 Output :

SQL> select name, open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
BP1       READ WRITE

Tip solutie

Permanent

Voteaza

(21 din 55 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?