HTML DB authorisation via PL/SQL bug?

I tried to implement a simple authorisation package and failed. This seems to be a bug in HTML DB.
See below for package body. I have a function check_user and a procedure check_user2.
When I enter a call to the procedure in my Authorization Scheme (PL/SQL Function Returning Boolean) I get what I deserve:
auth2.check_user2(:APP_USER)
results in: ORA-06503: PL/SQL: Function returned without value
When I use the function instead however the error I get seems less justified:
auth2.check_user(:APP_USER)
ORA-06550: line 1, column 44: PLS-00221: 'CHECK_USER' is not a procedure or is undefined ORA-06550: line 1, column 44: PL/SQL: Statement ignored
It seems HTML DB is checking to make sure it finds a 'procedure' - but it really needs a 'function'...
Just for completeness the package body:
create or replace package body auth2
is
function check_user( P_USER IN VARCHAR2) return boolean
as
begin
insert into hr_log (log_txt) values (p_user);
return True;
end check_user;
procedure check_user2( P_USER IN VARCHAR2)
as
begin
insert into hr_log (log_txt) values (p_user);
commit;
end check_user2;
end auth2;
/

Peter - When HTML DB calls for a Function Returning Boolean it's looking for you to have specified a call to a function whether you put the code within a begin-end or you let HTML DB do it. What you entered was (when framed in begin-end) syntactically a procedure call within an anonymous block. Try entering "return auth2.check_user(:APP_USER);" (without quotes).
Scott

