If anyone is familiar with Oracle, there is a way to trace a file. Then there is is a script called tkprof that will generate a report that includes a rollup of some values. The problem with this script is that it only does the rollup properly if the query is finished. So I need something quick and dirty that I can run while the query is running so I can get an idea of what part of the query is taking the longest.
There are ways to do this in the DB, but I want to try this.
I need to grep on WAIT
grep "WAIT" filename |
The awk is an issue. the nam= part can change. so a standard awk on spaces wont work.
basically I want to do this
for each obj#=<value>, I want to sum up the ela and tim fields. and I want to do a count of the total number of entries.
note that the tim= and ela= needs to be parsed out so I can some up the numbers.
The following is my take on it, using only shell builtins. I had to trim the first few digits of "tim" to use integer arithmetics (otherwise there would be overruns), you might want to find a more "long-term solution" for this. After all, the script is still a quick hack.
After the sorting and parsing it comes down to a simple group change with "$obj" as the group identifier.
Hello,
I have a file with two fields in the following format..
NewYork|Rob
Boston|Mellisa
NewYork|Kevin
Boston|John
Chicago|Mike
Boston|Tom
My output should be:
NewYork|Rob,Kevin
Boston|Mellisa,John,Tom
Chicago|Mike
Basically I need to rollup on column A and stringconcat column... (5 Replies)
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
How do I dynamically assign the below output to unix shell variables
so I can build a menu in a shell script?
Example:
var1 = 1 var2= SYSTEM
var3 = 2 var4= UNDOTBS1
and so on, then in the shell script I can use the variables to build a menu.
set serveroutput on
declare... (2 Replies)