0

I want to execute multiple commands from Linux terminal on Linux Red-hat.

 echo deltaasm |. oraenv && snrctl status;
[oracle@DeltaLinOraASM2 datavail]$  echo deltaasm |. oraenv && snrctl status;
ORACLE_SID = [oracle] ? The Oracle base has been set to /u01/app/oracle
bash: snrctl: command not found

If execute the same command on Linux ubuntu it works perfectly. I am unable to execute on Linux Red Hat. . oraenv script sets oracle home and sid of oracle so oracle related commands will work. But if i execute from terminal it works ok here is the result

[oracle@DeltaLinOraASM2 datavail]$ . oraenv
ORACLE_SID = [oracle] ? deltaasm
The Oracle base has been set to /u01/app/oracle
[oracle@DeltaLinOraASM2 datavail]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 23-MAY-2018 03:07:04

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                23-MAY-2018 02:34:56
Uptime                    0 days 0 hr. 32 min. 8 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/diag/tnslsnr/DeltaLinOraASM2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DeltaLinOraASM2)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@DeltaLinOraASM2 datavail]$

Please suggest on the above problem, thank you

The problem is that I can execute on this Linux Ubuntu, with any trouble but I am facing problem to execute on Linux Centos And some of the other flavors of Linux distro. Tried on Ubuntu, Not working on Red-Hat, Centos, Unix, too. Thank You for your suggestion.

3
  • Change to use the full path of the command lsnrctl Commented May 23, 2018 at 10:51
  • check this : echo deltaasm && . oraenv && snrctl status; Commented May 26, 2018 at 5:53
  • JJJ echo deltaasm && . oraenv && snrctl status; this also don't work Commented May 26, 2018 at 17:40

1 Answer 1

1

You have missed out an 'l' in the command i guess. The should be somewhat like

echo deltaasm |. oraenv && lsnrctl status
Sign up to request clarification or add additional context in comments.

1 Comment

echo deltaasm |. oraenv && lsnrctl status This not working oracle@DeltaLinOraASM2 datavail]$ echo deltaasm |. oraenv && lsnrctl status ORACLE_SID = [oracle] ? The Oracle base has been set to /u01/app/oracle bash: lsnrctl: command not found

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.