Script that checks if a process is running, if it is not running execute line of codes
Date : March 29 2020, 07:55 AM
To fix this issue The monit (small software) will do all this job for you: Please look here: https://mmonit.com/monit/documentation/
|
PowerShell execute SQL Query, Formatting output to excel. Losing some data from the output
Date : March 29 2020, 07:55 AM
this one helps. For now, wrap a CAST to VARCHAR around the STUFF part of the query from your previous question, i.e.: SELECT
t.CUSTOMER,
SUM(t.REVENUE) as REVENUE,
CAST(
STUFF(
(
SELECT ',' + Cast(s.work_order as varchar)
FROM tblname s
WHERE s.CUSTOMER = t.CUSTOMER
FOR XML PATH('')
),1,1,''
) AS VARCHAR
) AS [WORK Order]
FROM tblname t
Group BY CUSTOMER
|
for loop - execute file every 2 hr, output--> ssh "new server" execute output command
Tag : linux , By : boonchew
Date : March 29 2020, 07:55 AM
wish of those help You need "do" after your "for" loop. That will fix the problem in the comments above: for i in $(cat /root/scripts/list); do
|
Log output shows in Jenkins while running bash script to execute Java code
Tag : java , By : LinnheCreative
Date : March 29 2020, 07:55 AM
like below fixes the issue If you're doing this using Jenkins you will need to use the nohup notation as in the comments as well as specifying a non-numerial PID for the process. Jenkins tries to clean up after a job finishes by killing any processes it starts. BUILD_ID=dontKillMe nohup <-your command -> &
|
How to execute the output result for execute immediate statment
Date : September 27 2020, 02:00 AM
this will help EXECUTE IMMEDIATE will not provide you the SELECT statement results. From Oracle DocsSET SERVEROUTPUT ON
DECLARE
L_RESULT VARCHAR2(20);
BEGIN
VSQL:= --YOUR LOGIC
EXECUTE IMMEDIATE VSQL INTO L_RESULT;
DBMS_OUTPUT.PUT_LINE(L_RESULT);
END;
/
DECLARE
TYPE T IS TABLE OF MYTABLE.ID%TYPE INDEX BY PLS_INTEGER;
MYROW T;
BEGIN
VSQL:= --YOUR LOGIC
EXECUTE IMMEDIATE VSQL BULK COLLECT INTO MYROW;
DBMS_OUTPUT.PUT_LINE(MYROW.XXX);
END;
/
|