Similar Messages

  • Creating Report via PL/SQL

    We have an application using HTML DB from which the we need to create reports for which the standard CSV will not work. The report can be created via PL/SQL except that the report needs to be created on the users workstation or a public location and not the server. Since UTL_FILE writes to the server, I am looking for help from the HTML DB and PL/SQL experts on packages/tools that can be used to output reports to local directories.

    not sure of your exact requirements, but consider using utl_file or Oracle Reports to generate your report on the server and then providing your users a "download report" link that lets them pull the file down locally. we talked about using Reports for this at...
    PDF file creation
    ...regards,
    raj

  • Invalid column Index error - While consuming Calculation view via Native SQL

    Hi Experts,
    I am trying to consume a Calculation view (sql script one) , which has input parameters, via Native SQL in a ABAP program .
    Code snippet for the same would be as follows , Upon execution, it throws an error "Invalid Column Index (8) error " . Can anyone help what could be the issue here ?
    Thanks in Advance,
    Suma
    REPORT ZTEST_HANA2.
    *Report to consume Calculation view (script based) from ABAP
    PARAMETERS: ip_docnr type BELNR_D,
                ip_gjahr type GJAHR,
                ip_bukrs type BUKRS,
                ip_blgr type FAGL_RLDNR.
       DATA: LO_SQL_STMT TYPE REF TO CL_SQL_STATEMENT,
              LO_CONN     TYPE REF TO CL_SQL_CONNECTION,
              LO_RESULT   TYPE REF TO CL_SQL_RESULT_SET,
              LV_SQL      TYPE STRING,
              LR_DATA     TYPE REF TO DATA.
        DATA: LX_SQL_EXC           TYPE REF TO CX_SQL_EXCEPTION,
              LT_SEPMAPPS_CLSDINV  TYPE TABLE OF SEPMAPPS_CLSDINV,
              LV_TEXT              TYPE STRING.
        TRY.
    lv_sql = |SELECT * FROM "_SYS_BIC"."DEMO-ABAP/CA_GET_FI_DATA" | &&
                     |WITH PARAMETERS ('placeholder'= ('$$p_DOCNR$$','{ ip_docnr }'),| &&
                      |'placeholder'=('$$p_GJAHR$$','{ ip_gjahr }')| &&
                      |,'placeholder'= ('$$S_BUKRS$$','{ ip_bukrs }')| &&
                      |,'placeholder'= ('$$p_base_ledger$$','{ ip_blgr }') )| .
             LO_CONN = CL_SQL_CONNECTION=>GET_CONNECTION( ).
             "Create an SQL statement to be executed via the connection
              LO_SQL_STMT = LO_CONN->CREATE_STATEMENT( ).
             "Execute the native SQL query
             LO_RESULT = LO_SQL_STMT->EXECUTE_QUERY( LV_SQL ).
             "Read the result into the internal table lt_sepmapps_clsdinv
             GET REFERENCE OF LT_SEPMAPPS_CLSDINV INTO LR_DATA.
             LO_RESULT->SET_PARAM_TABLE( LR_DATA ).
             LO_RESULT->NEXT_PACKAGE( ).
             LO_RESULT->CLOSE( ).
             LO_CONN->CLOSE( ).
        CATCH CX_SQL_EXCEPTION INTO LX_SQL_EXC.
             LV_TEXT = LX_SQL_EXC->GET_TEXT( ).
             MESSAGE LV_TEXT TYPE 'E'.
        ENDTRY.

    Hi Suma,
    Post the SQL you success run directly on Studio together with error message (even if is the Invalid column index error).
    Check there if the parameters case is working properly... Is it really this confusing options:
    p_GJAHR
    S_BUKRS
    p_base_ledger
    Why not all lower or all upper? Anyhow you must test and find which option works according your modeling
    Regards, Fernando Da Rós

  • Can do via SQL but not via PL/SQL

    is it possible that a simple; 'create global temporary table..' SQL can run, yet same code being called from an 'execute immediate' within a PL/SQL block throw an; ORA-01031: insufficient privileges exception...(same user)
    is it a role/privilege issue or do I need to de a better job debugging?

    short version, each user will pass unique values to the proc that via dynamic sql will build these tables based on that iterative select criteria, to be used only during their current working session.
    so it's not the 'same' table in structure each time
    would not having 'TEMP grantable' be the issue?
    trying to find a way to communicate this to the DBA

  • HTML not working in PL/SQL block..Help me ASAP

    declare
    l_col VARCHAR2(30) :=to_number(to_char(to_date('01-feb-2011','dd-mon-yyyy'),'dd'));
    CURSOR name_cur IS
      select name
          from   od_shift_schedule
          where   year=2011
          and    (month)=('Feb')
           and    decode(l_col,1,"01",2,"02",3,"03",4,"04",5,"05",6,"06",7,
                         "07",8,"08",9,"09",10,"10",11,"11",12,"12",13,"13",14,"14",15,"15",16,"16",17,"17",18,"18",19,"19",20,"20",
                         21,"21",22,"22",23,"23",24,"24",25,"25",26,"26",
                       27,"27",28,"28",29,"29",30,"30",31,"31")='W';
    BEGIN
      DELETE FROM nam;
      commit;
      FOR i IN name_cur
      LOOP
      dbms_output.put_line(i.name);
      htp.p('<b>Employee '||i.name||'  has been ticked.
       </b><br/>');
      EXECUTE IMMEDIATE 'insert into nam(name) values('''||i.name||''')';
      commit;
    END LOOP;
    end;Kindly help me with this
    If i'm wrong here kindly help me that how can i place a display message

    Re: HTML not working in PL/SQL block..Help me ASAP
    Using the community discussion forums for urgent issues is rude and a violation of the terms and conditions.
    http://www.oracle.com/html/terms.html
    >
    4. Use of Community Services
    Community Services are provided as a convenience to users and Oracle is not obligated to provide any technical support for, or participate in, Community Services. While Community Services may include information regarding Oracle products and services, including information from Oracle employees, they are not an official customer support channel for Oracle.
    You may use Community Services subject to the following: (a) Community Services may be used solely for your personal, informational, noncommercial purposes; (b) Content provided on or through Community Services may not be redistributed; and (c) personal data about other users may not be stored or collected except where expressly authorized by Oracle
    >
    Also please read the FAQ on how to ask questions.
    SQL and PL/SQL FAQ
    >
    2) Thread Subject line
    Give your thread a meaningful subject, not just "help please", "Query help" or "SQL". This is the SQL and PL/SQL forum. We know your question is going to be about those things, make it meaningful to the type of question so that people with the right sort of knowledge can pick it up and those without can ignore it. Never, EVER, mark your subject as "URGENT" or "ASAP"; this forum is manned by volunteers giving their own time to help and your question is never urgent or more important than their own work or than other people's questions. It may be urgent to you, but that's not forum members issue.

  • SQL Bug in "Minus" in correlated subquery presence of index (11.2.0.1.0)

    SQL Bug in "Minus" in correlated subquery presence of index
    (Oracle Database 11g Release 11.2.0.1.0)
    Below, there is a small example that shows the bug. Further below,
    there are some more comments.
    drop table Country;
    create table Country
    (code VARCHAR2(4) constraint countrykey PRIMARY KEY,
    name VARCHAR2(35));
    -- if the key constraint is not given, the bug does not occur
    drop table City;
    create table City
    (name VARCHAR2(35),
    country VARCHAR2(4),
    population number);
    drop table Locatedon;
    create table Locatedon
    (city VARCHAR2(35),
    country VARCHAR2(4),
    island VARCHAR2(35));
    insert into country values('E','Spain');
    insert into country values('F','France');
    insert into country values('S','Sweden');
    insert into country values('GB','Sweden');
    insert into city values('Ajaccio','F',53500);
    insert into city values('Paris','F',2152423);
    insert into city values('Palma','E',322008);
    insert into city values('Madrid','E',3041101);
    insert into city values('Stockholm','S',711119);
    insert into city values('London','GB',6967500);
    insert into locatedon values('Ajaccio','F','Corse');
    insert into locatedon values('Palma','E','Mallorca');
    insert into locatedon values('London','GB','Great Britain');
    -- all countries that have a city that is not located on
    -- some island: should be E, F, S.
    Select c.name
    From country c
    Where exists
    ((Select name
    From city
    Where city.country=c.code)
    minus
    (Select city
    From locatedon
    Where locatedon.country=c.code)
    -- wrong answer: only Sweden; Spain and France not in the answer!
    select distinct country from
    ((Select name, country
    From city)
    minus
    (Select city, country
    From locatedon)
    -- correct answer: E, F, S
    Comments:
    The bug has been found by students in our SQL course.
    Using a larger database from that course, the bug can be reproduced
    (same queries as above) at
    http://www.semwebtech.org/sqlfrontend/
    (wrong: 142 answers, correct: 154 answers)
    During reducing it to a simple sample, there were some interesting
    observations: trying with smaller and simpler tables (without the keys)
    and synthetic data, the bug did not occur immediately. When
    restating the query after about one day, the bug occurred. Obviously,
    Oracle creates some index on its own in course of its internal
    optimization that (or more exactly, its usage) exhibits the bug. The
    query plan (showed in SQL Developer) was the same before and after.
    Wolfgang

    There's a typo in the test data - GB should presumably not be in Sweden. However....
    the bug did not occur immediatelyIt's possible. But what would have almost certainly happened is that the execution plan DID change at some point. There are various reasons why it might not be immediate.
    Obviously, Oracle creates some index on its own in course of its internal optimizationFar from obvious, what are you on about?
    The query plan was the same before and afterBet you it wasn't.
    A clear illustration of the issue and indication that it must be a bug is below.
    Simply by hinting a different access method, we can change the result. Therefore, bug.
    See [url http://support.oracle.com]Oracle Support and search for "wrong results".
    Please raise with Oracle Support to get confirmation of bug.
    There have been so many wrong results bugs recently, it's getting ridiculous.
    It's a real issue, IMHO.
    If you can't trust the DB to get your data right....
    Note that the query plan is very much NOT the same and it is the difference in query plan which s that is the root cause of the bug.
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> SELECT c.name
      2  FROM   country1 c
      3  WHERE  exists ((SELECT name
      4                  FROM   city1
      5                  WHERE  city1.country=c.code)
      6                  MINUS
      7                 (SELECT city
      8                  FROM   locatedon1
      9                  WHERE  locatedon1.country=c.code));
    NAME
    Sweden
    SQL> SELECT /*+ full(c) */
      2         c.name
      3  FROM   country1 c
      4  WHERE  exists ((SELECT name
      5                  FROM   city1
      6                  WHERE  city1.country=c.code)
      7                  MINUS
      8                 (SELECT city
      9                  FROM   locatedon1
    10                  WHERE  locatedon1.country=c.code));
    NAME
    Spain
    France
    Sweden
    SQL> explain plan for
      2  SELECT c.name
      3  FROM   country1 c
      4  WHERE  exists ((SELECT name
      5                  FROM   city1
      6                  WHERE  city1.country=c.code)
      7                  MINUS
      8                 (SELECT city
      9                  FROM   locatedon1
    10                  WHERE  locatedon1.country=c.code));
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 156929629
    | Id  | Operation                    | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |            |     1 |    27 |    12  (25)| 00:00:01 |
    |   1 |  NESTED LOOPS                |            |       |       |            |          |
    |   2 |   NESTED LOOPS               |            |     1 |    27 |    12  (25)| 00:00:01 |
    |   3 |    VIEW                      | VW_SQ_1    |     6 |    24 |    10  (20)| 00:00:01 |
    |   4 |     MINUS                    |            |       |       |            |          |
    |   5 |      SORT UNIQUE             |            |     6 |   138 |            |          |
    |   6 |       TABLE ACCESS FULL      | CITY1      |     6 |   138 |     4   (0)| 00:00:01 |
    |   7 |      SORT UNIQUE             |            |     3 |    69 |            |          |
    |   8 |       TABLE ACCESS FULL      | LOCATEDON1 |     3 |    69 |     4   (0)| 00:00:01 |
    |*  9 |    INDEX UNIQUE SCAN         | COUNTRYKEY |     1 |       |     0   (0)| 00:00:01 |
    |  10 |   TABLE ACCESS BY INDEX ROWID| COUNTRY1   |     1 |    23 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       9 - access("VW_COL_1"="C"."CODE")
    Note
       - dynamic sampling used for this statement (level=4)
    26 rows selected.
    SQL> explain plan for
      2  SELECT /*+ full(c) */
      3         c.name
      4  FROM   country1 c
      5  WHERE  exists ((SELECT name
      6                  FROM   city1
      7                  WHERE  city1.country=c.code)
      8                  MINUS
      9                 (SELECT city
    10                  FROM   locatedon1
    11                  WHERE  locatedon1.country=c.code));
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1378726376
    | Id  | Operation            | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |            |     1 |    23 |    14  (15)| 00:00:01 |
    |*  1 |  FILTER              |            |       |       |            |          |
    |   2 |   TABLE ACCESS FULL  | COUNTRY1   |     4 |    92 |     4   (0)| 00:00:01 |
    |   3 |   MINUS              |            |       |       |            |          |
    |   4 |    SORT UNIQUE       |            |     1 |    23 |     5  (20)| 00:00:01 |
    |*  5 |     TABLE ACCESS FULL| CITY1      |     1 |    23 |     4   (0)| 00:00:01 |
    |   6 |    SORT UNIQUE       |            |     1 |    23 |     5  (20)| 00:00:01 |
    |*  7 |     TABLE ACCESS FULL| LOCATEDON1 |     1 |    23 |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter( EXISTS ( (SELECT "NAME" FROM "CITY1" "CITY1" WHERE
                  "CITY1"."COUNTRY"=:B1)MINUS (SELECT "CITY" FROM "LOCATEDON1" "LOCATEDON1"
                  WHERE "LOCATEDON1"."COUNTRY"=:B2)))
       5 - filter("CITY1"."COUNTRY"=:B1)
       7 - filter("LOCATEDON1"."COUNTRY"=:B1)
    Note
       - dynamic sampling used for this statement (level=4)
    27 rows selected.Just to show that it's related to query transformation:
    SQL> SELECT /*+ 
      2             no_query_transformation
      3         */
      4         c.name
      5  FROM   country1 c
      6  WHERE  exists ((SELECT name
      7                  FROM   city1
      8                  WHERE  city1.country=c.code)
      9                  MINUS
    10                 (SELECT city
    11                  FROM   locatedon1
    12                  WHERE  locatedon1.country=c.code));
    NAME
    Spain
    France
    Sweden
    SQL> Edited by: Dom Brooks on Jun 30, 2011 2:50 PM

  • How to set a cookie in the browser from an html page called via an Iview

    How to set a cookie in the browser from an html page called via an Iview
    Hello all,
    I have an issue which is causing problems. I have a snap survey (html form with submit and cookie setting) which is embedded in a url iview.
    Although the submit and the form work fine, the portal will not allow the cookie to be set it seems.
    Is there a way to allow cookies to be set from an embedded page in a url iview??
    You will make my day if you know!
    System: EP7 SP13
    Kind regards
    Alex

    Hi,
    Check this:
    http://www.oracle.com/technology/products/ias/portal/html/same_cookie_domain_with_pdkv2.html
    Cookie Basics
    Web browsers have built in rules for receiving and sending cookies. When a browser makes a request to a web server and the web server returns cookies with the response, the browser will only accept a cookie if the domain associated with the cookie matches that of the original request. Similarly, when a browser makes a subsequent request, it will only send those cookies whose domain matches that of the target web server.
    These rules are designed to ensure that information encoded in cookies is only "seen" by the web server(s) that the originator of the cookie intended. These rules also ensure that the cookie cannot be corrupted or imitated by another server. By default, the domain associated with a cookie exactly matches that of the server that created it. However, it is possible to modify the domain at the time the cookie is created. Relaxing the cookie domain increases the scope of the cookie's visibility making it available to a wider "audience" of web servers.
    For example, if a cookie is created by a.us.oracle.com, it's domain will usually be set to a.us.oracle.com. This means that the browser will only send the cookie to a.us.oracle.com. It will never send it to any other servers. However, if at the time of creation, the domain of the cookie is set to .us.oracle.com, the browser will send the cookie to any server whose domain falls within .us.oracle.com. such as portal.us.oracle.com, provider.us.oracle.com, app.us.oracle.com etc
    Regards,
    Praveen Gudapati

  • Send an email with attacment via PL/SQL

    Hi Guru's,
    First of all thank you some much to help me all the time.
    I need to send an email via pl/sql with attachment. Email is simple but i need to attache the file from the directory on the server. File already created from different process only i need to use that file for attachment and send an email.
    I am using utl_smtp for email.
    Could you please help me out
    Thanks in advance!
    Kind regards

    user590978 wrote:
    I need to send an email via pl/sql with attachment. Email is simple but i need to attache the file from the directory on the server. File already created from different process only i need to use that file for attachment and send an email.
    I am using utl_smtp for email.You need to read the file from the directory - and format an e-mail using MIME (<i>Multipurpose Internet Mail Extensions</i>). As part of this Mime e-mail body, your code needs to add the contents of the file.
    If the file is binary, the file's contents have to base64 encoded before adding it a Mime attachment to the e-mail body.
    The complete e-mail body is then send using the SMTP DATA command.
    You can also use UTL_MAIL - it creates a Mime body for the e-mail and supports a single (small) attachment. However, you still need to read the file from disk using UTL_FILE or DBMS_LOB.LoadFromFile() and pass the file contents to UTL_MAIL for base64 encoding and attachment.
    There is no standard Oracle PL/SQL interface that supports reading the file from disk to attach to the e-mail body - so the file reading part you need to do yourself.
    If the file is large, then UTL_MAIL (a poorly designed and written interface) will be unable to handle it. In which case you also need to write the base64 encode and generation of a Mime e-mail body with attachments.

  • How do I delete an LDAP entry and all of its child entries via PL/SQL

    I need to be able to delete (via PL/SQL) an entry and all of its child entries on my OID LDAP Server. None of the the procedures in the provided DBMS_LDAP package seem to bable to do this. For example, the delete_s procedure can only delete entries that are leaf nodes (no children). This will not work for me.
    I realize that I can execute the bulk delete shell script to do this, but this is via the command line, not PL/SQL.
    While I think I could write some PL/SQL code to parse through each entry using the "search_s" procedure and delete them one by one using the "delete_s" procedure, this doesn't seem very efficient. It seems like this should be a fairly common request and Oracle should have already addressed it.

    Sorry, to be clear, it's form fields on a web page that bring up all previously entered information.... I want to deleted some of these individually, but not all

  • Attempting to create a AQ$_JMS_MAP_MESSAGE via PL/SQL

    I'm attempting to create a AQ$_JMS_MAP_MESSAGE via PL/SQL but can't get it to work.
    I'm able to create a AQ$_JMS_MESSAGE and add it to an AQ (of the correct type) however the AQ$_JMS_MAP_MESSAGE can not be constructed in the same way as it does not have a CONSTRUCT method.
    Is it possible to create this type of JMS message with PL/SQL? The documentation seems to imply that it can be done.
    I have tried the following but get an error; the AQ table is of type SYS.AQ$_JMS_MAP_MESSAGE.
    =====================================================
    procedure addMessageToAQ AS
    --message   SYS.AQ$_JMS_MAP_MESSAGE;
    message SYS.AQ$_JMS_MESSAGE;
    eopt dbms_aq.enqueue_options_t;
    mprop dbms_aq.message_properties_t;
    enq_msgid raw(16);
    BEGIN
    message := SYS.AQ$_JMS_MESSAGE.CONSTRUCT(DBMS_AQ.JMS_MAP_MESSAGE);
    IF ( message.message_type = DBMS_AQ.JMS_MAP_MESSAGE) THEN
    DBMS_OUTPUT.PUT_LINE('The message is a map message');
    END IF;
    message.message_type := DBMS_AQ.JMS_MAP_MESSAGE;
    message.header.set_string_property('header1','hvalue1');
    message.header.set_string_property('header2','hvalue2');
    message.header.set_string_property('header3','hvalue3');
    message.set_string_property('content1', 'cvalue1');
    message.set_string_property('content2', 'cvalue2');
    message.set_string_property('content3', 'cvalue3');
    DBMS_AQ.enqueue(queue_name => 'PROCESS_PASSP_APL_Q',
    enqueue_options => eopt,
    message_properties => mprop,
    payload => message,
    msgid => enq_msgid);
    END;
    =====================================================
    ORA-25215: user_data type and queue type do not match
    ORA-06512: at "SYS.DBMS_AQ", line 204
    ORA-06512: at "BDEV1.PS2032_MVMNTHNDSHKEXTRCT", line 48
    ORA-06512: at "BDEV1.JDEV_TMP_PROC_1", line 3
    The message is a map message
    Process exited.

    As far as I know every object type in database has an implicit construct . It's just that nobody created some nice constructor. Take this example as a "hard way" to create message:
    -- jms_text_message related variables
    tmp_text_message SYS.AQ$_JMS_TEXT_MESSAGE;
    tmp_header SYS.AQ$_JMS_HEADER;
    tmp_array SYS.AQ$_JMS_USERPROPARRAY;
    -- AQ related variables
    enq_msgid RAW(16);
    eopt dbms_aq.enqueue_options_t;
    mprop dbms_aq.message_properties_t;
    -- get current date time, so it doesn't change during run of procedure
    current_datetime := TO_CHAR(SYSDATE,'DDMMYYYYHHMISS');
    -- initialize array
    tmp_array := SYS.AQ$_JMS_USERPROPARRAY(SYS.AQ$_JMS_USERPROPERTY('EVENT_TYPE', 100, 'PL_SQL', NULL, 27));
    -- create header
    tmp_header := SYS.AQ$_JMS_HEADER(SYS.AQ$_AGENT(NULL, NULL, 0), NULL, NULL, NULL, NULL, 0, tmp_array);
    -- create JMS_TEXT_MESSAGE
    tmp_text_message := SYS.AQ$_JMS_TEXT_MESSAGE(tmp_header,4,'AAAA',NULL);
    dbms_aq.enqueue(
    queue_name => 'job_queue',
    enqueue_options => eopt,
    message_properties => mprop,
    payload => tmp_text_message,
    msgid => enq_msgid);
    ...

  • Process Flow Execution via PL-SQL

    Hi Experts,
    I am trying to execute the Process Flow, however i am unable to execute it via pl-sql method. I followed the method as described in the below link:
    http://docs.oracle.com/cd/B31080_01/doc/owb.102/b28225/api_4sqlforjobs.htm#BABBHEHI
    Example:
    sqlplus scott/tiger@orcl @sqlplus_exec_template OWB_REPO_OWNER.OWB_REPO OWF_MGR PROCESSFLOW PF1 "," ","
    I get below error message.
    SP2-0310: unable to open file "sqlplus_exec_template.sql"
    Details:
    OWB_OWNER: OWB_REPO_OWNER
    OWB_USER: OWB_PROD
    OWB_WORKSPACE: OWB_REPO
    OWF_MGR is the workflow manager.
    PF1 is the Process Flow
    Please tell me where am i going wrong.
    Regards,+
    Ravi R+

    Thanx Sutirtha
    I found the other way round
    BEGIN+
    owbsys.wb_workspace_management.set_workspace('OWB_REPO','OWB_REPO_OWNER');+
    DBMS_OUTPUT.PUT_LINE('Result: ' || TO_CHAR(owbsys.wb_rt_api_exec.run_task('PF_MOD_LOCATION1','PROCESS','PF1', null, null, 1)));+
    END;+
    where
    OWB_REPO is the workspace
    OWB_REPO_OWNER is the OWB Owner.
    PF1 is the name of my process flow

  • How come the item value does not come thru via PL/SQL anonymous block?

    Hi,
    It's a Form with 3 tables -
    1) ClinicianProfileTb (with about 40 columns, insert/update via DML),
    2) PeopleTb (with about 7 columns, insert/update via PL/SQL anonymous block) and
    3) ClinicianPracticeTb (with about 10 columns, insert/update via PL/SQL anonymous block) for after-submit-processes.
    So I have several After-Submit-Processes. For some reason, it appears that PeopleId which is supposed to come thru via the 2nd After-Submit-Process (ie: Insert/Update PeopleTb) does not do the way it's supposed to. And when I press "Create" button at the bottom, I got the following error msg:
    ORA-01400: cannot insert NULL into ("TEST_0712"."CLINICIANPRACTICETB"."PEOPLEID")
    I tried the "debug" mode (via edit page link), but to no avail. (I'm newbie, trying to learn and deliver at the same time :)).
    I uploaded the app to apex.oracle.com, if someone could kindly take a look and let me know what goes wrong, it'd be greatly appreciated.
    workspace: test_0712
    app: 43408 - TEST
    user: demo
    pswd: demoPswd
    Page#21 -> look at the After-Submit-Processes -> in "Insert/Update PeopleTb" it appears that PeopeId does not come thru; thus it cannot be updated to ClinicianProfileTb.PeopleId (allows null) -> and thus cannot be inserted into ClincianPracticeTb.PeopleId (which does NOT allow null). Basically my logic is that in order to create ANY row in ClinicianPracticeTb, BOTH PracticeId AND PeopleId must be present.
    Acutally I should have used the PeopeTb as DML (as the driving table) to enforce that PeopleId must be present in order to insert ClinicianProfileTb and ClinicianPracticeTb, but it'd be lots of codes to write to insert/update in ClinicianProfileTb (40 columns).
    In addition, does ApEx consider EVERY SINGLE after-submit-process are in ONE transaction for commit/rollback? It appears that it treats all PL/SQL anonymous blocks are in ONE transaction, while Automatic Row Processing (DML) is commited/rolled back on its own?
    Thanks much,
    Helen

    All blocks that do not commit in one of the ways I detailed (and which do not explicitly commit using a commit statement) are part of the transaction started with > the first DML statement issued in any of the page processes and continuing until a commit is issued.Say, there are the following processes in the After-Submit-Processes:
    1. Process1 -> Automatic Row Processing (DML)
    2. Process2 -> PL/SQL anonymous block
    3. Process3 -> PL/SQL anonymous block
    Based on what you describe, in the event that if there is no explicit "commit" issued in any of these processes, then an implicit "commit" will be issued at the end of Process3?
    Thanks, Scott.
    Doreen

  • Accessing html field value from pl/sql code, in the same package

    hi friends,
    my pl/sql web application is working fine. but now i need a small requirment.
    ie, basicaly i need to access the user entered value of an element in html based form from pl/sql code, which is developed using pl/sql toolkit.
    Here is the scenario:-
    User entered a value in field1, then navigate to field2, and click a button for list of values,
    when he clicks the button, internaly it is opening a cursor, where i want to pass field1's value to my cursor as a parameter. So in my pls/sql code , i want to access the value of field1. If you know, please help.
    see the snippet of code.
    htp.p('
    function f1()
    if (parseInt(learnIdx) ==1 )
    for i in dev_Need('1')/*here i want to pass html form element value as a parameter */
    loop
    htp.p('content += "<option value='''||a.version_name||'''>'||a.version_name
    ||'</option>''"; ');
    end loop;
    thanks in advance.
    Zameer.N.A

    Hi,
    Here's my suggestion
    If you wanna access the dll check out "external procedures", you can search it everywhere in OTN.
    However it's easier to use Heterogenous Services to connect database with other sources.
    Check out http://asktom.oracle.com/pls/ask/f?p=4950:8:13454621522426176943::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:4406709207206,
    Tak Tang answer on May, 25, 2004 rules!

  • Retrieve SQL Agent Process ID via T-SQL below SQL Server 2008 R2 SP1.

    Dear Folks,
    I have to retrieve the process ID of SQL Agent (as shown in Configuration Manager) via T-SQL Script. It can be easily retrieved in SQL Server 2008 R2 SP1 or above using 'sys.dm_server_services'
    DMV. But I have to retrieve it in SQL Server 2008 R2 RTM and above DMV was not introduced in it. Using XP_cmdshell 'tasklist' is useless as well, as it doesn't reflect the instance specific details of SQLAgent process. Please Suggest the solution. Thanks in
    advance. :)   
    Pranshul Gupta

    Dear Folks,
    I have to retrieve the process ID of SQL Agent (as shown in Configuration Manager) via T-SQL Script. It can be easily retrieved in SQL Server 2008 R2 SP1 or above using 'sys.dm_exec_request' DMV.
    But I have to retrieve it in SQL Server 2008 R2 RTM and above DMV was not introduced in it.
    Using XP_cmdshell 'tasklist' is useless as well, as it doesn't reflect the instance specific details of SQLAgent process. Please Suggest the solution. Thanks in advance. :)   
    Pranshul Gupta
    Hello,
    Sys.dm_exec_requests DMV was introduced from sql server 2005.See this link
    http://technet.microsoft.com/en-us/library/ms177648(v=sql.90).aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Getting Session ID via PL/SQL Statement

    Hi,
    I'd like to fill an item in my form with the current session id. Can I query this id via PL/SQL statement?
    Thank you

    i think you misunderstood.....
    i'd like to fill an item on my page with the current session id using a computation. this computation has to query this id.

Maybe you are looking for