How to check oracle listener status by java program on Linux Server.
How I do the server by manually.
After login to the server, I have to execute .oraenv
proflie of oracle database
which asks for Oracle SID{Oracle database name}
then it will start working
lsnrctl status command.
[oracle@xx$ . oraenv ORACLE_SID = [daltaasm] ? deltaasm The Oracle base has been set to /u01/app/oracle oracle@XX$ clear oracle@xx$ . oraenv ORACLE_SID = [deltaasm] ? deltaasm The Oracle base remains unchanged with value /u01/app/oracle oracle@xx$ ^C oracle@xx$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 05-APR-2018 05:18:21
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 02-APR-2018 11:45:50 Uptime 2 days 17 hr. 32 min. 31 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /u01/app/oracle/diag/tnslsnr/deltaoramegan/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DeltaOraMegan.local)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM", status READY, has 1 handler(s) for this service... Service "deltaasm" has 1 instance(s). Instance "deltaasm", status READY, has 1 handler(s) for this service... Service "deltaasmXDB" has 1 instance(s). Instance "deltaasm", status READY, has 1 handler(s) for this service... The command completed successfully oracle@xx$ ^C
So how to implement java program to check lsnrctl status command status
If I don't do manually execuation. oraenv profile on Linux server it will show lsnrctl status command not found
ex oracle@xx$ snrctl status lsnrctl status command not found
Please suggest the problem solution in java program