How can I maintain start_time and end_time in my audit table for mydbms_job

Hi Guys,
Need some help on runing this job, I need to maintain start_time and end_time. However we are getting job details from the user_jobs table.
DECLARE
l_job BINARY_INTEGER;
BEGIN
DBMS_JOB.SUBMIT(l_job, '<your job code>', sysdate, 'sysdate + 1/24');
COMMIT;
END;
Here I am planing to use audit log table which I have created with job_name,start time,end_time. Once I execute this job, I need to audit the job with start and end times. Is it possible.
can any one help me on this.
Thanks in advance!
-KLR.

If you switch from dbms_job to using dbms_scheduler (as recommended by oracle) then this auditing information would be delivered out of the box. For scheduler jobs there are much better dictionary information then for the older dbms_jobs solutions.
Views like this
select * from user_SCHEDULER_JOBS;
select * from USER_SCHEDULER_JOB_LOG;
select * from USER_SCHEDULER_JOB_RUN_DETAILS;

Similar Messages

  • How to maintain previous and record count in audit table in SQL Server 2008 r2?

    Hi Experts ,
     Situation :
    in our database we are having few of stored procedures which will drop and recreates the tables and it is scheduled on weekly basis. when this job will run all the stored procedures will drop all the tables and recreate. Now we need to create one table which
    will maintain history of the records.
    my table structure is listed below
    TableName CurrentReocrdCount CurrentExecutionDate PreviousReordCount PreviousExurtiondate
    TEST         1000                   2014-03-30            NULL        NULL
    Test         1500                   2014-04-10            1000      2014-03-30
    Test         2000                   2014-04-11            1500      2014-04-10 
    How do i achive this . 
    franklinsentil

    You need to create audit tables for these. The table will be populated by COUNT value inside stored procedure. Each time it clears the main table and fills new data and also logs count details to audit tables. You can use COUNT(*)  to get count value
    and GETDATE function to get current execution value.
    So proc will look like
    CREATE PROC procname
    @param....
    AS
    --step to drop existing table
    IF OBJECT_ID('tablename') IS NOT NULL
    DROP TABLE <table name>
    --step to fill new table
    SELECT ...
    INTO TableName
    FROM
    --Audit table fill step
    INSERT AuditTable (TableName,CurrentRecordCount,CurrentExecdate,PrevRecordCount,PrevExecDate)
    SELECT TOP 1 'TableName',(SELECT COUNT(*) FROM tableName),GETDATE(),CurrentRecordCount,CurrentExecDate
    FROM AuditTable
    ORDER BY CurrentExecDate DESC
    UNION ALL
    SELECT 'TableName',(SELECT COUNT(*) FROM tableName),NULL,NULL
    WHERE NOT EXISTS (SELECT 1 FROM AuditTable)
    GO
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can I insert, modify and delete entries on my table control?

    Hi,
    I already have build a table control. Now I want to make manipulations on it. Therefore I have created 3 buttons, insert, modify and delete. But how can I get actions on table control.
    This is my code for the internal table:
    BEGIN OF its OCCURS 0,
    mark TYPE C VALUE ' ',
    artikel_nr TYPE ZARTIKEL-ARTIKEL_NR,
    artikel_typ TYPE ZARTIKEL-TYPE,
    bezeichnung TYPE ZARTIKEL-BEZEICHNUNG,
    preis TYPE ZARTIKEL-PREIS,
    mwst TYPE ZARTIKEL-MWST,
    END OF its.
    and this is the code which i wanted to  delete a row in my table control:
    WHEN 'DELETE'.
    LOOP AT its WHERE mark EQ 'X'.
    DELETE its WHERE mark = 'X'.
    MOVE its TO ZARTIKEL.
    ENDLOOP.
    ENDCASE.
    ENDMODULE:
    and my PBO and PAI:
    PROCESS BEFORE OUTPUT.
    LOOP AT its INTO ZARTIKEL WITH CONTROL ARTIKEL.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE EXIT.
    LOOP AT its.
    MODULE V1.
    ENDLOOP.
    MODULE user_command_1060.
    But if I now open my table control and mark the line that I wanted to delete, nothing happens, not on my internal table and the data even not deleted on my table ZARTIKEL. Have you an idea what I did wrong??

    Hi,
    In the attributes of table control take the SELCOL as wa_zekpo-flag
    And in the internal table and work area add a field as flag(1) TYPE c
    Refer:
    At screen logic:-
    PROCESS BEFORE OUTPUT.
      MODULE status_8002.
      LOOP WITH CONTROL po_tab.
        MODULE pass_data.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_8002.
      LOOP WITH CONTROL po_tab.
        MODULE modify_data.
      ENDLOOP.
      MODULE function.
    In PBO,
    MODULE status_8002 OUTPUT.
      SET PF-STATUS 'ZTG_SELTB'.
      DATA : line_count TYPE i.
      DESCRIBE TABLE it_ekpo
      LINES line_count.
      po_tab-lines = line_count + 5.
    ENDMODULE.                 " STATUS_8002  OUTPUT
    *&      Module  PASS_DATA  OUTPUT
    MODULE pass_data OUTPUT.
      READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
    ENDMODULE.                 " PASS_DATA  OUTPUT
    In PAI,
    *&      Module  USER_COMMAND_8002  INPUT
    MODULE USER_COMMAND_8002 INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'BACK'.
          LEAVE TO SCREEN 8001.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_8002  INPUT
    *&      Module  MODIFY_DATA  INPUT
    MODULE DISPLAY_DATA INPUT.
      MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
    ENDMODULE.                 " MODIFY_DATA  INPUT
    *&      Module  FUNCTION  INPUT
    MODULE FUNCTION INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'SELECT'. "<--select all records
          LOOP AT IT_EKPO INTO WA_EKPO.
            WA_EKPO-FLAG = 'X'.
            MODIFY IT_EKPO FROM WA_EKPO.
          ENDLOOP.
        WHEN 'DESEL'. "<--deselect all records
          LOOP AT IT_EKPO INTO WA_EKPO.
            WA_EKPO-FLAG = ' '.
            MODIFY IT_EKPO FROM WA_EKPO.
          ENDLOOP.
        WHEN 'DELETE'.
          DELETE FROM it_ekpo WHERE flag = 'X'.
      ENDCASE.
    ENDMODULE.                 " FUNCTION  INPUT
    Regards,
    Tarun

  • How can I synchronized Firefox and Google to work ad one for android phone Motorola Bionic.

    I want to synchronized Firefox with Google/ Chrome.

    Hi,
    Thank you for contacting Mozilla Support. Firefox is pretty awesome that developers can develop almost anything with the openness of it. Firefox Sync is a built in sync to sync your Firefox profile across devices.
    For bookmarks there is Xmarks the extension, though be sure to turn on syncing for all or else you will get duplicates.
    superuser answer: [http://superuser.com/questions/233719/how-to-sync-bookmarks-across-google-chrome-and-mozilla-firefox-bookmarks]
    Firefox is pretty amazing, and let us know if this helps your issue.

  • How can I maintain the font used in Adobe Edge Animate for Adobe Muse website?

    I used a png file which is working perfect and then used the font Montez in Edge Animate for 2 titles, however once I published the file(live) to muse it a totally different font. Is there something in particular I need to do in Animate to avoid alteration of font. Help!

    The original photo gallery is:
    http://www.bethanyjanedavies.com/portfolio.html
    You can see that the right side is chopped off
    But I may have to compromise and use:
    http://www.bethanyjanedavies.com/portfolio2.html
    This is a much wider page than the rest of the website, but I suppose you have to find a compromise that works!!
    Cheers
    Helen

  • How can I maintain more than one contact person for a supplier

    Hi
    As per our business requirement , How can I maintain more than one contact person for a single supplier in SRM?
    How these contact persons are supposed to log in to a portal with different user id and passwords and access the bids for same supplier.
    we are in SRM 7, and currently we are creating contact person throug customised BDC.
    please advice.
    Thanks & Regards
    NITIN
    Edited by: nitinkk on Sep 9, 2011 10:22 AM

    Dear Yaniv,
    Thanks for your information,
    I am able to create  users But my problem is How these contact persons are supposed to log in to a portal with different user id and passwords and access the bids for same supplier ? Is there any kind of maping is available for the user/ contact person to the supplier no.??
    Thanks & Regard
    NITIN

  • HT1660 How can I maintain two separate itunes accounts on one single device without erasing either set of data?

    How can I maintain two separate itunes accounts on one single device (iPhone 4) without erasing either set of data when syncing with itunes?

    Hi,
    Depends on what you trying to setup but for purchases, you can roll down at the very end of the iTunes/AppStore pages to logout of your current account and then login into a different one.  Then your purchase will be billded to this new account.  Everything will sync as you used to but in order to use the purchased content in iTunes or other devices, you will need to authorize them (you can have up to 5 devices authorized for an account).

  • How can I maintain multiple white spaces in a PDF written from InDesign?

    I need to have 2 white spaces maintained (within a part #) in the PDF I write, but when I open in Acrobat it converts it to one space.
    I've tried word spaces, set spaces and applying "no color" to a placeholder character and nothing is working!
    Any ideas or suggestions?

    I am talking about normal white space. Multiple fixed widt spaces are not a problem. How the space is handled in a PDF depends on how it is created.
    Viele Grüße
    Wilhelm Georg Adelberger
    Von meinem iPhone gesendet
    Am 21.08.2014 um 12:01 schrieb Peter Spier <[email protected]>:
    How can I maintain multiple white spaces in a PDF written from InDesign?
    created by Peter Spier in InDesign - View the full discussion
    It may not be a great idea to use multiple spaces, but it certainly is not prohibited and sometimes is necessary -- you might want a 2em space, or a thin space before and after a tab you underline in a form.
    I'm able to select the multiple spaces just fine in Acrobat 9 using the text touch-up tool.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6661037#6661037
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in InDesign by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How can we maintain multiple payment terms for a customer

    how can we maintain multiple payment terms for a customer?

    Hi,
    You can leave the Payment terms field in the sales area data tab blank. and you can enter the payment terms at line item level while creating the sales order. By that you will achieve multiple payment terms for the same customer in the same sales order. but the invoice will be split by standard SAP based on the payment terms.
    Also difference between the "Payment Terms" field in Company code tab and the sales Area tab is.
    Company code tab payment terms are used only for the documents that are posted directly in FI module. for example credit and debit memos posted directly in FI and as a leading practice this should always be "payable Immidiately"
    Sales area Tab payment terms are the one which are copied on to the sales order header data which are valid for all the line items unless you specifically mention different payment terms at line item level.
    Regards,
    Shantanu

  • How can we maintain tetxs in webdynpro insted of hardcode

    Hi Experts,
                    i am new for this webdynpro abap.how can we maintain tetxs in webdynpro insted of hardcode like text symbols in abap.we are using freaquently texts in message manager.in best practice we should not maintain hard code.
    guys suggests me.

    Hi.,
    For Labels You can Use OTR ( Online Text Repository )  Goto View ., In Menu bar Goto Online Text Repository and Add text ., then For Label Text press F4 then u can assign the Created Text.,
    For Messages; Instead of HardCoding., Create  a Class and Use that Class in Your WDA As Assistance Class ., In the Class Go to Texts and Add the text elements same as Text elements in se38. , You can use those text elements by providing message id in WDA ., using
    WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( '001' ).  " here 001 is the text element id which u created in class
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • How can i maintain conditions for vendor sub-ranges

    Hi All,
    How can i maintain conditions for vendor sub-ranges. These conditions apply to all materials from vendor's sub-range.
    Eg: vendor X has the two subranges R1 & R2. I want to maintain separate conditions for R1 & R2. When ever i created PO with ref to particular subrange that Vendor conditions has to be appeared.
    How can i achieve this?
    Could u pls suggest?
    Thanks & Regards
    Anilkumar Dalai

    Hi,
    First Create a Condition Table with field "Vendor sub-range" in M/03
    Then create an Access Sequence using this Condition Table in M/07
    Then assign this Access Sequence in the Gross Price Condition Type in M/06
    Then assign this Condition type in Calculation Schema in M/08
    Then maintain condition record for this condition type in MEK1
    And then select the appropriate VSR Code in ME21N and check the Pricing.

  • HT2729 How can I maintain folder structure when copying more than 1 folder of videos to the iphone?

    Spent hours trying to figure this out - no luck!
    I have a video tutorial course that I would like to be able to view on my iPhone, the only problem is that it is broken down into 6 folders - 1 for each subject.
    And if I add the whole course to be synced via iTunes it gets copied ok. But it loses the original folder names that the files are stored in on my PC
    ALL the videos files copied to the iPhone are bunched togeather in the Video app and it takes forever to figure out which one comes next.
    How can I maintain the original folder names/structure that the files are stored in on my PC on the iPhone?

    To follow how I solved this it might be good to know what I started with:
    I have a main folder which I called 'Music Theory' and  6 sub-folders: 101, 102, 103, ....etc.
    with up to 20 or so videos in each one.
    Note: Only import one sub-folder at a time into iTunes and then do all the following actions BEFORE importing the next sub-folder:
    Add only 1 sub-folder to the 'Films' section in iTunes (either drag and drop or use the File - Add Folder to Library).
    Select all the imported videos (hold down the Ctrl + A keys on the keyboard simultainiously).
    Right click and select 'Get Info'
    Then you may get a pop-up with this text but just click the 'Yes' button:
    You should now have the 'Multiple Item Information' window showing. Click on the 'Options' tab and edit as below:
    Tick: 'Media Kind'               and from the Drop Down Box choose:  'TV Programme'
    Tick: 'Part of a Compilation'   and from the Drop Down Box choose: 'Yes'
    Tick: 'Remember Position'        and from the Drop Down Box choose: 'Yes'
    Now click on the 'Video' Tab of the 'Multiple Item Information' window and edit:
    The 'Programme' text field (I entered Music Theory) This will be the main heading for all the folders that I want to add to this series.
    The 'Series' text field (I entered 101 for the first sub-folder)
    Now click the 'OK' button.
    iTunes now starts processing all you have done and moves the vildeos to the 'TV Progammes' section.
    The first part is now done!
    Now you should repeat all the actions you have done from the start on each sub-folder you want to include in this Video collection, then when you've done that you can upload the lot to your device (iPhone in my case) with this last step:
    All you need to do now is select your device under 'Devices' in the left hand menu and tick the 'Sync TV Progammes' box in the 'TV Progammes' section and select the series that you want include in the right hand area. And then click 'Apply' and now your done!!!    :-)

  • How can I use OmniPortlet and Web Clipping Portlet?

    How can I use OmniPortlet and Web Clipping Portlet?

    You find information on OmniPortlet and Web Clipping in the Portal Developer's Guide.
    o Building Portlets with OmniPortlet
    o Building Content-Based Portlets with Web Clipping
    Peter

  • How can i stream video and audio from macbook air to my tv?

    how can i stream video and audio from macbook air to my tv?

    Wirelessly: you need an AirPlay - enabled device such as an AppleTV.
    Wired: if your TV has an HDMI port, you need a Thunderbolt to HDMI adapter such as this one:
    Mini DisplayPort to HDMI® Adapter w/ Audio Support
    If your TV does not have an HDMI port you will need a converter that will convert HDMI input to whatever input your TV requires.

  • HT1212 I am trying to restore a phone that the screen does not work on, therefore I can't input my password.  How can I bypass this and upload it to itunes?

    I am trying to restore a phone that the screen does not work on, therefore I can't input my password.  How can I bypass this and upload it to itunes?

    You could follow the instructions in the support document that you linked from. There is a section regarding the passcode and the inability to use it or enter it. However, you may encounter more issues since you cannot use the screen.

Maybe you are looking for