Getting data out of DS_AUDIT

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

Getting data out of DS_AUDIT

Post by Griffin07 »

Hey folks, I am trying to get the last mod date and the last mod user from DS_AUDIT for a report. The below SQL is what I am using in a server job using an ODBC stage to connect to localuv. The job abends with the message below. I think its because the fields are multivalued and probally very long in some cases. Doees anyone know what options I have to get at this info. I really only want the last sub value. I tried making the column lenght large but that does nto work either

many thanks
Mark :D

DS_JobList1..Transformer_7.DSLink11: DSD.BCIGetNext call to SQLFetch failed.
SQL statement:SELECT INSTANCE, MODIFIER FROM DS_AUDIT
SQLSTATE=S1000, DBMS.CODE=930122
[DataStage][SQL Client][UNIVERSE]DataStage/SQL: Row length exceeds buffer size.

DS_JobList2..Transformer_7.DSLink11: DSD.BCIGetNext call to SQLFetch failed.
SQL statement:SELECT INSTANCE, DTM FROM DS_AUDIT
SQLSTATE=S1000, DBMS.CODE=930122
[DataStage][SQL Client][UNIVERSE]DataStage/SQL: Row length exceeds buffer size.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you tried using a UV stage rather than ODBC? Off the top of my head, there is an environment variable that may help with ODBC, something like MAXFETCHBUFFER ?? It's been mentioned here, perhaps a search would turn it up.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

SELECT INSTANCE, MODIFIER, MAX(DTM) AS MOST_RECENT_MOD
FROM UNNEST DS_AUDIT ON MODS
GROUP BY INSTANCE, MODIFIER;
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
111111111111111111
Participant
Posts: 9
Joined: Sat Jul 08, 2017 1:33 am

Post by 111111111111111111 »

Ray: Does that works well for DS11.3? I used this query but it does not get the most recent results.

I had some jobs that were compiled yesterday (13-July) but this query got me the last timestamp as 31-05-17 which would probably the previous compile time of the job.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DS_AUDIT is deprecated and not guaranteed to capture all changes. But it never caught compilations - that information is stored elsewhere - one of the records (the job record?) in RT_STATUSnnn if I recall correctly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
111111111111111111
Participant
Posts: 9
Joined: Sat Jul 08, 2017 1:33 am

Post by 111111111111111111 »

Is there any other way to find out the last compile time of the job? Example: DS_JOBJECTS does provide things under its @RECORD<X,1> variable where X and Y has a wide range (1,1.. 26,1)

I couldn't see your content, am working with my organization for premium membership but need to work like this till then....
Post Reply