Announcements

Oracle training based on real-time expertise as per industry standards. Upcoming batch details are here.

View batch schedule

Free Oracle mock interview. Register using the link.

Register

#DBAchallenge: submit your questions.

Ask questions
Swipe for more →
Browse by Topic
Latest Posts

    Monday, February 10, 2020

    Infomratica How to Capture Load / Batch start time and update into database batch table?

    Infomratica how to capture load / batch start time and update into database batch table?

    Lots of informatica jobs or loads or batch jobs we run on everyday but to make sure each job ran successfully or not and capturing the load start time and load ID is very difficult job. 

    In case if the load fails due to some network issue or connection issue these batch table is very use full which contains Batch name, Batch ID and Batch start time, based on these information we can cleanup the incomplete data and restart the load. 

    Question is capturing these information into batch table is tedious job, This blog will help you in automating this job using linux sheel script.

    This script will capture batch start time

    ods_batch_start.sh
    #!/bin/ksh
    #===============================================================================================#
    # Name          : ods_batch_start.sh                                                            #
    # Written by    : Mallik                                                                        #
    # Purpose       : This script will capture batch start time                                     #
    # Pending       : NONE                                                                          #
    # Creation Date : 10-FEB-2019                                                                   #
    # Version       : 1                                                                             #
    # ==============================================================================================#
    TODAY_DATE=`date +%d%m%Y_%H%M%S`

    StartTime=`/u01/Informatica/10.2.0/server/bin/pmcmd getworkflowdetails -sv INFADEV_INT -d INFADEV_Domain -u dev_test -p dev_test wf_TEST_LOAD_01 |grep "Start time" |cut -d"[" -f2 | cut -d"]" -f1`

    sqlplus -s ETL_USER/ETL_USER123@TESTDB << EOF

    insert into CTL_OWNER.T_CTL_BATCH values (sysdate, nvl((select max(BATCH_ID) from BTT1318.T_CTL_ODS_BATCH where BATCH_NAME= wf_TEST_LOAD_01'),0)+1, 'wf_TEST_LOAD_01', (SELECT to_char(to_date('$StartTime','Dy Mon dd HH24:MI:SS YYYY'),'DD/MON/YY HH12:MI:SS') from dual), NULL);
    commit;
    exit
    EOF

    Regards,
    Mallik

    No comments:

    Post a Comment

    🌟 Proud to be an Oracle ACE Pro! 🚀

    🌟 Proud to be an Oracle ACE Pro! 🚀 I’m excited to share my official Oracle ACE Profile with the Oracle community. 👨‍💻 Mallikarjun ...