Help in Understanding DBMS_JOB.SUBMIT

Hi,
I trying DBMS_JOB.SUBMIT for the first time and i am unable to figure out what is wrong in my code as i dont find any errors.
I have a Procedure Pro_job which has DBMS_JOB.SUBMIT which inturn calls an procedure.
here is the code.
CREATE OR REPLACE procedure Pro_job( P_Number1 IN Number) is
jobno number;
Begin
DBMS_JOB.SUBMIT(job=>jobno,
what => 'P_T.Proc_T(''P_Number1'');');
dbms_output.put_line(P_Number1);
dbms_output.put_line(jobno);
End;
When i compled there are no erros, but this DBMS_JOB.SUBMIT is not triggering or running P_T.Proc_T. And also i want it to run only once with out NEXT_DATE schedule. When i see in DBA_JOBS_RUNNING I find that the job is getting scheduled to run again for the same jobno. which i dont want evern if it fails. Thats the reason why i havnt given any Next_Date in DBMS_JOB.SUBMIT, but still it takes.
Select * from DBA_JOBS_RUNNING
I dont understand which i went work. Can someone guide me on this issue.
Thanks
Sami

You say that it's not triggering or running P_T.Proc_T.
How do you know?
Is it because you can't see the effects of that proc?
You also say that you can see it in DBA_JOBS_RUNNING and that it's getting rescheduled.
This means that the submit has worked.
It also sounds very much like the job is failing.
If the job fails it will retry a number of times before getting set to broken.
If you put some logging in what you're calling (the logging in an autonomous transaction perhaps), it might be more obvious what's happening.
Here's a standalone example of submitting a job, and it running:
SQL> drop table job_test;
Table dropped.
SQL> create table job_test
  2  (col1 date);
Table created.
SQL>
SQL> create or replace procedure p_job_test
  2  as
  3  begin
  4    insert into job_test
  5    values(sysdate);
  6    commit;
  7  end;
  8  /
Procedure created.
SQL> select * from job_test;
no rows selected
SQL>
SQL> declare
  2   l_job integer;
  3  begin
  4   dbms_job.submit(l_job,'p_job_test;');
  5   commit;
  6  end;
  7  /
PL/SQL procedure successfully completed.
SQL>
SQL> select * from job_test;
no rows selected
SQL> select * from job_test;
COL1
02-FEB-11
SQL> select * from user_jobs;
no rows selected
SQL>

