Need to create a job in informatica powercenter to login with the ID and sends a email if the ID is locked

Viewed 60

There is one ID which gets locked from time to time , so need to create a job in informatica powercenter to login with the ID and sends a email if the ID is locked.

Created a PowerCenter connection for this ID, and now thinking to create a PowerCenter job where we have a table in the database as a source and have a dummy target, if the session fails while we login with the ID, need to send out the email stating ID is locked

Can someone please suggest how should I proceed?

1 Answers

In PowerCenter, there is no direct way to look for a specific error message in the session log. But you can do below

  1. Create a dummy session as you mentioned. Call is S1.

  2. Save the session log for S1 session in a particular location. Or leverage the existing session log file.

  3. Write a shell script/ batch script, to look for "ID Locked" specific message in the session log for S1. For example in Oracle, for account lock, you get error like "ORA-28000:the account is locked". Similarly in your Database, for "ID Locked", you would have a specific error code and message. So in the script, you look for this keyword. If keyword found, fail the script else succeed it.

  4. Call this script in a new session, say S2.

  5. Use "On Failure E-Mail" task in Components tab of S2 to send mail.

Related