Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Restart Job

Hi!

 

I use an Oracle database engine, I would like to know how I can manage the exceptions due to the lack of availability of the database (restarts, connection, blocking of tables, among others), since the database has failed, the work (Talend) will stop automatically, but I want it to start again automatically when the database becomes available again.
How can I do this?

 

Thanks! 

Labels (4)
1 Solution

Accepted Solutions
avinashbasetty
Contributor III
Contributor III

Hi Fred,

 

While using DB Components, best way is to implement using prejob and postjob. we have used prejob for DB connections on either success or failure (ex. connection may fail because of invalid credentials or network issue) and postjob for commit and close connections. These DB connections we trigger through onComponentError/onComponentOK with the global variable message error. we capture it through tWarn or tDie components by adding the connection variables.


Error Message (tDie):

"Error in Oracle Connection"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Success Message (tWarn):

"Connection is Successful"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Use Commit and Rollback functionality for each subjob at the output component, which helps to save the transaction only if it completes.

 

 

Additionally, 

we have used Error Recovery Check point for each subjob, while helps to recover the last failed job and it will continue the process 

 

Adding the screenshot for your reference.


DB_BestPractice.JPG

View solution in original post

3 Replies
avinashbasetty
Contributor III
Contributor III

Hi Fred,

 

While using DB Components, best way is to implement using prejob and postjob. we have used prejob for DB connections on either success or failure (ex. connection may fail because of invalid credentials or network issue) and postjob for commit and close connections. These DB connections we trigger through onComponentError/onComponentOK with the global variable message error. we capture it through tWarn or tDie components by adding the connection variables.


Error Message (tDie):

"Error in Oracle Connection"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Success Message (tWarn):

"Connection is Successful"+((String)globalMap.get("tDBConnection_1_ERROR_MESSAGE"))

 

Use Commit and Rollback functionality for each subjob at the output component, which helps to save the transaction only if it completes.

 

 

Additionally, 

we have used Error Recovery Check point for each subjob, while helps to recover the last failed job and it will continue the process 

 

Adding the screenshot for your reference.


DB_BestPractice.JPG
Anonymous
Not applicable
Author

Thank you!

 

With this, at what point would the automatic restart of the job in case of database failure?

 

The component that you called "Connection Failure" is a tDie?

avinashbasetty
Contributor III
Contributor III

yes, the main intention of using tDie is to exit the JVM Immediately. see the advanced settings in a tDie component.