Similar Messages

  • Help in dbms_job.submit

    Hi All,
    DECLARE
      ln_jobno NUMBER;
    BEGIN
      -- To run at 11:00 each day
      dbms_job.submit(ln_jobno,
                      'dwsp_ext_lyris(''' || to_char(trunc(sysdate - 1),'DD-MON-YYYY') || ''',null);',
                      to_date('11-JUL-2011 11:20', 'DD-MON-YYYY HH24:MI'),
                      '(trunc(sysdate) + 1) + (11/24)');
      COMMIT;
    END;
    /The Job created successfully and running too.
    But the procedure 'dwsp_ext_lyris' takes two argument of which one is date and the everyday the date passing to the procedure must be incremented by one
    Say for today it should look like 'dwsp_ext_lyris('11-JUL-2011',null);
    But this is not happening as I created this yesterday my dba_jobs table has o/p like this.
    SQL> select t.JOB,t.LAST_DATE,t.NEXT_DATE,t.BROKEN,t.interval,t.WHAT from dba_jobs t where t.JOB = 797192;
           JOB LAST_DATE   NEXT_DATE   BROKEN INTERVAL                                                                         WHAT
        797192 11/07/2011  12/07/2011  N      (trunc(sysdate) + 1) + (11/24)                                                   dwsp_ext_lyris('10-JUL-2011',null);
    SQL> I want dwsp_ext_lyris('10-JUL-2011',null); to be incremeted daily.
    can anybody help how should I pass sysdate - 1 to procedure everyday.

    Hello
    I think you just have your quotes in the wrong place. You need the procedure to evaluate the expression, not the call to DBMS_JOB....
    DECLARE
      ln_jobno NUMBER;
    BEGIN
      -- To run at 11:00 each day
      dbms_job.submit(ln_jobno,
                      'dwsp_ext_lyris(to_char(trunc(sysdate - 1),''DD-MON-YYYY''),null);',
                      to_date('11-JUL-2011 11:20', 'DD-MON-YYYY HH24:MI'),
                      '(trunc(sysdate) + 1) + (11/24)');
      COMMIT;
    END;
    / However, you should really try to pass dates as dates, not strings. If the data type of the parameter to dwsp_ext_lyris i actually a date, you can just use...
    DECLARE
      ln_jobno NUMBER;
    BEGIN
      -- To run at 11:00 each day
      dbms_job.submit(ln_jobno,
                      'dwsp_ext_lyris(trunc(sysdate - 1),null);',
                      to_date('11-JUL-2011 11:20', 'DD-MON-YYYY HH24:MI'),
                      '(trunc(sysdate) + 1) + (11/24)');
      COMMIT;
    END;
    / HTH
    David

  • Help Regarding DBMS_JOB.SUBMIT

    I Have Job Like this
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => X
    ,what => 'CSNG.CS_JSP_RQST;'
    ,next_date => to_date('13/06/2008 01:00:00','dd/mm/yyyy hh24:mi:ss')
    ,interval => 'TRUNC(SYSDATE+1) + (1/24)'
    ,no_parse => TRUE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    END;
    commit;
    'CSNG.CS_JSP_RQST' Procedure is executing every day ..
    i want to execute it only when
    in CS_JSP_TABLE column "CREATE DATE=SYSDATE"
    can anyone tell how to do this
    any suggestions please ..
    Thanks in advance ..
    Message was edited by:
    Data Boy
    Message was edited by:
    Data Boy

    you will need to put the procedure CSNG.CS_JSP_RQST in another procedure to call it. then have a logic that checks for the value of the column create_date with today's date in the table CS_JSP_TABLE. if that match call the procedure CSNG.CS_JSP_RQST. something like to this example below:
      create or replace procedure CSNG.CS_JSP_CALL as
        vCnt     number := 0;
      begin
         select count(*)
           into vCnt
           from CS_JSP_TABLE
          where trunc(create_date) = trunc(sysdate);
         if vCnt > 0 then
           CSNG.CS_JSP_RQST;
         end if;
      end;
    in your DBMS_JOB.SUBMIT you call the procedure CSNG.CS_JSP_CALL.
      declare
        x number;
      begin
        sys.dbms_job.submit ( job => X ,
                              what => 'CSNG.CS_JSP_CALL',
                              next_date => to_date('13/06/2008 01:00:00','dd/mm/yyyy hh24:mi:ss'),
                              interval => 'TRUNC(SYSDATE+1) + (1/24)',
                              no_parse => TRUE );
        sys.dbms_output.put_line('Job Number is: ' || to_char(x));
        commit;
      end;
    /

  • DBMS_JOB.SUBMIT

    Hi All,
    I am trying to work with DBMS_JOB.SUBMIT and i am unable to move forward since i am not understanding where i am wrong. Please help me with my issue.
    I have a package as below
    CREATE OR REPLACE PACKAGE Pack.main
    AS
    PROCEDURE Proc1( V1_P1_in in number, V2_P1_out out number)
    PROCEDURE Proc2(V1_P2_In in number, V2_P2_in in Vachar2, V3_P2_out out Number)
    PROCEDURE Proc1( V1_P3_in in number, V2_P3_out out number)
    Proc2 internally calles another proc called Proc2_Load which calles about 5 other procs lets call Proc2L_1, Proc2L_2, Proc2L_3, Proc2L_4, Proc2L_5
    I want to run all these 5 Procs parallely. so i am using DBMS_JOB.SUBMIT.
    Normally i call the procs like this
    Proc2_1(V1_P2_In , V2_P2_in, row_count); -- row_count is out variable
    --- V1_P2_In , V2_P2_in are provided by Proc2_Load which gets from Proc2
    I am trying to replace aboved code with below DBMS_JOB.SUBMIT.
    DBMS_JOB.SUBMIT(job=>jobno,
    what => '
    DECLARE
    row_count Number;
    BEGIN
    Proc2_1('||V1_P2_In ||', '|| V2_P2_in||',row_count);
    END; ');
    There is something worng with the in and out variables... can you please guide me how i have do this.
    Thanks
    BN
    Edited by: 837343 on Feb 16, 2011 9:47 AM

    I would also suggest to use dbms_scheduler. it makes it much simpler to track the success/failure of those jobs.
    However your problem is simply that you add a STRING variable the wrong way.
    v2_p2_in must be encapsulated into single ' for the package call
    like this (untested)
    DBMS_JOB.SUBMIT(job=>jobno,
           what => 'DECLARE '||
        ' row_count Number; '||
        ' BEGIN '||
           ' Proc2_1('||V1_P2_In ||', '''|| V2_P2_in||''',row_count); '||
         'END;');Not sure if the final ; inside the string is needed but you should keep it for the moment.
    Edited by: Sven W. on Feb 17, 2011 3:02 PM

  • Dbms_job.submit failed

    Hi all,
    I'm just wondering why is it that when i submit a job using dbms_job.submit, it always fails.. But when I try dbms_job.run or execute the procedure itself, the procedure was executed successfully and I was able to get the output that i want.
    Here's my code snippet:
    declare
    x_job number;
    begin
    sys.dbms_job.submit(x_job, 'begin cl_msg2.cl_msg_call; end;', sysdate,NULL);
    commit;
    end;
    I tried to check the alert_log.txt and it shows this error:
    Errors in file /u1/oracle/admin/ABC4/bdump/snp3_1854.trc:
    ORA-12012: error on auto execute of job 694
    ORA-20001:
    ORA-06512: at "ABCDEV.SYSTOR", line 81
    ORA-06512: at "ABCDEV.CL_MSG2", line 512
    ORA-06512: at "ABCDEV.CL_MSG2", line 21
    ORA-06512: at line 1
    When i check for the source of the error, I found out that the sqlcode it returns is 100.. which means no_data_found. It's doing an update on a table. (I've tried running the )
    It's kinda weird because when I checked the record on the table, it DOES exists.. And as I've mentioned earlier, there's no problem when i use dbms_job.run to run the procedure.
    I really don't have an idea as to what have caused the failure on the job.
    Thanks and regards,
    Anna

    Hi,
    Thanks for the immediate reply. Sorry, but I have a very little knowledge when it comes to database issues.. And this is my first time to use dbms_job utility. Here is the code snippet of where the error occurs:
    BEGIN
    UPDATE CL_DRAWDOWN SET msg_cnf = 'Y'
    WHERE dd_key = cmsg.dd_key
    AND loan_no = cmsg.loan_no
    AND dd_no = cmsg.dd_no;
    EXCEPTION
    WHEN OTHERS THEN
    Systor.insert_error_msg (SQLCODE, 'CL_MSG2', 'MSG_PAY', 'O', '10 '|| TO_CHAR(cmsg.dd_key));
    END;
    As you can see on the above snippet, SYSTOR package is being used to handle exception and for monitoring/recording of errors. It actually inserts the error encountered on a table and raise an application error with code -20001.
    Im not really sure I understand this part
    'Ordinary session and job session have different environment. Your code can (recursively) query v$session in unappropriate way.'. Could you please elaborate?
    Thanks a lot for your help!

  • Error in DBMS_JOB.SUBMIT

    Dear All,
    I am getting erron when submitting job in oracle 9.2 database. pl help me to submit the job. job need to be executed on every day 5pm.
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    NOB => 12
    ,what => 'SYS.PR_STATUS;'
    ,next_date => 'trunc(sysdate)+1+(17*60)/(24*60)'
    ,interval => 'TRUNC(SYSDATE+1)'
    END;
    error Information
    Error starting at line 36 in command:
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    NOB => 12,
    what => 'SYS.PR_STATUS;'
    ,next_date => 'trunc(sysdate)+(1020/1440)'
    ,interval => 'TRUNC(SYSDATE+1)'
    END;
    Error report:
    ORA-06550: line 2, column 1:
    PLS-00306: wrong number or types of arguments in call to 'SUBMIT'
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    Thanks and regards,
    Abk.

    sorry Teymur,
    By mistake i had type in Nob that is Job..
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    JOB => 12,
    what => 'SYS.PR_STATUS;'
    ,next_date => 'trunc(sysdate)+(1020/1440)'
    ,interval => 'TRUNC(SYSDATE+1)'
    END;
    and the error is
    Error starting at line 36 in command:
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    JOB => 12,
    what => 'SYS.PR_STATUS;'
    ,next_date => 'trunc(sysdate)+(1020/1440)'
    ,interval => 'TRUNC(SYSDATE+1)'
    END;
    Error report:
    ORA-06550: line 4, column 1:
    PLS-00363: expression '<expression>' cannot be used as an assignment target
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Dbms_job submit status

    Hi,
    I need to disable/hide the submit button after i submit the job using dbms_job submit process.
    Also after after completion needs to enable the button.
    Is there any background process i can run which enable or disable the button?
    Thanks,
    K

    Hi,
    Client (your browser) need check status from server.
    Here is one example that might help
    https://apex.oracle.com/pls/otn/f?p=40323:69
    When you press "Submit Job" button page is submitted and process creates job using APEX_PLSQL_JOB.
    Then window is refresh every 10 sec, until job finish.
    I did create application item G_META_TAG
    I did place to page HTML header
    &G_META_TAG.Then I did create display only item Px_JOB_RUNNING and Px_JOB_ID
    Computation "PL/SQL Function body" for Px_JOB_RUNNING
    FOR c1 IN(
      SELECT 1
      FROM apex_plsql_jobs
      WHERE (job = :Px_JOB_ID OR :Px_JOB_ID IS NULL)
      AND system_status = 'COMPLETE'
    )LOOP
      RETURN 'No';
    END LOOP;
    RETURN 'Yes';Computation "PL/SQL Function body" for G_META_TAG
    IF :Px_JOB_RUNNING = 'Yes' THEN
      RETURN '<meta http-equiv="refresh" content="10">';
    ELSE
      RETURN NULL;
    END IF;Then submit button conditionally Px_JOB_RUNNING value "No".
    Page after submit process
    DECLARE
      l_sql VARCHAR2(4000);
      l_job NUMBER;
    BEGIN
      l_sql := '
        BEGIN
          FOR i IN 1..3
          LOOP
            APEX_UTIL.PAUSE(10);
          END LOOP;
        END;
      l_job := APEX_PLSQL_JOB.SUBMIT_PROCESS(
        p_sql => l_sql,
        p_status => 'Background process submitted'
      --store l_job for later reference
      :PX_JOB_ID := l_job;
      :PX_JOB_RUNNING := 'Yes';
    END;I did make process conditionally by submit button and Px_JOB_RUNNING value "No"
    This is not ready solution and probably have bugs.
    One thing is specially how you check is job running.
    My sample stores job id to item session state. Value is lost if user logout, close browser or clears cache.
    Then user can submit job again, even previous job is running.
    Anyway I hope it give idea for you how continue.
    You can do similar check using Ajax/dynamic actions. Then whole window is not refreshed.
    Regards,
    Jari
    Edited by: jarola on Nov 18, 2010 7:10 PM
    Here is sample using Ajax
    http://actionet.homelinux.net/htmldb/f?p=100:93

  • Dbms_job.submit usage in forms

    Hi All
    I am getting implementation restriction problem when I use dbms_job.submit in oracle forms.
    Please let me know if anybody has any workaround.
    Thanks
    Sreeni

    see <Note:197696.1> How do you submit a DBMS_JOB from an Oracle Forms?
    I hop it helps bye

  • Dbms_job.submit error reporting

    Jobs are rerun - up to 16 tries, I understand - once submitted using dbms_job.submit. I can see the failures incrementing in the FAILURES columns of dba_jobs. What would be a suitable step to determine the cause of the job's failure, such as determining the associated ORA number that would have been returned had the code been submitted through sqlplus rather than as a job?

    Should of thought some before writing - the alert log and trace files contain the error codes.

  • Error when executing dbms_job.submit

    I work with ORACLE server 8.1.7 and I have executed the subprogram SUBMIT of the package dbms_job under an account which has not the DBA privilege . I have already defined a bind variable of type number in SQL*Plus, and there is a simple stored procedure, named GO, which shows only 'Hello'. Here are the codes :
    SQL>create or replace procedure go
    SQL>is
    SQL>begin
    SQL>dbms_output.put_line('Hello');
    SQL>end;
    SQL>/
    SQL>Proc&eacute;dure cr&eacute;&eacute;e
    SQL>set serveroutput on
    SQL>var x number
    SQL>execute dbms_job.submit(:x,'go;',sysdate,'sysdate+(1/288)')
    Then I received this error message :
    ORA-01422: l'extraction exacte ram&egrave;ne plus que le nombre de lignes demand&eacute;
    ORA-06512: &agrave; "SYS.STANDARD", ligne 586
    Please help me to resolve this problem. Thank you very much.

    Well, it works for me on my 8.1.7 installation (see below).
    I know a mysterious ORA-1422 can indicate a problem with
    dual: what does this query return?
    SELECT count(*) FROM dual;.
    Cheers, APC
    SQL> create or replace procedure go
      2  is
      3  begin
      4  dbms_output.put_line('Hello');
      5  end;
      6  /
    Procedure created.
    SQL> set serveroutput on
    SQL> var x number
    SQL> execute dbms_job.submit(:x,'go;',sysdate,'sysdate+(1/288)')
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> print x
             X
         14602
    SQL> exec dbms_job.run(14602)
    Hello
    PL/SQL procedure successfully completed.
    SQL>

  • Using DBMS_JOB,SUBMIT

    Hello,
    I would like to find out how to use DBMS_JOB.SUBMIT to run a certain procedure evry morning at say 5:00 AM
    Thanks
    Doug

    Hi,
    This info. taken from oracle documentation............... For more info look in oracle Documentation. I hope this will help you.
    DBMS_JOB subprograms schedule and manage jobs in the job queue.
    This chapter discusses the following topics:
    Requirements
    Using the DBMS_JOB Package with Oracle Real Application Clusters
    Summary of DBMS_JOB Subprograms
    Requirements
    There are no database privileges associated with jobs. DBMS_JOB does not allow a user to touch any jobs except their own.
    Using the DBMS_JOB Package with Oracle Real Application Clusters
    For this example, a constant in DBMS_JOB indicates "no mapping" among jobs and instances, that is, jobs can be executed by any instance.
    DBMS_JOB.SUBMIT
    To submit a job to the job queue, use the following syntax:
    DBMS_JOB.SUBMIT( JOB OUT BINARY_INTEGER,
    WHAT IN VARCHAR2, NEXT_DATE IN DATE DEFAULTSYSDATE,
    INTERVAL IN VARCHAR2 DEFAULT 'NULL',
    NO_PARSE IN BOOLEAN DEFAULT FALSE,
    INSTANCE IN BINARY_INTEGER DEFAULT ANY_INSTANCE,
    FORCE IN BOOLEAN DEFAULT FALSE)
    Use the parameters INSTANCE and FORCE to control job and instance affinity. The default value of INSTANCE is 0 (zero) to indicate that any instance can execute the job. To run the job on a certain instance, specify the INSTANCE value. Oracle displays error ORA-23319 if the INSTANCE value is a negative number or NULL.
    The FORCE parameter defaults to FALSE. If force is TRUE, any positive integer is acceptable as the job instance. If FORCE is FALSE, the specified instance must be running, or Oracle displays error number ORA-23428.
    DBMS_JOB.INSTANCE
    To assign a particular instance to execute a job, use the following syntax:
    DBMS_JOB.INSTANCE( JOB IN BINARY_INTEGER,
    INSTANCE IN BINARY_INTEGER,
    FORCE IN BOOLEAN DEFAULT FALSE)
    The FORCE parameter in this example defaults to FALSE. If the instance value is 0 (zero), job affinity is altered and any available instance can execute the job despite the value of force. If the INSTANCE value is positive and the FORCE parameter is FALSE, job affinity is altered only if the specified instance is running, or Oracle displays error ORA-23428.
    If the FORCE parameter is TRUE, any positive integer is acceptable as the job instance and the job affinity is altered. Oracle displays error ORA-23319 if the INSTANCE value is negative or NULL.
    DBMS_JOB.CHANGE
    To alter user-definable parameters associated with a job, use the following syntax:
    DBMS_JOB.CHANGE( JOB IN BINARY_INTEGER,
    WHAT IN VARCHAR2 DEFAULT NULL,
    NEXT_DATE IN DATE DEFAULT NULL,
    INTERVAL IN VARCHAR2 DEFAULT NULL,
    INSTANCE IN BINARY_INTEGER DEFAULT NULL,
    FORCE IN BOOLEAN DEFAULT FALSE )
    Two parameters, INSTANCE and FORCE, appear in this example. The default value of INSTANCE is NULL indicating that job affinity will not change.
    The default value of FORCE is FALSE. Oracle displays error ORA-23428 if the specified instance is not running and error ORA-23319 if the INSTANCE number is negative.
    DBMS_JOB.RUN
    The FORCE parameter for DBMS_JOB.RUN defaults to FALSE. If force is TRUE, instance affinity is irrelevant for running jobs in the foreground process. If force is FALSE, the job can run in the foreground only in the specified instance. Oracle displays error ORA-23428 if force is FALSE and the connected instance is the incorrect instance.
    DBMS_JOB.RUN( JOB IN BINARY_INTEGER,
    FORCE IN BOOLEAN DEFAULT FALSE)

  • Correct in dbms_job.submit to run midnight?

    Hi,
    Can you tell me if this is correct to run midnight everyday? Thanks.
    dbms_job.submit(:jobNUM,
    'package.procedure();', trunc(sysdate)+1,
    'trunc(sysdate)+1')

    Hi SD,
    Yes, the Job Submit is right.
    DECLARE
       job_no   NUMBER;
    BEGIN
       DBMS_JOB.submit (job_no,
                        'zero;',
                         TRUNC (SYSDATE) + 1,
                        'TRUNC(SYSDATE)+1',
                        FALSE
    COMMIT;
    END;To View the Jobs,
    SELECT *
      FROM USER_JOBS;When ever you Submit a job via DBMS_JOB.submit procedure, the Job Should be commited, then only the Job queue monitor can see the Job.
    As a result,uncommited jobs go undone.
    Hope this may help you.
    But, Please close your previous Posts when you are prepared to ask questions in the forum. Every one take their own valuable time to help
    you in the Forum.
    Thanks,
    Shankar

  • Commits after dbms_job submit

    All,
    a question regarding dbms_job.submit..
    Is it necessary to commit after calling dbms_job.submit. My job seems to be running only after calling commit after submit (although i see and entry for that job in user_jobs). Is there any setting that needs to be done to make it default ?
    Here is the snippet of code:
    PROCEDURE start_sync_job (i_sync_interval IN NUMBER) IS
    l_jobno NUMBER :=0;
    l_job_count NUMBER :=0;
    BEGIN
    dbms_job.submit(l_jobno, 'begin SS_PKG.sync_job; end;',
    SYSDATE + 1/1440, 'SYSDATE + '||i_sync_interval||'/1440');
    END;
    Thx,
    Rakesh

    This is not a problem of the dbms_job.submit, it is
    the problem of SS_PKG.sync_job ,I think someone
    forget issue commit inside this procedure(package).It is not.
    The SS_PKG.sync_job procedure will run via the dbms_job queue only when a commit is issued after calling dbms_job.submit. The commit inside the code for SS_PKG.sync_job procedure would not help in making the procedure run via the job queue.
    As mentioned by OP:
    My job seems to be running only after calling commit after submitMessage was edited by:
    Kamal Kishore

  • Error Posting IDOC: need help in understanding the following error

    Hi ALL
    Can you please, help me understand the following error encountered while the message was trying to post a IDOC.
    where SAP_050 is the RFC destination created to post IDOCs
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
      <SAP:P1>FM NLS_GET_LANGU_CP_TAB: Could not determine code page with SAP_050 Operation successfully executed FM NLS_GET_LANGU_CP_TAB</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: FM NLS_GET_LANGU_CP_TAB: Could not determine code page with SAP_050 Operation successfully executed FM NLS_GET_LANGU_CP_TAB</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Your help is greatly appreciated.............Thank you!

    Hi Patrick,
      Check the authorizations assigned to the user which you used in the RFC destinations, If there is no enough authorizations then it is not possible to post the idocs.
    Also Refer this Note 747322
    Regards,
    Prakash

  • E-Rows = NULL and A-Rows=42M? Need help in understanding why.

    Hi,
    Oracle Standard Edition 11.2.0.3.0 CPU Oct 2012 running on Windows 2008 R2 x64. I am using Oracle 10g syntax for WITH clause as the query will also run on Oracle 10gR2. I do not have a Oracle 10gR2 environment at hand to comment if this behaves the same.
    Following query is beyond me. It takes around 2 minutes to return the "computed" result set of 66 rows.
    SQL> WITH dat AS
      2          (SELECT 723677 vid,
      3                  243668 fid,
      4                  TO_DATE ('06.03.2013', 'dd.mm.yyyy') mindt,
      5                  TO_DATE ('06.03.2013', 'dd.mm.yyyy') maxdt
      6             FROM DUAL
      7           UNION ALL
      8           SELECT 721850,
      9                  243668,
    10                  TO_DATE ('06.02.2013', 'dd.mm.yyyy'),
    11                  TO_DATE (' 22.03.2013', 'dd.mm.yyyy')
    12             FROM DUAL
    13           UNION ALL
    14           SELECT 723738,
    15                  243668,
    16                  TO_DATE ('16.03.2013', 'dd.mm.yyyy'),
    17                  TO_DATE ('  04.04.2013', 'dd.mm.yyyy')
    18             FROM DUAL)
    19      SELECT /*+ GATHER_PLAN_STATISTICS */ DISTINCT vid, fid, mindt - 1 + LEVEL dtshow
    20        FROM dat
    21  CONNECT BY LEVEL <= maxdt - mindt + 1
    22  order by fid, vid, dtshow;
    66 rows selected.
    SQL>
    SQL> SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (NULL, NULL, 'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  9c4vma4mds6zk, child number 0
    WITH dat AS         (SELECT 723677 vid,                 243668 fid,
                TO_DATE ('06.03.2013', 'dd.mm.yyyy') mindt,
    TO_DATE ('06.03.2013', 'dd.mm.yyyy') maxdt            FROM DUAL
    UNION ALL          SELECT 721850,                 243668,
       TO_DATE ('06.02.2013', 'dd.mm.yyyy'),                 TO_DATE ('
    22.03.2013', 'dd.mm.yyyy')            FROM DUAL          UNION ALL
        SELECT 723738,                 243668,                 TO_DATE
    ('16.03.2013', 'dd.mm.yyyy'),                 TO_DATE ('  04.04.2013',
    'dd.mm.yyyy')            FROM DUAL)     SELECT /*+
    GATHER_PLAN_STATISTICS */ DISTINCT vid, fid, mindt - 1 + LEVEL dtshow
        FROM dat CONNECT BY LEVEL <= maxdt - mindt + 1 order by fid, vid,
    dtshow
    Plan hash value: 1865145249
    | Id  | Operation                              | Name | Starts | E-Rows | A-Rows |   A-Time   |  OMem |  1Mem | Used-Mem |
    |   0 | SELECT STATEMENT                       |      |      1 |        |     66 |00:01:54.64 |       |       |          |
    |   1 |  SORT UNIQUE                           |      |      1 |      3 |     66 |00:01:54.64 |  6144 |  6144 | 6144  (0)|
    |   2 |   CONNECT BY WITHOUT FILTERING (UNIQUE)|      |      1 |        |     42M|00:01:04.00 |       |       |          |
    |   3 |    VIEW                                |      |      1 |      3 |      3 |00:00:00.01 |       |       |          |
    |   4 |     UNION-ALL                          |      |      1 |        |      3 |00:00:00.01 |       |       |          |
    |   5 |      FAST DUAL                         |      |      1 |      1 |      1 |00:00:00.01 |       |       |          |
    |   6 |      FAST DUAL                         |      |      1 |      1 |      1 |00:00:00.01 |       |       |          |
    |   7 |      FAST DUAL                         |      |      1 |      1 |      1 |00:00:00.01 |       |       |          |
    --------------------------------------------------------------------------------------------------------------------------If I take out one of the UNION queries, the query returns in under 1 second.
    SQL> WITH dat AS
      2          (SELECT 723677 vid,
      3                  243668 fid,
      4                  TO_DATE ('06.03.2013', 'dd.mm.yyyy') mindt,
      5                  TO_DATE ('06.03.2013', 'dd.mm.yyyy') maxdt
      6             FROM DUAL
      7           UNION ALL
      8           SELECT 721850,
      9                  243668,
    10                  TO_DATE ('06.02.2013', 'dd.mm.yyyy'),
    11                  TO_DATE (' 22.03.2013', 'dd.mm.yyyy')
    12             FROM DUAL)
    13      SELECT /*+ GATHER_PLAN_STATISTICS */ DISTINCT vid, fid, mindt - 1 + LEVEL dtshow
    14        FROM dat
    15  CONNECT BY LEVEL <= maxdt - mindt + 1
    16  order by fid, vid, dtshow;
    46 rows selected.
    SQL>
    SQL> SELECT * FROM TABLE (DBMS_XPLAN.display_cursor (NULL, NULL, 'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  1d2f62uy0521p, child number 0
    WITH dat AS         (SELECT 723677 vid,                 243668 fid,
                TO_DATE ('06.03.2013', 'dd.mm.yyyy') mindt,
    TO_DATE ('06.03.2013', 'dd.mm.yyyy') maxdt            FROM DUAL
    UNION ALL          SELECT 721850,                 243668,
       TO_DATE ('06.02.2013', 'dd.mm.yyyy'),                 TO_DATE ('
    22.03.2013', 'dd.mm.yyyy')            FROM DUAL)     SELECT /*+
    GATHER_PLAN_STATISTICS */ DISTINCT vid, fid, mindt - 1 + LEVEL dtshow
        FROM dat CONNECT BY LEVEL <= maxdt - mindt + 1 order by fid, vid,
    dtshow
    Plan hash value: 2232696677
    | Id  | Operation                              | Name | Starts | E-Rows | A-Rows |   A-Time   |  OMem |  1Mem | Used-Mem |
    |   0 | SELECT STATEMENT                       |      |      1 |        |     46 |00:00:00.01 |       |       |          |
    |   1 |  SORT UNIQUE                           |      |      1 |      2 |     46 |00:00:00.01 |  4096 |  4096 | 4096  (0)|
    |   2 |   CONNECT BY WITHOUT FILTERING (UNIQUE)|      |      1 |        |     90 |00:00:00.01 |       |       |          |
    |   3 |    VIEW                                |      |      1 |      2 |      2 |00:00:00.01 |       |       |          |
    |   4 |     UNION-ALL                          |      |      1 |        |      2 |00:00:00.01 |       |       |          |
    |   5 |      FAST DUAL                         |      |      1 |      1 |      1 |00:00:00.01 |       |       |          |
    |   6 |      FAST DUAL                         |      |      1 |      1 |      1 |00:00:00.01 |       |       |          |
    26 rows selected.What I cannot understand is why the E-Rows is NULL for "CONNECT BY WITHOUT FILTERING (UNIQUE)" step and A-Rows shoots up to 42M for first case. The behaviour is the same for any number of UNION queries above two.
    Can anyone please help me understand this and aid in tuning this accordingly? Also, I would be happy to know if there are better ways to generate the missing date range.
    Regards,
    Satish

    May be, this?
    WITH dat AS
                (SELECT 723677 vid,
                        243668 fid,
                        TO_DATE ('06.03.2013', 'dd.mm.yyyy') mindt,
                        TO_DATE ('06.03.2013', 'dd.mm.yyyy') maxdt
                   FROM DUAL
                 UNION ALL
                 SELECT 721850,
                        243668,
                       TO_DATE ('06.02.2013', 'dd.mm.yyyy'),
                       TO_DATE (' 22.03.2013', 'dd.mm.yyyy')
                  FROM DUAL
                UNION ALL
                SELECT 723738,
                       243668,
                       TO_DATE ('16.03.2013', 'dd.mm.yyyy'),
                       TO_DATE ('  04.04.2013', 'dd.mm.yyyy')
                  FROM DUAL)
           SELECT  vid, fid, mindt - 1 + LEVEL dtshow
             FROM dat
      CONNECT BY LEVEL <= maxdt - mindt + 1
          and prior vid = vid
          and prior fid = fid
          and prior sys_guid() is not null
      order by fid, vid, dtshow;
    66 rows selected.
    Elapsed: 00:00:00.03

Maybe you are looking for

  • Open hub for Inventory data

    Experts, We have a requirement where we need to push out Inventory data from BW to third party systems. We have a daily cube and monthly snapshot cube implemented. Now, there are fields that the third party systems require including Movement type. Th

  • My Wi-Fi not working

    Dear to All, What to do! My wi-fi not working. Brgds Vladimir

  • Problems with Mac email. Friends getting failed delivery notifications.

    Hi. Just logging into Apple community for the first time. I have a Mac Book Air. Contacts are saying that they have problems emailing me. I'm just using the standard Mac email. They say they are getting failed delivery messages. Is there anything I c

  • Firefox is crashing when loading specific pages.

    I've tried disabling and re-enabling each plugin, I've downloaded the newest version of Firefox, and ''nsBrowserOpt.dll'' doesn't seem to be the problem. My computer recently (like two hours ago, haha) crashed and rebooted using Microsoft System Reco

  • Daily, Monthly & YTD Numbers

    HI guys, I need some help. I need to display/calculate number of records for different types of SR's and different time periods in 4 columns as displayed below SR Type  |  Daily  |  30 Days  |  YTD (Year-to-Date) Type A | 10 | 87 | 578 Type B | 7 | 4