Problem with DBMS_SCHEDULER. CREATE_JOB in the package

Hi all

I tried the following with DBMS_SCHEDULER example. CREATE_JOB.
This is just an example, I tried to use the DBMS_SCHEDULER package. Exception block is also not have good standards, because I just want to understand that the package
create table test_test1 (process_id number  ,name varchar2(22) )

CREATE OR REPLACE PACKAGE PKG_SCHEDULER_TEST
IS
   PROCEDURE proc_test (v_process_id NUMBER, v_name VARCHAR2);

   PROCEDURE DATA_LOAD (v_process_id NUMBER, v_name VARCHAR2);
END PKG_SCHEDULER_TEST;



CREATE OR REPLACE PACKAGE BODY PKG_SCHEDULER_TEST
IS
   PROCEDURE Data_load (v_process_id NUMBER, v_name VARCHAR2)
   IS
   BEGIN
      DBMS_OUTPUT.PUT_LINE ('Data_Load Started ');

      INSERT INTO test_test1 (process_id, name)
           VALUES (v_process_id, v_name);

      COMMIT;
   EXCEPTION
      WHEN OTHERS
      THEN
         DBMS_OUTPUT.put_line ('sp_Data_load error');
   END;


   PROCEDURE proc_test (v_process_id NUMBER, v_name VARCHAR2)
   IS
   BEGIN
      DBMS_OUTPUT.PUT_LINE ('PROC_TEST STARTED ');

      FOR i IN 1 .. 10
      LOOP
         DBMS_OUTPUT.PUT_LINE ('Inside loop started');
         DBMS_SCHEDULER.CREATE_JOB (
            JOB_NAME          => 'Scheduler' || i,
            JOB_TYPE          => 'PLSQL_BLOCK',
            JOB_ACTION        => 'begin
                                           PKG_SCHEDULER_TEST.DATA_LOAD ('
                                          || v_process_id
                                          || ','
                                          || ''''
                                          || v_name
                                          || '); end;',
            START_DATE        => NULL,
            REPEAT_INTERVAL   => NULL,
            END_DATE          => NULL,
            ENABLED           => TRUE,
            COMMENTS          => ' Comments');
      END LOOP;

      DBMS_OUTPUT.PUT_LINE (' Lood ended');
   EXCEPTION
      WHEN OTHERS
      THEN
         DBMS_OUTPUT.put_line (
            'proc_test error' || SQLCODE || ',' || SQLERRM);
   END;
END PKG_SCHEDULER_TEST;
The above package was created successfully, but when I tried to run this package the following is the output
SQL> set serverout on
SQL> exec PKG_SCHEDULER_TEST.proc_test(1,'A
PROC_TEST STARTED
Inside loop started
Inside loop started
Inside loop started
Inside loop started
Inside loop started
Inside loop started
Inside loop started
Inside loop started
Inside loop started
Inside loop started
Lood ended

PL/SQL procedure successfully completed.
The question now is after the execution of this package, that the data is not loaded in the TEST_TEST1 table and no statement of output which is located in the Data_load procedure

Please guide me where I am doing wrong

Thank you

Take a close look at your JOB_ACTION

            JOB_ACTION        => 'begin
                                           PKG_SCHEDULER_TEST.DATA_LOAD ('
                                          || v_process_id
                                          || ','
                                          || ''''
                                          || v_name
                                          || '); end;',

It will come out with something like

begin
PKG_SCHEDULER_TEST.DATA_LOAD(1,'name); end;

See the problem?

Tags: Database

Similar Questions

  • Problem with Windows Update after the new installation of Windows 7 Pro the Lenovo ThinkPad X 200

    I'm trying to do a fresh install of Windows 7 Pro on a Lenovo ThinkPad X 200. The product key is easy to find on the sticker of the ThinkPad. However, the version of Windows is hidden (for example, I can't check that my ThinkPad had originally installed Windows 7 Pro). I was able to install by using a Pro Win 7 SP1 CD ROM I bought for another installation. I used the ThinkPad I was trying to make the new facility on the product key. I was able to activate the Windows 7 Pro using the phone call and my cell phone. I checked the activation! However, I have problems with Windows update. The product key may be a different version of Windows 7. If so, why did it install and activate OK? Y at - it a fix for this problem or I have to buy a new version of Windows 7 Pro? Please note that I have not yet installed all drivers Lenovo ThinkPad as I can't seem to install correctly. Thank you!

    Since the issue is updated to Windows, it is not a product number key.

    You can reset the Windows Update components by running the Fixit on this page. But if there is malware present, she will continue to reset the connection to the update servers:

    How to reset the Windows Update components

    http://support.Microsoft.com/kb/971058

    Suggest you download and save the Fixit. Then configure the system before the clean boot by running:

    How to troubleshoot a problem by performing a clean boot in Windows Vista/Windows 7

    http://support.Microsoft.com/kb/929135

    Once the Fixit has been downloaded and the system is started in the pure State, check that the native Windows Firewall is now on if a 3rd party firewall has been used previously. Now run the Fixit and choose the default mode. Restart once it's done and see if the system can be connected to the update servers. If he can't, then rerun the Fixit and choose aggressive mode. Turn it back on when he finished the race and updates.

  • Problem with silverlight download, download the error code 2104.

    Original title: problem with Sliverlight download
    get the error code 2104. tried to uninstall and reinstall

    Hello

    Thanks for the reply.

    We are pleased to know that the problem is solved. Please do not hesitate to answer, in the case where you are facing in the future other problems with Windows. Please contact the Windows community.

  • I have problems with my application of the java language.

    I have problems with my application of the java language. It will be open only for about one second, and it won't let me write all programs, it looks like the command prompt when opening. what the * is underway and what can I do to solve this problem.

    Hey Kevin,

    The description of the problem seems a little unclear and I wish I had a better understanding before you start working on it.

    I would really appreciate if you could answer the following questions:

    1. is the specific question of the application of the Java language?

    2. did you of recent changes made to your computer before the show?

    3. you receive an error code or message?

    Please provide us with more information on the specific question to help you to fix as soon as possible.

    If the problem is specific to the Java application, then I suggest you to contact Java support from the links below:

    http://www.Java.com/en/download/support.jsp

    Java Help Center:

    http://www.Java.com/en/download/help/

    Your response is very important for us to ensure a proper resolution. Please get back to us with the information above to help you accordingly.

  • I have problem with value NULL when the use CASE statement please help this question

    I have problem with value NULL when the use CASE statement please help this question


    Table: digital_val

    SNO cl C2

    1 San1 11

    2 22 San2

    Actual result: expected to A         B

    A            B                                                                           11        22

    11 NULL

    22 NULL



    query:

    Select case when c1 = "san1" then c2,.

    case If c1 = "san2" then c2 B

    of digital_val

    I'm more curious why, when you select 2 rows, you expect a result of row?

    WITH digital_val

    AS (SELECT 1 AS 'Sno', 'San1"C1, c2 FROM DUAL 11)

    UNION ALL

    2 SELECT AS 'Sno', 'San2"C1, c2 FROM DUAL 22)

    SELECT CASE WHEN c1 is "San1" THEN END AS A c2.

    CASE WHEN c1 = "San2" THEN END AS B c2

    OF digital_val;

    With no other input, if you select 2 rows, you get 2 rows.  One of the other solutions use a max function, but is this really what you want, does not specify?

  • Bridge does not open? Initially the 8.1 Win & problem had started. Have now earn 10 & still a problem with not to open the bridge?

    Bridge does not open? Initially the 8.1 Win & problem had started. Have now earn 10 & still a problem with not to open the bridge?

    Hi Matthew,

    If you use Bridge CC, update to the latest version 6.2. Adobe Bridge CC 6.2 version now available! Adobe content corner

    1. Please, do a right-click on the bridge on the desktop icon and select "Run as Administrator".
    2. If this does not help, reset the Bridge preferences and then try it.

    Steps: -.

    Start Adobe Bridge, and immediately press Ctrl + Alt + Shift (Windows) or command + Option + shift (Mac OS down) until the dialogue box reset settings appears.

    Select all three options - reset preferences, reset Standard Workspaces and all miniature Purge Cache - and then click OK.

    Reference: troubleshooting errors, freezes | Adobe Bridge | Windows, Mac OS

    Let us know if it works.

    Kind regards

    Assani

  • problem with bind variables in the SQL query view object

    Hi all

    I use JDev 11.1.2.4.0.

    I have a problem with bind variables in the SQL query view object.

    This is my original SQL

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE t.nctuser_id = '20022' 
          AND to_char(t.insertdate,'YYYYMMDD') in ('20130930','20130929')
    group by t.legertype_id
    

    In my view .xml object query tab, I am writing this

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE   t.nctuser_id = '20022'
        AND to_char(t.insertdate,'YYYYMMDD') in :dddd
    group by t.legertype_id
    

    Davis here is a variable of Type liaison: String, updatable and necessary.

    I try to deal with Davis as ('20130930 ', ' 20130929') hoping the view object, run as my original SQL.

    But failed. The view object retrieves 0 line after that I run.

    Why?

    Thank you! ('2original SQL0130930', '20130929') ('20130930 ', ' 20130929')

    A variable binding cannot be used as this is why you must use years table. Check decompilation binary ADF: using oracle.jbo.domain.Array with ViewCriteria to see a solution.

    Timo

  • Problem with my file in the SupportVIs directory found deployment package and not the Destination directory specified

    I have a little problem with a package of teststand.  I wrote a few screws to provide a wrapper around a custom DLL to provide the error handling. These screws use the following call library functions as indicated below.

    After installing my application, some of my screws are my DLL custom in the correct destination directory and other parts that are in the Directory Support screw which creates the deployment. The problem is that the DLL must be installed in a specific directory, because it uses the other files that are in this place-related directories.

    Currently I work around this problem by running the installer, and then manually delete the DLL to the folder of the SupportVIs dirctory.

    Does anyone have any suggestions on how to fix this?.

    Hey,.

    So, what seems to happen, is that your VI sees that DLL as a dependency and wants to keep with her VI.  I can't find a way to the deployment tool to do what you ask, however, here are two ideas that could solve your problem in other words.

    Do you need to have your DLL in the precise place?  If this is not the case, why not in your VI on your call library function, check specify a path on the chart.  Then, on your diagram, you generate a path relative to the location of the VI.  In this way, it's okay if your DLL is located in the support of screw

    Another idea would be after that installation is created, you can create a batch file that runs the installation and then automatically delete the DLL support VI place.

  • a problem using dbms_scheduler.create_job. I can't do the work

    I do work to run sh program with 5 arguments, even if I put the time, work does not work...
    Please tell me, why it does not work...-. -;

    I write the source for jobs below...

    exec (dbms_scheduler.create_job)
    job_name = > 'run_sh ',.
    job_type = > 'EXECUTABLE. "
    job_action = > ' /fsoracle/app/oracle/inst2/if_cft/test.sh ZADA/fsoracle/app/oracle/product/rdbms/log/KFG. DD SHRCOM. HR DIRECTOR. A03 KFG. DD SHRCOM. HR DIRECTOR. A03 25 25',
    start_date = > sysdate + 1/1440
    );

    Hello

    You don't have to create a program first, put directly in the work should work as well.

    Your pl/sql code is correct, then you should check out a few things with the shell script

    -is set + rx
    -is the first line #! / bin/sh
    -should I use the full path to the executable files for example/usr/bin/ftp
    -It defines the variables

    If that all seems well, consider adding lines of logging to your shell script to debug what goes wrong.

    See this post for more tips

    Guide to the external work on with dbms_scheduler 10g for example scripts, batch files

    Any other questions about the Scheduler, you can use the forum Planner here

    Planner

    Hope this helps,
    Ravi.

  • Strange problem with light touches on the Satellite A350-10z

    Hello

    I have a Toshiba A350-10z with windows 7 x 64. When I got a Vista everything was all straight light keys working properly.
    Now the keys have different functions - the key to 'silence' runs my player for example. And there is another problem - my 'FN' key does not work.

    When I use TI - OS shows an error and ask me to close the application. I can run these shortcuts by the mouse. Is there a driver for this?
    I can't found on the download site.

    Please install the package of added value for your laptop model.

    If you already have it out of the system, and after restarting the laptop install it again.

  • Problems with Windows 7RC in the Boot Camp Partition

    I have Windows 7 RC (32-bit) running on a Boot Camp partition on a 2nd generation of MacBook Air.  When I try to load it in VMWare Fusion 2.04, I get a BSOD just after the "Starting Windows" screen finishes loading.  It says that Windows has detected a problem, try to restart and executes the boot system diagnostic tool, nothing helps.  I tried implementing VMWare using Vista and Windows Server 2008, 1280 MB RAM and 3D on and outside.  Any ideas?

    akuska wrote:

    I have Windows 7 RC (32-bit) running on a Boot Camp partition on a 2nd generation of MacBook Air.  When I try to load it in VMWare Fusion 2.04, I get a BSOD just after the "Starting Windows" screen finishes loading.  It says that Windows has detected a problem, try to restart and executes the boot system diagnostic tool, nothing helps.

    At the time current Windows 7 in any version is not supported by Apple on the Boot Camp partition, nor is it supported in any way under Fusion.

    Although it is not supported, it will work however it depends what Guest select you when the virtual machine based on the creation of a regular file.  I don't got no problem using Windows Server 2008, when the virtual machine based on the creation of a regular file.

    On your Boot Camp partition was a clean build or you have an existing Boot Camp partition previously Virtual Machine.  If you had a Boot Camp existing partition previously Virtual Machine then try the following.

    ====================

    Note: These senses are different which have already been posted so read and follow through... Note: These steps assume that you have a single Apple to default installation of Windows on a single Boot Camp partition and Boot Camp of VMware Fusion single default partition Machine virtual (without a snapshot *) and if you have changed the partition Boot Camp Virtual Machine to add additional hard disks to be virtual or RAW disk then do not use these instructions unless you backup the Boot Camp partition the Machine package virtual first. * Also note that Fusion 2.0.0 may accidentally have a snapshot with the virtual partition Boot Camp Machine and it should not have, then you should check to ensure that the condition does not exist as well. (With merger closed if the partition Boot Camp Virtual Machine package is over 1 MB in size, then you might have a snapshot in place and do not continue with these instructions.)

    ===

    1. If the merger is open, close it.

    2. in a Terminal (/ Applications/Utilities/Terminal) copy and paste command, as the following and then press Enter and it will delete the partition Boot Camp Virtual Machine of the metadata and the Virtual Machine to help.

    Note: This does not affect the Boot Camp partition install windows in that it does not remove it.  Also be sure you copy all the command line below, as well as, "RM" at the beginning of the ' (quote) after the s in the Machines. "

    RM - dfr "/Users/$ the specified item was not found./Library/Application Support/VMware Fusion/Virtual Machines/Helper/naos-1.0.vmwarevm/vmware.log ' ~/Desktop/Helper_vmware.log

    ====================

    I tried implementing VMWare using Vista and Windows Server 2008, 1280 MB RAM and 3D on and outside.  Any ideas?

    VMware is a company so I doubt that you have implemented the company however, your statement is a bit ambiguous because it is not clear if your always talk your partition Boot Camp Machine virtual matter in Fusion, you tried to select each of them as an OS on the entrance of Boot Camp partition on the Virtual Machine library and it didn't help the Boot Camp Virtual Machine partition number or to be issues with creating virtual machines with these operating systems.

  • Error with dbms_scheduler.create_job

    Hi all

    I am trying to run CREATE_JOB, get the error below.
    I gess I have specified the valid month, but could not solve the problem. What could be the error?
       SQL> BEGIN
      2      dbms_scheduler.create_job(
      3              job_name => 'DEMO_STUDENT_TOT',
      4              job_type => 'PLSQL_BLOCK',
      5              job_action => 'begin student_sum; end; ',
      6              start_date => '7/14/2009 7:40 AM',
      7              repeat_interval => 'FREQ=DAILY',
      8              enabled => TRUE,
      9              comments => 'Demo for job schedule.');
     10  END;
     11  /
    BEGIN
    *
    ERROR at line 1:
    ORA-01843: not a valid month
    ORA-06512: at line 2
       
    Thank you

    Refer to the documentation: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#i1000363

    You have:

    start_date => '7/14/2009 7:40 AM',
    

    but the documentation says start_date is a timestamp.

    You must use to_timestamp()...

  • Problems with Mail running under the Sierra

    Mail does not display / download (PDFs, etc) attachments in emails that are sent to my e-mail hotmail.com account. The correct size of the email received is indicated, but the ether attachments are not visible or are not complete. This problem occurs only with the emails that are sent tony hotmail account, another account of e-mail (gmail, web.de, mail etc.) are not affected by this problem. I already deleted the account and reinstalled, resynchronized the account, check the correct IMAP - settings, nothing worked. Now, I demoted via Time machine to El Capitan. Now, everything is shown correctly without attachments are missed under El Capitan. Because the time machine really not added some attachments I ve some files lost unfortunately! Very good performance! I really disappointed m from Apple!   Is there a solution for this problem?

    Often, with large attachments; I could not find a systematic reason I don't have a hotmail account, but just a normal IMAP account.

  • I'm having a problem with Firefox nightly since the 28.0a1 update (2013-11-19). By browser.tabs.OnTop configuration is set to false, but the notches are on top. Help?

    Everything was working fine until today. I don't like having tabs on top, and I would like to have in the classic position of firefox, as many people as well.

    I hope you'll solve the problem with the next update.

    You can watch this extension:

    You can set "Tabs not on top" in the options for the extension on the subject: addons page.

  • Problem with Mail storage on the iPhone 6.

    OK, I have a problem with my mail. That is, it uses 1.2 GB of data. I cleaned all my emails and deleted all the big files. Nothing has changed. So I deleted all e-mail accounts. Still no change. When I plug my phone in iTunes, it says there 2.49 GB free yet my phone says I only have 337 MB of free space. Yes, I tried to sync and see if that has nothing and he did not. No idea what continues?

    Try to reset your email account in this order.

    First close your Mail application completely from the window of the selector app by double clicking the Home button and drag the email preview pane up until it disappears from the display. Then go to settings > Mail, Contacts, calendar > find your e-mail provider and click on the account. On the next page, delete the account. Then perform a forced reboot. Hold down the home and Sleep/Wake buttons simultaneously for about 15-20 seconds , until the Apple logo appears. Then go to settings > mail... and to add the account.

    iTunes and iPhone storage almost never fit. The amount of iTunes is an estimate, the phone is the exact amount.

    Different amounts of 'Available' reported by iPhone and iTunes

    If the above is not enough, you may need to do a system restore. First save your device via iTunes. Also import your photos on your computer and copy all the important data. Reconstruction of the support first test and test. If this does not help, you may need to restore as a new and reconfigure from scratch as the backup may be damaged. It is important to have your photos and your saved data separately from the backup. Here are the steps for a restoration:

    https://support.Apple.com/en-us/HT201252

Maybe you are looking for

  • Photo library

    Pictures location on a MAC now? Since the software completely useless 'photos' was created, it took control of my pictures and I can access is no longer the files into other applications. Why am I not in the control of this machine more? Can someone

  • Bookmark lost

    Hi, this is here the India RAM. I have been using mozila brower for the last 3 years. This is a very fantastic experience. Today, I am very disappointed when I start my laptop; all of sudden my firefox has updated and he asked me to import "Bookmark"

  • Photosmart 6510: AirPrint

    I'm used to be able to print from my iPhone.  Since I installed a new router that I have not been able to print from my iPhone.  When I hit the key apps I get "Server Conection error:-1.»  problem connecting to the server. The printer is connected to

  • error on Skype

    the conversation cannot be reached now, why

  • Cracked screen and faulty USB ports on Satellite A105-S1014

    On my Satellite A105-S1014 screen is cracked and needs to be replaced. How much cost could replace the screen? In addition, my phone and USB ports do not work properly. This problem arise well before that I accidentally cracked the screen. Some times