Apex 4. Run the procedure to recover my files

Dear all,

I experience a problem moving my apex application (sss) to a new server.
I export demand for 3.2 APEX to APEX 4.0 new
+ transfer of data using a simple DB dump (export).

Everything will work perfectly except our main application functionality, sitting on the workspace of "HR_PRD" that we have a few problems.

In our DB schema called "HR_REP" I have a table that stores BLOBs for download a document attached to a record of the employee.
So I created a package that contains the custom procedure to download the files stored in the table "wr_docs".

URL = http://sphfrapex01.hopfr.net.fr.ch:8080/apex/HR_PROD.wr_apputil.download_my_file?p_file=3655106341169143


I can download the file whithout any problems and it appears correctly in the report showing all my files.
BUT when it tries to download... Unfortunately, access to the file does not work on the new APEX 4.0 platform!

As this sounds like a simple question 'rights', I did several tests...

I tried to create a simple procedure on my 'old' server called 'TEST' which simply print a simple text:
HTP. ("test to print something");

Here, I granted AUDIENCE to perform this procedure.
It works well on the APEX 3.2 platform when on the new APEX 4.0, refusal to execute the procedure.

Can you help me please?
I'm certainly missing something obvious thanks to the GRANT run the TEST at?

I granted AUDIENCE, so the appeal should work...


I have to admit, I'm a bit lost here.

Thanks in advance for your help.
Philippe Kilchoer

Hi Philippe,.

using EPG to APEX? You may have forgotten to update WWV_FLOW_EPG_INCLUDE_MOD_LOCAL to include your procedure. Take a look on

http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e13363/up_dn_files.htm#CJACBEHG

Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

Tags: Database

