DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Bind variable "JOBNO" not declared. ( Please give me solution )

  1. #1
    Join Date
    Sep 2006
    Posts
    1

    Unhappy Bind variable "JOBNO" not declared. ( Please give me solution )

    I m trying to run this code in SQL plus but every time it show me
    Bind variable "JOBNO" not declared. What should i do. Is it something i m missing in this code. Please give me solution. I have copy paste this code from one sode to run Job ( Schedule) In Oracle.

    variable jobno number
    variable instno number
    BEGIN
    SELECT instance_number INTO :instno FROM v$instance;
    DBMS_JOB.SUBMIT(:jobno, 'pms.USP_HRMSMIGRATION;', trunc(sysdate)-1/1440, 'trunc(sysdate)-2/1440', TRUE, :instno);
    COMMIT;
    END;
    /


    Thanks
    Jatin Patel

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    No obvious reason for the error, I think, but the values for the first run and the interval are just incorrect as they point to past.

    Try this:
    Code:
    variable jobno number
    variable instno number
    BEGIN
    SELECT instance_number INTO :instno FROM v$instance;
    DBMS_JOB.SUBMIT(:jobno, 'pms.USP_HRMSMIGRATION;', sysdate+1/1440, 'sysdate+2/1440', TRUE, :instno);
    COMMIT;
    END;
    /
    Has the user the select permission on v$instance?
    Has he rights to run the procedure?
    Ales
    The whole difference between a little boy and an adult man is the price of toys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width