IT Process Automation

Expand all | Collapse all

Not getting full output in the SSH Operator for particular servers(AIX) for Oracle Commands

  • 1.  Not getting full output in the SSH Operator for particular servers(AIX) for Oracle Commands

    Posted 14 days ago
    Hi Team,

    I an facing issues while getting full output on AIX servers via ssh operator in ITPAM for the oracle commands that I am running and the commands are working in putty :

    I have tried Following User command prompts were used ; and either I am getting half output or no output:

    1. ".*[$?#]$" - Stuck in running state
    2. ".*[$>?:#]" - Stuck in running state
    3. .*[$?#].  - Stuck in running state
    4. ".*[~\]$]" -Stuck in running state
    5. ".*[$?:#].* " - getting half output
    6. ".*[$>#].* " - getting half output
    The few oracle commands that I am running are:

    1. export ORACLE_SID=InstanceName&&export ORACLE_HOME=/apps/oracle/11.2.0.4/home/&&export PATH=$PATH:$ORACLE_HOME/bin&& echo "select count(*) from GV\$SESSION_LONGOPS where OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;"|/apps/oracle/11.2.0.4/home/bin/sqlplus User/pass
    2.  export ORACLE_SID=InstanceName&&export ORACLE_HOME=/apps/oracle/11.2.0.4/home/&&export PATH=$PATH:$ORACLE_HOME/bin&& echo "SELECT SUM(B.PERCENT_SPACE_USED) AS PERCENT_OF_SPACE_USED FROM V\$RECOVERY_FILE_DEST A, V\$FLASH_RECOVERY_AREA_USAGE B GROUP BY SPACE_LIMIT, SPACE_USED , SPACE_RECLAIMABLE;"|/apps/oracle/11.2.0.4/home/bin/sqlplus User/pass

    The output that I am getting via ssh operator is:

    export ORACLE_SID=InstanceName&&export ORACLE_HOME=/apps/oracle/11.2.0.4/
    <D=InstanceName&&export ORACLE_HOME=/apps/oracle/11.2.0.4/h �������������������������ome/&&export PATH=$PATH:$
    <E=/apps/oracle/11.2.0.4/home/&&export PATH=$PATH:$O �������������������������RACLE_HOME/bin&&


    The expected output should be :
    1.
    SQL*Plus: Release 11.2.0.4.0 Production on Fri Jan 8 04:21:40 2021

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


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select count(*) from GV$SESSION_LONGOPS where OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;

    COUNT(*)

    ----------

    0


    2. SQL> SELECT SUM(B.PERCENT_SPACE_USED) AS PERCENT_OF_SPACE_USED FROM V$RECOVERY_FILE_DEST A, V$FLASH_RECOVERY_AREA_USAGE B GROUP BY SPACE_LIMIT, SPACE_USED , SPACE_RECLAIMABLE;

    PERCENT_OF_SPACE_USED
    ---------------------
    0


      Thank you.


    1. 2.  RE: Not getting full output in the SSH Operator for particular servers(AIX) for Oracle Commands

      Broadcom Employee
      Posted 13 days ago
      Hi,

      Within SQL itself, your User Command Prompt is

      SQL>

      But what is the actual one you see before the script's command executes? It's this that your setting is attempting to detect, so it knows when the next prompt appears.

      The entries stuck in running state are awaiting the end of the command output still, because your filter doesn't detect "SQL>". While the ones that aren't getting the full output are probably seeing the line that has "SOFAR <>" and thinking the > character is the prompt, cutting the output there.

      What you're after is a filter that both detects each command prompt seen by your script, and yet doesn't detect anything else.


    2. 3.  RE: Not getting full output in the SSH Operator for particular servers(AIX) for Oracle Commands

      Posted 12 days ago
      Hi Iain,

      Can you suggest any filter which detects both command prompts , so that I can get full output from ssh operator
      If I run the entire command in putty the expected output is given below:


      -bash-4.2$ export ORACLE_SID=InstanceName&&export ORACLE_HOME=/apps/oracle/11.2.0.4/home/&&export PATH=$PATH:$ORACLE_HOME/bin&& echo "select count(*) from GV\$SESSION_LONGOPS where OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;"|/apps/oracle/11.2.0.4/home/bin/sqlplus User/Password

      SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 14 04:30:17 2021

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


      Connected to:
      Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing options

      SQL>
      COUNT(*)
      ----------
      0

      SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
      With the Partitioning, OLAP, Data Mining and Real Application Testing options
      -bash-4.2$
      -bash-4.2$





    3. 4.  RE: Not getting full output in the SSH Operator for particular servers(AIX) for Oracle Commands

      Broadcom Employee
      Posted 4 days ago
      Unfortunately you may need someone with better regex writing skills. But you're looking for one that matches your command lines, and nothing else, so:

      SQL>

      and

      -bash-4.2$