Similar Questions

  • Cannot run the procedure several times

    Hello

    I use oracle 12 c

    I just created a stored procedure that works very well

    Problem is that the second time I run it, it does not what it should (data fusion)

    When I run the second time I always get PL/SQL procedure successfully completed but the target table is still empty, here is the procedure:

    1 create or replace procedure MERGE_TABLEA

    2 as

    3. start

    4 MERGE TABLE_A has B (SELECT 'ID', 'NAME' OF TABLE_B) with the HELP of

    ON (A.ID = B.ID)

    WHEN MATCHED THEN

                     UPDATE SET B.SID = B.NAME

    WHEN NOT MATCHED THEN

    INSERT (A.' ID',' NAME')

    VALUES (B.ID, B.NAME);

    END;

    /

    PL/SQL procedure successfully completed.

    I also tried to build a simple procedure that id just insert and name of the table to test ina and it works very well, no matter how many times I've run it

    Is it maybe something with the merger or what?

    Thank you!

    OK guys, I think there are some misunderstandings here,

    @ddf_dba_ifox , version of the db that I use is stated in the first line of my post, I can't publish data for security reasons


    @rp0428 I forgot to mention that I'M to truncate the table, and then run the procedure again but the merger no longer works as the table is empty

    In any case, I found out why

    I'm merging the tables in the DB using the schema that is related to my installation of Oracle APEX

    In the procedure if you notice there is no COMMIT

    As apex has users within a schema, that I couldn't see the lines without committing before

    Thank you all anyway!

  • I can't run the exe to my computer files.

    I can't run the exe to my computer files. The exe extension does not appear in the options of folder of my c: drive so I tried to add, but it will not save I tried to do a system restore, and even that won't work. I think it's a virus, but I can't seem to run to anthing that might help to get rid of it. Very frustrating... Help!

    I am running Windows XP with service pack 2 on a Dell computer

    Have you tried restoring system from a command prompt?

    Otherwise, restart the computer and start typing the key F8, select Safe mode with command option. If you are prompted to select an operating system, use the arrow keys to select the right pair and press ENTER. Log in as administrator or with an account that has administrator credentials.

    At the command prompt, type % systemroot%\system32\restore\rstrui.exe, and then press ENTER. Follow the prompts to restore your computer to an earlier date.

  • Run the procedure after the application deployment

    Hi all

    I faced a small question.
    When I deploy my application to another server - it must run a procedure (this means that the procedure must be run once immediately after successful deployment).
    It takes to update some records in the system tables.

    Apex supports characteristic or something like that?

    APEX 4.1

    Thank you

    Published by: Rod 13.05.2013 confidence 0:56

    Cane Trust wrote:

    I faced a small question.
    When I deploy my application to another server - it must run a procedure (this means that the procedure must be run once immediately after successful deployment).
    It takes to update some records in the system tables.

    Apex supports characteristic or something like that?

    APEX 4.1

    How do you deploy your application? The documentation contains all the details of creating a packaged application with all dependencies for database included as items of support. Your procedure must be performed in one of these objects support scripts.

  • Run the procedure by table number

    Hello

    Oracle 11.2.0.1
    Windows

    Create the np_type type is varray (3) of the number
    /

    Create the cn_type type is varray (3) the number;
    /

    Create the cxn_type type is varray (3) of varchar2 (2000)
    /

    I created the TEST table by pl/sql block below:

    declare
    execstr varchar2 (2000): =' create table test(';)
    Start
    because me in 1.80 loop
    execstr: = execstr | 'col ' | TO_CHAR (i) | 'number,';
    end loop;
    execstr: = substr (execstr, 1, length (execstr)-1);
    execstr: = execstr | ')';
    dbms_output.put_line (execstr);
    run immediately execstr;
    end;
    /

    create the table sp_table (Splitid number, Delimiterlength number);
    insert into sp_table values (1.4);
    insert into sp_table values (2.7);
    insert into sp_table values (3.9);
    insert into sp_table values (4.1);
    insert into sp_table values (5.2);
    insert into sp_table values (6,6);


    create or replace procedure myproc1
    (
    STRX in varchar2, delarray in np_type)
    as
    execstr varchar2 (2000);
    CN cn_type.
    CXN cxn_type;
    XPos number: = 1;
    Start
    execstr: = ' insert into test values(';)
    because loop me in 1.3
    Select Delimiterlength in the sp_table (i) cn where Splitid = delarray (i);
    CXN (i):=substr(STRX,XPos,CN(i));
    execstr: = execstr | CXN (i) | ',';
    XPos: = (i) cn + xpos;
    end loop;
    execstr: = RTRIM (execstr, ','). ')';
    dbms_output.put_line (execstr);
    -execution immediate execstr;
    end;
    /

    SQL> declare
      2    v np_type:=np_type(4,4,4);
      3    begin
      4    --dbms_output.put_line(v(3));
      5    exec myproc1('111',v);
      6    end;
      7  /
      exec myproc1('111',v);
           *
    ERROR at line 5:
    ORA-06550: line 5, column 8:
    PLS-00103: Encountered the symbol "MYPROC1" when expecting one of the
    following:
    := . ( @ % ;
    The symbol ":=" was substituted for "MYPROC1" to continue.
    
    SQL>
    The procedure above will insert the numbered string supplied in the test table that splits the chain numbered inspires provided splitids of sp_table.

    In fact, I tried to help a member of the forum for his question, but I'm not get where I get the above error. Of course, there is little that miss me, but not that. This thread is running too in this forum.

    Please help me.

    Concerning
    Girish Sharma
    create or replace procedure myproc1
    (
    strx in varchar2, delarray in np_type)
    as
    execstr varchar2(2000);
    cn cn_type := cn_type(null, null, null);
    cxn cxn_type := cxn_type(null, null, null);
    xpos number:=1;
    begin
    execstr := 'insert into test values(';
    for i in 1..3 loop
    select Delimiterlength into cn(i) from sp_table where Splitid = delarray(i);
    cxn(i):=substr(strx,xpos,cn(i));
    execstr :=execstr || cxn(i) || ',';
    xpos :=cn(i) + xpos;
    end loop;
    execstr := RTRIM(execstr,',')|| ')';
    
    dbms_output.put_line(execstr);
    --execute immediate execstr;
    end;
    /
    

    and

    declare
        a1 number :=4; a2 number :=4; a3 number :=4;
        v np_type:=np_type(a1,a2,a3);
        begin
        for i in 1..3 loop
        dbms_output.put_line('v(' || i || ') = ' || v(i));
        end loop;
        myproc1('111',v);
        end;
    /
    

    Your varrays are null or empty in myproc1

  • Run the procedure works without slash

    It's weird.
    I'm in a plsql connected to a database session.

    I can run a procedure as follows:
    run status_pkg.check_owner_vcard (1,1,2);

    However, I would like eventually to use variables, but when I try to do something like this:

    SQL > declare
    2 start
    3 run status_pkg.check_owner_vcard (1,1,2);
    4 end;
    7 m
    run status_pkg.check_owner_vcard (1,1,2);
    *
    ERROR at line 3:
    ORA-06550: line 3, column 9:
    PLS-00103: encountered the symbol "STATUS_PKG" when awaits an of the
    Next:
    := . (@ %; immediate)
    The symbol ': = ' was replaced by 'STATUS_PKG' continue.

    It is not a function - procedure which could wait for oracle?
    Any help appreciated
    Rgds
    Peter

    sqlplus command does not work inside a plsql block. Remove it and your block should run.

  • Cannot run the procedure

    Hello


    I'm able to run this procedure.

    I created the procedure successfully.

    CREATE OR REPLACE PROCEDURE update_LOGIN_TABLE (NAMER OUT VARCHAR2)
    IS
    temp_num NUMBER;
    BEGIN
    temp_num: = 10;
    DBMS_OUTPUT. Put_line (temp_num);
    Setting a DAY to the USER SET NAME = 'Ranga' where NAME = NAMER;
    COMMIT;
    EXCEPTION
    WHILE OTHERS THEN
    ROLLBACK;
    END update_LOGIN_TABLE;
    */*


    It comes to my Table Structure:

    SQL > select * from users;
    PASS NAME
    -------------------- --------------------
    Sai Baba
    SAI Natha
    roux keyboard
    roux keyboard


    When I tried to run, I get this: execute update_LOGIN_TABLE ('good');


    SQL > execute update_LOGIN_TABLE ('good');
    BEGIN update_LOGIN_TABLE ('good'); END;

    ***
    ERROR on line 1:
    ORA-06550: line 1, column 26:
    PLS-00363: 'delighted' expression cannot serve a purpose of assignment
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    update_LOGIN_TABLE (NAMER OUT VARCHAR2)

    I think you probably wanted an IN argument in your procedure.

  • Not able to run the procedure

    Hello world

    I am trying to execute the procedure below,

    CREATE or REPLACE procedure test1 (n1 n2 in number, number, tot OUT number)
    is
    i the number: = null;
    Start
    loop
    If n2 > n1 then
    i: = i + 1;
    tot: = n1 + i;
    dbms_output.put_line (tot);
    elsif n2 < 1 then
    dbms_output.put_line ('enter a higher value for n2');
    end if;
    end loop;
    end;
    /

    All I'm trying to do is to print the numbers according to the values we give during execution, but doesn't seem to work for me.
    IE.,.

    N1 = 1;
    N2 = 5;
    tot = 1,2,3,4,5;

    I'm sorry if there is a mistake in the procedure and would be really grateful if you can help me with this. Thanks in advance for your help.

    Published by: Pravin on August 31, 2010 14:25

    If you want you can use this code it has the same logic

    CREATE OR REPLACE procedure test1(n1  IN number,
                                      n2  IN number,
                                      tot OUT number) is
      cnt number := 0;
    begin
      if n2 < n1 then
        dbms_output.put_line('Enter a higher value for n2');
      end if;
    
      for i in n1 .. n2 loop
        dbms_output.put_line(i);
        cnt := cnt + 1;
      end loop;
    
      tot := cnt;
    end test1;
    
  • Run the procedure once a year

    I have a procedure files and creating sequences that are used as serial numbers for some forms.
    For the moment, the admin user must click on a button, once a year to perform the procedure.

    I need to do this automatically every year eg 06:00 on 1 January.

    Can someone point me in the right direction

    Gus

    Hello

    At least you have some time to think about it! ;)

    Have a look/google for DBMS_SCHEDULER - which should sort out you.

    See you soon

    Ben

  • Run the PLSQL Script from Batch file

    I am trying to run a PL/SQL script in a batch file in sp1 Windows 7 Prof

    N ° 1) I wrote a simple PL/SQL script:

    --

    -The scope of variables

    --

    DECLARE

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = v_sal *. 20;

    v_message varchar2 (100): = 'eligible for the commission;

    BEGIN

    declare

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = 0;

    v_total_comp number (7.2): = v_sal + v_comm;

    Start

    v_message: = "not committed not" | v_message;

    dbms_output.put_line (' message of sub-block is ' | v_message);

    dbms_output.put_line (' subblock v_comm is ' | v_comm);

    end;

    v_message: = 'seller '. v_message;

    -dbms_output.put_line ('Main block v_total_comp' | v_total_comp); -Error: not visible in the main block

    dbms_output.put_line ('Main block v_comm' | v_comm);

    dbms_output.put_line (' main block message is ' | v_message);

    END;

    /

    Step 2) then I wrote a simple batch TstBatch.bat file

    sqlplus scott/tiger@orcl < PLSqlVarInputTst1.sql > > TstBatch.log

    Step 3) in the BACK of cmd, I tried to run TstBatch.bat

    C: > TstBatch.bat

    The log file tells me that I have connected to Oracle Database 11 g Enterprise Edition Release...

    Then a lot of SQL > SQL > SQL >... 26 times

    Procedue of PL/SQL completed successfully.

    Disconnected from Oracle database

    I also tried running the PLSQL script in SQLPlus:

    SQL: > @PLSqlVarInputTst1.sql

    Tell me the procedure completed successfully.

    QUESTION: So, where is the output of the PL/SQL script?

    Hello

    You must activate the output: Add the following line at the beginning of your PL/SQL script:

    SET SERVEROUT ON

    ...

  • Can not run the .exe (not all exe) file

    Hello

    Have a problem when running the .exe file in windows 7.

    When I tried to open a 32-bit in my 64 bit OS setup.exe file, nothing happens at all. But when I tried the first time, a pop-up message displays this "want to re install using recommended settings. But after that, nothing happens. (the problem with only this file). But it works well in the other 32-bit OS. What should I do?

    Hello

    You can check this link troubleshooting steps:

    https://support.Microsoft.com/kb/2688326?WA=wsignin1.0

    Registry warning

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/ )

    How to back up and restore the registry in Windows

    I hope this helps.

  • How to run the script to EEM/TCL file

    Hello world

    I need to run the EEM script found in this link

    https://supportforums.Cisco.com/document/75806/interface-input-queue-Mon...

    Can you please point me to a HOWTO to download the file and run it under an interface?

    Thank you

    Federico

    Here is the manual how to run scripts tcl file - http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/configuration/1...

    In short - you download the script to switch via tftp and the tcl implementation with command tclsh interpreter. Then run the command source source

  • Error PPBM5 when you run the vbscript - old hurt return file

    Hello

    After following all the instructions of PPBM5 to the letter, I received this error message when you finally run the Script of "statistics":

    Line: 121

    Char: 1

    Error: Overflow: ' [number: 1 + 99]'.

    Code: 800A 0006

    Source: Microsoft VBScript runtime error

    I spent a lot of time digging in the old, even markets found some about this same problem with PPBM4 (http://forums.adobe.com/message/2819090#2819090) but nothing works.

    Anyboby have any idea?

    Very appreciated

    I received your data and I suggest that you rerun the test rendering of the timeline with MPE material on. Your current score is not properly may be damaged due to deleting all the files preview. The rest of the scores are perfectly acceptable, so no need to revive that once again.

  • Try to run the procedure and get an error PLS-00103

    I have a procedure defined with these parameters

    create or replace PROCEDURE procAuth
    (
    EMAIL IN VARCHAR2,
    PASSWORD IN VARCHAR2,
    IP IN VARCHAR2,
    UL NUMBER
    )

    Using this code

    var x number
    procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1': x);
    print x

    gives me


    Error at startup on line 2 of the command:
    procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1': x);
    Error report:
    ORA-06550: line 1, column 65:
    PLS-00103: encountered the symbol "" when expecting one of the following values:

    . ( ) , * @ % & | = + - <>/ at is mod not rank rem = >
    .. < an exponent (*) > <>or! = or ~ = > = < = <>and or as
    between |
    The symbol ',' was replaced by ' ' to continue.
    06550 00000 - "line %s, column % s:\n%s".
    * Cause: Usually a PL/SQL compilation error.
    * Action:
    x
    ------



    Thanks for any help

    jerry8989 wrote:
    I have a procedure defined with these parameters

    create or replace PROCEDURE procAuth
    (
    EMAIL IN VARCHAR2,
    PASSWORD IN VARCHAR2,
    IP IN VARCHAR2,
    UL NUMBER
    )

    Using this code

    var x number
    exec procAuth (' [email protected]', '555555',' 1.1.1.1': x);
    print x

    gives me

    Error at startup on line 2 of the command:
    exec procAuth (' [email protected]', '555555',' 1.1.1.1': x);

    a comma is perhaps missing to the right of the right like apostrophe below?

    procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1',: x);

  • How can I run the procedure without parameters.

    CREATE OR REPLACE PROCEDURE P1 ((nvl(A,'dkjf') VARCHAR2)
    IS
    BEGIN
    DBMS_OUTPUT. PUT_LINE(A||',');
    END;


    It gives me error

    I want to run in this mode exec p1;

    It should automatically take dkjf as a parameter;

    help required on this.
    CREATE OR REPLACE PROCEDURE P1 ( A VARCHAR2 default 'dkjf' )
    IS
    BEGIN
    DBMS_OUTPUT.PUT_LINE(A||',');
    END;
    
    begin
      p1;
    end;
    

    What do you expect?

Maybe you are looking for