HOW TO CAPTURE DATABASE CONNECTION ERROR
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 88
- Joined: Wed Apr 05, 2006 1:04 am
HOW TO CAPTURE DATABASE CONNECTION ERROR
HI ALL
m CREATING A JOB WHICH WILL ACCESS A STORED PROCEDURE
BUT BEFORE ACCESSING STORED PROCEDURE HAVE TO CHECK WHETHER CONEECTION WITH DATBASE IS SUCCESSFUL OR NOT ?
CURRENTLY I HAD IMPLEMENTED THE JOB AS
STORED PROCEDURE STAGE -------->SEQUETIAL FILE STAGE
THE SEQUENTIAL FILE STAGE IS TO CAPTURE THE ERROR CODE RETURN BY STORED PROCEDURE AND M USING DB2 UDB ON AIX (OS)
SO PLZ SUGGEST HOW TO CHECK DATABASE CONECTION SUCCES ?
OR ANY OTHER WAY TO THIS JOB.......
m CREATING A JOB WHICH WILL ACCESS A STORED PROCEDURE
BUT BEFORE ACCESSING STORED PROCEDURE HAVE TO CHECK WHETHER CONEECTION WITH DATBASE IS SUCCESSFUL OR NOT ?
CURRENTLY I HAD IMPLEMENTED THE JOB AS
STORED PROCEDURE STAGE -------->SEQUETIAL FILE STAGE
THE SEQUENTIAL FILE STAGE IS TO CAPTURE THE ERROR CODE RETURN BY STORED PROCEDURE AND M USING DB2 UDB ON AIX (OS)
SO PLZ SUGGEST HOW TO CHECK DATABASE CONECTION SUCCES ?
OR ANY OTHER WAY TO THIS JOB.......
You can have a seperate job prior to the job using the stored procedure.
Have a DB stage ( whichever one you are using ) point to a transformer and then to a flat file.
In the DB stage enter a custom sql - select 1 from dual. Give the condition in the transformer and according to your requirements write into the flat file the result.
On top of that you can have another job to read the result and progress accordingly or have a job control script read the result from the file.
IHTH.
Have a DB stage ( whichever one you are using ) point to a transformer and then to a flat file.
In the DB stage enter a custom sql - select 1 from dual. Give the condition in the transformer and according to your requirements write into the flat file the result.
On top of that you can have another job to read the result and progress accordingly or have a job control script read the result from the file.
IHTH.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 88
- Joined: Wed Apr 05, 2006 1:04 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your original approach is the most sound. Create a small job that runs a simple query, and detect the error information in that. You can use a Routine that inspects its log, or you can use link variables in the job itself.
This is run in a job sequence that decides whether to run the main job depending on whether the first connection was successful.
This is run in a job sequence that decides whether to run the main job depending on whether the first connection was successful.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 88
- Joined: Wed Apr 05, 2006 1:04 am
hi ray ,
as m new to this tool can you tell me how to caputre the error return by querry or use link var, or routine that inspects the log.......
Is anyway it is possible to include / import log generated by DS Director to a text file so that I can attach that in mail.Though I am including job status in mail but its not much explainatory to detect exact reason for failure compared to one generated by DS Director.
as m new to this tool can you tell me how to caputre the error return by querry or use link var, or routine that inspects the log.......
Is anyway it is possible to include / import log generated by DS Director to a text file so that I can attach that in mail.Though I am including job status in mail but its not much explainatory to detect exact reason for failure compared to one generated by DS Director.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can write a routine that uses the DSGetLog... functions to interrogate the log. While interrogating, your routine can also write whatever you like into a text file (search for OpenSeq and WriteSeq commands), and this can be attached to any email.ketanshah123 wrote:as m new to this tool can you tell me how to caputre the error return by querry or use link var, or routine that inspects the log.......
Is anyway it is possible to include / import log generated by DS Director to a text file so that I can attach that in mail.Though I am including job status in mail but its not much explainatory to detect exact reason for failure compared to one generated by DS Director.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.