Linux – How to know the Oracle database is correctly configured and running

installationlinuxoracle

I've installed a fresh Oracle 19.3 on Linux CentOS 8.3. I used the install steps (manual install) from this official Oracle guide.

I tried to start the DB using the standard script:

[oracle@localhost admin]$ /home/oracle/scripts/start_all.sh 
The Oracle base remains unchanged with value /opt/u01/app/oracle
[oracle@localhost admin]$ ps -aux | grep oracle
root        3309  0.0  0.1 137504  7532 pts/1    S    Apr19   0:00 su oracle
oracle      3314  0.0  0.0  25680  5632 pts/1    S    Apr19   0:00 bash
oracle      8756  0.6  0.5 224100 28768 ?        Ssl  01:59   0:00 /opt/u01/app/oracle/product/19.3.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle      8892  0.0  0.0  61604  4024 pts/1    R+   01:59   0:00 ps -aux
oracle      8893  0.0  0.0  12112  1052 pts/1    S+   01:59   0:00 grep --color=auto oracle

I see only one oracle process, the listner. I don't see a process named cdb1*, which is the name of the DB I installed.

I have a Basic client and a SqlPlus client installed. When I try to connect via SqlPlus I get this:

[oracle@localhost admin]$ sqlplus

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Apr 20 01:12:36 2021
Version 19.3.0.0.0

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

Enter user-name: oracle
Enter password: 
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 4376
Additional information: 1804505411
Process ID: 0
Session ID: 0 Serial number: 0

I put tnsnames.ora at $ORACLE_HOME/network/admin:

[oracle@localhost admin]$ ls -l /opt/u01/app/oracle/product/19.3.0/dbhome_1/network/admin/
total 8
drwxrwxr-x. 2 oracle oinstall   64 Apr 17  2019 samples
-rwxrwxr-x. 1 oracle oinstall 1536 Feb 13  2018 shrept.lst
-rwxr-xr-x. 1 root   root      391 Apr 20 01:29 tnsnames.ora

Here is the content of my tnsnames.ora (I'm really not sure about this, don't know what service name to use – I understood it is not the SID):

[oracle@localhost admin]$ cat /opt/u01/app/oracle/product/19.3.0/dbhome_1/network/admin/tnsnames.ora 
# tnsnames.ora Network Configuration File: /opt/oracle/network/admin/tnsnames.or
a
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.139.129)(PORT = 1521))

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.139.129)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

tnsping gives this:

[oracle@localhost admin]$ tnsping orcl 5

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 20-APR-2021 02:25:13

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.139.129)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (10 msec)
OK (0 msec)
OK (10 msec)
OK (10 msec)
OK (10 msec)

So, I don't know if my DB is really running. I don't know if the tnsnames.ora is correct. I'm not a dba, I need this Oracle DB for a testing environment. Could someone guide me through this please?

Best Answer

I found the issue. The DB wasn't starting because I forgot to update /etc/oratab after the dbca install. Should have updated the db parameter with "restart:Y".

cdb1:/opt/u01/app/oracle/product/19.3.0/dbhome_1:Y