Using AUTHID = CURRENT_USER and Apex

I'm new to Apex and am just assessing if we can make use of it, mainly for reporting functionality in our existing web based application.
We have a schema that holds all of our procedures, packages, functions etc and they all have AUTHID = CURRENT_USER so each user can have their own set of tables in their own schema.
I want to be able to create reports in Apex that will then report on the users table in their own schema but I can't quite work out how Apex actually works. Can I tell something in Apex to use AUTHID = CURRENT_USER?
We used Webdb many years ago and that created the runtime package for all the forms and reports but I can't see anything that Apex creates so I assume it stores all the code in a table somewhere?
Thanks
Robert

Hi Scott,
does that mean, there is no way to make these packages work? Not even with additional direct grants to apex_public_user? I am aware of the implications but we have a significant amount of code using packages with authid current user.
Our situation:
We have four oracle schemas involved in a multi tenant application.
GLB : Global objects
BEE: tenant 1
SIX: tenant 2
IAM: tenant 3
Then we have the user APEX_SCM. There we store the tables and objects for the APEX application. This is the parsing schema for the application.
During page rendering we try change the CURRENT_SCHEMA to one of the tenants:
declare
  l_sql varchar2(2000);
begin
  if :P42_BRAND is null then
    :P42_BRAND := 'SIX';
  end if;
  l_sql := 'alter session set current_schema=' ||:P42_BRAND;
  apex_application.debug(l_sql);
  execute immediate l_sql;
end;Then we call a stored function returning the report result:
select *
from table(six.inv_val_report_pack.fn_rpt_ar_nlf(to_number(:P42_BL_INV_CHECK_ID))) t,
  apex_scm.st_sor_v s, six.ls, ar
where s.st_sor_id(+) = t.st_sor_id
and ls.ls_id(+) = t.ls_id
and ar.ar_id(+) = t.ar_idThe function is in a package with invoker rights:
create or replace package inv_val_report_pack
authid current_user
is
...Now my questions:
1) Is there a way to make this work (using invoker rights packages)?
2) We cannot get the name resolution to work. Does execute immediate 'alter session set current schema=SIX' work at all? It seems to be ignored.
I ran a test in the sql workshop as the parsing schema APEX_SCM.
declare
l number;
begin
  execute immediate 'alter session set current_schema=SIX';
  select null into l from ls
  where rownum=1 ;
end;
/It only worked after I created a local synoynm for ls in the schema APEX_SCM. Weird, it seems like 'alter session set current schema=SIX' is just plain ignored.
Any help would be greatly appreciated, by anyone ;).
Thanks,
~Dietmar.

Similar Messages

  • Question about using 10g/11g and APEX ...

    Hi,
    I just recently learned of Oracle's APEX and have a few questions about using it.
    Can I use APEX with express, standard, and enterprise editions of 10g and 11g?
    Are all of these free to use?

    You might want to read about APEX rather than jumping into questions that are reasonably well documented. Info at http://www.oracle.com/technology/products/database/application_express/index.html
    Your specific questions:
    1) Apex is a package that can be installed into any properly licensed database.
    2) The price for the production license of the database varies by edition.
    The price for Express Edition is $0 for use in production. Part of the cost for that edition is 'no Oracle Support based support, no patches, data volume limitation, etc.'

  • Authid current_user using

    Hello,
    I have question regarding authid current_user.
    What is the disadvantages of using AUTHID CURRENT_USER for developer?
    What is the advantages of using AUTHID CURRENT_USER for dba?
    Thanks a lot,

    Hi Scott,
    does that mean, there is no way to make these packages work? Not even with additional direct grants to apex_public_user? I am aware of the implications but we have a significant amount of code using packages with authid current user.
    Our situation:
    We have four oracle schemas involved in a multi tenant application.
    GLB : Global objects
    BEE: tenant 1
    SIX: tenant 2
    IAM: tenant 3
    Then we have the user APEX_SCM. There we store the tables and objects for the APEX application. This is the parsing schema for the application.
    During page rendering we try change the CURRENT_SCHEMA to one of the tenants:
    declare
      l_sql varchar2(2000);
    begin
      if :P42_BRAND is null then
        :P42_BRAND := 'SIX';
      end if;
      l_sql := 'alter session set current_schema=' ||:P42_BRAND;
      apex_application.debug(l_sql);
      execute immediate l_sql;
    end;Then we call a stored function returning the report result:
    select *
    from table(six.inv_val_report_pack.fn_rpt_ar_nlf(to_number(:P42_BL_INV_CHECK_ID))) t,
      apex_scm.st_sor_v s, six.ls, ar
    where s.st_sor_id(+) = t.st_sor_id
    and ls.ls_id(+) = t.ls_id
    and ar.ar_id(+) = t.ar_idThe function is in a package with invoker rights:
    create or replace package inv_val_report_pack
    authid current_user
    is
    ...Now my questions:
    1) Is there a way to make this work (using invoker rights packages)?
    2) We cannot get the name resolution to work. Does execute immediate 'alter session set current schema=SIX' work at all? It seems to be ignored.
    I ran a test in the sql workshop as the parsing schema APEX_SCM.
    declare
    l number;
    begin
      execute immediate 'alter session set current_schema=SIX';
      select null into l from ls
      where rownum=1 ;
    end;
    /It only worked after I created a local synoynm for ls in the schema APEX_SCM. Weird, it seems like 'alter session set current schema=SIX' is just plain ignored.
    Any help would be greatly appreciated, by anyone ;).
    Thanks,
    ~Dietmar.

  • Where to locate HTTP Server for use with Oracle Express 10g and Apex?

    Hello,
    Im a newbie and I downloaded oracle express 10g and Apex 3.2.1. The Apex install is referencing "choosing a HTTP Server" specifically "Oracle HTTP Server and mod_plsql and the embedded PL/SQL Gateway". My question is do the HTTP server or PL SQL embedded Gateway come with the 10g install or do I need to download them seperately? If so where can I locate them?
    Thank you!

    user12027813 wrote:
    If using Oracle XE, then which APEX install scenario would I used if I downloaded both the XE and apex from the OTN?Oracle XE includes APEX 2.1 and uses the PL/SQL Gateway for HTTP service work. No separate HTTP Server is required.
    If, after you install XE, you want to upgrade to APEX 3.x, you would select the PL/SQL Gateway for the upgrade.
    If the PL/SQL Gateway (EPG) does not provide the full set of services you need, you could put a regular Apache in front and redirect to APEX for those specific issues.
    If that is to complicated, then you could license Oracle Application Server Standard Edition 1 (for a fee) to get an Oracle HTTP Server and it's mod_plsql to replace the internal EPG.

  • Equivalent for AUTHID CURRENT_USER in view

    Hi, I'm facing a problem with a view which belongs to user a and I would like to select tables from user b.
    Exemple :
    user a - table MYTAB
    user b - table MYTAB
    done by user a : "create or replace view MYVIEW as select * from MYTAB"
    grants and synonyms done for both users
    if I execute from user b : "select * from MYVIEW", I get the data from a.MYTAB, not b.MYTAB
    What can I do to force MYVIEW to select from current user's table ? (juste like the AUTHID CURRENT_USER for procs)
    Do I have to create the view in all schemas ?
    Thx in advance

    I wanted exactly the same thing. It's not ideal, but here is what I did. I did it like this so that I can hide away any complexity from other users, and just give them a view that they need not worry about the internal nuts and bolts of.
    It's a bit fiddly, but it goes like this.
    1. In schema A, create an AUTHID CURRENT_USER package. Let's call it pkg_A.
    2. Add a PIPELINED table function to pkg_A, let's call it pipe_rows. For this thread/example, into this function you put the query in question.
    3. Or, you might put the query in a global, public pkg cursor. That way, you can declare a TABLE of that %ROWTYPE. A pipelined function can then return this table-type.
    4. In schema B, create a view, let's call it pkg_A_pipe_rows_vw_in_B. Yes, this means creating a view in Schema-B, which we were hoping to avoid, but this is really simple, and now all the 'nuts and bolts' are common, generic, and hidden away in Schema-A. This view is as simple as:-
    CREATE OR REPLACE VIEW pkg_A_pipe_rows_vw_in_B AS
    SELECT * FROM TABLE(pkg_A.pipe_rows);Note, this view MUST be in Schema-B, as previously pointed out, a view <b>always</b> resolves to objects in the schema into which the view is compiled. This is very confusing, given that the package being called is AUTHID CURRENT_USER.
    This code demo's points 1-3.
    CREATE OR REPLACE PACKAGE pkg_A
    AUTHID CURRENT_USER AS
        CURSOR G_PIPE_CSR IS SELECT * FROM DUAL; -- not good eg, need tab in BOTH schemas with diff data
        TYPE G_PIPE_TABLE IS TABLE OF G_PIPE_CSR %ROWTYPE;
        FUNCTION pipe_rows
        ( param1 IN VARCHAR2 := 'DEFAULT' ) -- can pass params but not from the view in (4) so must default
        RETURN G_PIPE_TABLE
        PIPELINED;
    END;
    CREATE OR REPLACE PACKAGE BODY pkg_A AS
        FUNCTION pipe_rows
        ( param1 IN VARCHAR2 := 'DEFAULT' ) -- can pass params but not from the view in (4) so must default
        RETURN G_PIPE_TABLE
        PIPELINED IS
            l_pipe_row G_PIPE_CSR %ROWTYPE;
        BEGIN
            OPEN G_PIPE_CSR;
            LOOP
                FETCH G_PIPE_CSR INTO l_pipe_row;
                EXIT WHEN G_PIPE_CSR %NOTFOUND;
                PIPE ROW(l_pipe_row);
            END LOOP;
            RETURN;
        END;
    END;
    /As you can't pass params from the view in schema-B, what you can do is provide further 'set' procedures in the package which assign values to global vars, then use the global vars (or public 'get' functions that return the same), when you issue the query. This, again, isn't brilliant. You could set local vars based on the user-id, time of day, etc, etc, and use these in the query.
    Btw, I disagree with William's point:->
    For this reason invoker's rights procedures are usually best for utilities that don't do DML.>
    Providing these utilities are well advertised as resolving against the CURRENT_USER's schema, this is how you can provide generic access mechanisms for like-data in disparate schemas. For example, we are client driven, client A's data is separate from client B's data, but we provide the same service to both parties. (Although, William did say "usually"!)
    Regards,
    Cloink.

  • AUTHID CURRENT_USER

    Hi,
    What is the difference between two..
    CREATE OR REPLACE FUNCTION func_temp
    RETURN NUMBER
    AUTHID CURRENT_USER
    AS
    BEGIN
    RETURN 1;
    END;
    and
    CREATE OR REPLACE FUNCTION func_temp
    RETURN NUMBER
    AS
    BEGIN
    RETURN 1;
    END;
    Please tell me what its the use of AUTHID CURRENT_USER here.
    Thanks,
    Vinod

    By default, stored procedures and SQL methods execute with the privileges of their owner, not their current user. Such definer's rights subprograms are bound to the schema in which they reside, allowing you to refer to objects in the same schema without qualifying their names. For example, if schemas HR and OE both have a table called departments, a procedure owned by HR can refer to departments rather than HR.departments. If user OE calls HR's procedure, the procedure still accesses the departments table owned by HR.
    If you compile the same procedure in both schemas, you can define the schema name as a variable in SQL*Plus and refer to the table like &schema..departments. The code is portable, but if you change it, you must recompile it in each schema.
    A more maintainable way is to use the AUTHID clause, which makes stored procedures and SQL methods execute with the privileges and schema context of the calling user. You can create one instance of the procedure, and many users can call it to access their own data.

  • How to avoid error "HTP 404" when working with "Google Suggest" and Apex 3?

    Hi,
    I am trying to implement the GOOGLE SUGGEST function in an APEX application (a sample of Google Suggest + APEX can be found in http://htmldb.oracle.com/pls/otn/f?p=22777:6:4312817919732414 or http://teradata.weizheng.net/2009/08/using-google-suggest-in-apex.html).
    The release of APEX is 3.2.1 and of RDBMS is 9.2.0.8 (64 bits). They are installed on a SOLARIS 9 SPARC 64-bits server, where i have an EBS 11.5.9 application. So, i´m using RDBMS and Apache of EBS 11.5.9 to work with APEX 3.2.1.
    I can see the list generated by javascript function when i type in P2_REPORT_SEARCH, but when i SELECT an item (pressing ENTER), i have got an "HTP 404 error". Looking in the logs in the apache, i have found this error:
    http://prigaudi1.sote.tasa.com.ar:8002/pls/apex/wwv_flow.accept
    [Tue Jul 26 10:12:53 2011] [error] mod_plsql: /pls/apex/wwv_flow.accept ORA-0
    wwv_flow.accept: SIGNATURE (parameter names) MISMATCH
    VARIABLES IN FORM NOT IN PROCEDURE: AQ,OQ
    NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:
    I think that "AQ" and "OQ" are variables of "ac.js" javascript.
    The JAVASCRIPT procedure that is situated on HTML HEADER of PAGE 2 is :
    <script src="/i/BASE_CONOCIMIENTO/ac_google/ac.js" type="text/javascript"> </script>
    <script language="Javascript" type="text/javascript">
    function iac()
    { InstallAC(document.wwv_flow,document.getElementById
    ('P2_REPORT_SEARCH'),"","ASKTOM.incsearch_articulo","en"); }
    </script>
    The JAVASCRIPT function that is situated on HTML BODY ATTRIBUTE is:
    onLoad="iac()"
    My "INCSEARCH" procedure is described below:
    CREATE OR REPLACE PROCEDURE IncSearch_ARTICULO(qu VARCHAR2, hl VARCHAR2, js VARCHAR2,
    client VARCHAR2 default null) AS
    l_List1 varchar2(10000);
    l_Query varchar2(255);
    l_separator varchar2(10) default '';
    BEGIN
    l_Query := qu || '%';
    FOR x IN (select TIT_TOPICO,NULL AS COMPLEMENTO from BAC_TOPICO where Upper(TIT_TOPICO) like Upper
    (l_Query) order by 1)
    LOOP
    l_list1 := l_List1 || l_separator || '"' || x.TIT_TOPICO || '"';
    l_separator := ',';
    END LOOP;
    owa_util.mime_header('text/html', false);
    owa_util.http_header_close;
    htp.p('sendRPCDone(frameElement, "'|| qu ||'", new Array(' || l_List1 || '), new Array(""), new Array(""));');
    END INCSEARCH_ARTICULO;
    I think this procedure is working fine on Apache Server:
    Example:
    http://prigaudi1.sote.tasa.com.ar:8002/pls/apex/asktom.incsearch_articulo?qu=A&hl=A&js=a <enter>
    sendRPCDone(frameElement, "A", new Array("Ayuda Como crear un topico en la base de conocimiento"), new Array
    (""), new Array(""));
    I would like to know how i can solve this problem of HTP 404 and "SIGNATURE (parameter names) MISMATCH"
    Best regards,
    Sergio Coutinho

    Hi,
    Maybe i provided too much information about my problem,
    Well, i tried to implement the solution "Google Suggest" in my APEX 3.2 application, but i´m having now an "HTTP 404 error" when i select an iten in the list buided by "google suggest".
    Can anybody make a suggestion of how i could analize this error and fix it?
    Best regards,
    Sergio Coutinho

  • How to configure Oracle SSO for forms and apex

    Hi All,
    I am trying to configure oracle SSO for forms and apex using third party external authentication. Please help me how to configure. I a have tried all possible things
    from web but I am not able to do it. Is there any doc or links are much appreciated.
    Info: Some reason my oiddas web link is not working it used to work fine before and also the from /pls/orasso/ link I am not able to login may be because of my oiddas issue
    Thanks

    Hi Andreas,
    Thanks you for your help. I am trying to implement third party external LDAP authentication for APEX and Forms.
    So I started with OID and SSO setup to create external Partner Applications. Some reason my oid and sso web login links are not working. I didn't find any errors. I need some help in finding the problem and direction, I already read docs on web but no proper direction. I appreciate your help.
    Thanks

  • Communication between TNS_Listener and Apex Listener

    Dear all,
    I how does the communication between TNS Listener, Apex Listener, and Apex? For some reason I got the following error from Apex listener:
    Caused by: oracle.dbtools.rt.web.WebException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource
    Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptorI truncated some of the Java object messages.
    This occurred when I tried to connect to Apex. Then I can fix this by going to:
    http://localhost:8080/apex/listenerConfigurethen, everything worked fine.
    My listener.ora file:
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = firefly.snowdrop.com)(PORT = 1521))
    ADR_BASE_LISTENER = /usr/local/oracle
    ADR_BASE_ORACLE_LISTENER = /usr/local/oraclemy tnsnames.ora file
    INARA =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = firefly.snowdrop.com)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = inara.snowdrop.com)
      )where inara is the instance name and firefly is the hostname.
    Does the order of whether starting TNS Listener first or starting Apex Listener first matter?
    Best regards,
    Val
    Edited by: Valerie Debonair on Aug 1, 2011 5:47 AM

    Hm, I'm not able to reproduce the error. There was one time when I started APEX Listener got:
    java.net.BindException: Address already in use: 8080=com.sun.grizzly.http.SelectorThreadHandler@46d999aand when I did the netstat -a got:
    root@firefly:~# netstat -apnl |grep 8080
    tcp6       0      0 :::8080                 :::*                    LISTEN      4530/tnslsnr  I had no idea what made 8080 tagged by the TNS listener, as I started it out before APEX Listener. Very curious how did this happen.
    There was one time netstat -a showed me this (this happened after I stopped Apex Listener, stopped TNS Listener, shutdown the database, started database, started TNS Listener, and started Apex Listener):
    root@firefly:~# netstat -a |grep 8080
    tcp        0      0 firefly.snowdrop.:22110 firefly.snowdrop.c:8080 ESTABLISHED
    tcp        0      0 firefly.snowdrop.:22111 firefly.snowdrop.c:8080 ESTABLISHED
    tcp        0      0 firefly.snowdrop.:22107 firefly.snowdrop.c:8080 ESTABLISHED
    tcp        0      0 firefly.snowdrop.:22109 firefly.snowdrop.c:8080 ESTABLISHED
    tcp        0      0 firefly.snowdrop.:22112 firefly.snowdrop.c:8080 ESTABLISHED
    tcp        0      0 firefly.snowdrop.:22108 firefly.snowdrop.c:8080 ESTABLISHED
    tcp6       0      0 [::]:8080               [::]:*                  LISTEN    
    tcp6       0      0 firefly.snowdrop.c:8080 firefly.snowdrop.:22108 ESTABLISHED
    tcp6       0      0 firefly.snowdrop.c:8080 firefly.snowdrop.:22107 ESTABLISHED
    tcp6       0      0 firefly.snowdrop.c:8080 firefly.snowdrop.:22112 ESTABLISHED
    tcp6       0      0 firefly.snowdrop.c:8080 firefly.snowdrop.:22109 ESTABLISHED
    tcp6       0      0 firefly.snowdrop.c:8080 firefly.snowdrop.:22110 ESTABLISHED
    tcp6       0      0 firefly.snowdrop.c:8080 firefly.snowdrop.:22111 ESTABLISHEDWhat are 22108, 22107, etc? I cannot reproduce this either.
    Now I only got
    root@firefly:~# netstat -a |grep 8080
    tcp6       0      0 [::]:8080               [::]:*                  LISTEN    
    root@firefly:~# netstat -pnl |grep 8080
    tcp6       0      0 :::8080                 :::*                    LISTEN      5035/java   which is normal, right?
    Edited by: Valerie Debonair on Aug 1, 2011 9:43 PM

  • PDFs using BI publisher and special characters - pound sterling

    I have a table with character strings which include the £ pound sterling sign.
    If I create an xml file from the table using the escape sequence for the pound sign & # 163; and load it into BI publisher, the pdf renders correctly using an rtf template.
    If I include the pound sign in the rtf template itself the pdf renders correctly and if I use a report query in Apex based on the table, and an rtf template then the pdf renders correctly.
    However there is a limit to the number of columns that can be sent to BI via the report query - we have found this to be 119 columns. For more than this we have been using a stored function to return xml data as a clob and use the clob to generate the pdf with the rtf report layout (using get_print_document). This method works fine but the pound sign is not rendered correctly (appears as "?").
    The NLS_LANG is set to english_united kingdom in the database and in BI publisher. The locale in bi publisher is en_GB. BI will create the pdf correctly with the pound sign if using a standard xml file (with escape seq for pound) so I am sure it is not a language issue in BI/Apex.
    Any ampersands in the xml cause the pdf to fail completely and we cannot represent special characters with a sequence containing the ampersand for this reason. I have tried "& # 163;" and "& amp;#163;" and variations and have also tried using CDATA, none of which gives the correct pdf output. I have also tried to switch the encoding to Windows-1252 or ISO-8859-1 in the header of the xml (xml generated by stored procedure so can control this), but this gives incorrect results too.
    We also need to send other special characters to BI via get_print_document and apex (bullet points, ampersands, dashes ) but cannot use the escape sequences because of the ampersand problem.
    Has anyone had any success with this?
    Is there any plan ( for a future version of Apex) to increase the number of columns that can be used in report query using Apex/BI publisher?
    Thanks
    Kathryn

    Hi Kathryn
    I've had exactly the same problem as you've mentioned.
    Firstly, I've also found that I cannot select more than 119 columns from a view using a report query and have opted to the use the stored function to return the xml (same as you).
    After conducting a lot of searching and experimenting i've found that you can use the following escape characters in REPLACE in your stored function:-
    '£' can be replaced with CHR(194)||CHR(163)
    '%' can be replaced with '%25'
    '&' can be replaced with '%26amp;'
    I found the above escape characters from the xml file or by opening the xml file in Wordpad. Therefore I'm sure you'll be able to find the escape characters for the other symbols that you mentioned i.e. bullet points, dashes etc.
    I hope this has helped. Good luck and let me know if you get any developments with the limitation on the number of columns that can be selected from a report query as this would save a lot of trouble (as I'm sure you're aware).
    Thanks
    Natalie

  • Image cache not working with Firefox and apex

    Hi,
    I'd like to cache all my images to save page rendering time and bandwidth because my images are all static and never change.
    I use the John Scott's caching technique Link: [http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/], in a few words this technique consists of adding a header line "Expires: date in the future" in the http response.
    It works very well in IE, the images are cached and the same image can be accessed several times (within the same session or in different sessions) without issuing an http request to the server each time.
    with Firefox it does not work, the same image is asked again and again to the server (i'm using FF 3.5 and APEX 3.2).
    - Is it a date format problem? no, because when i type about:cache in FF, i can find my image in the cache with an expire date in the future.
    The weird thing here is that the counter is incremented each time u request the image, so FF knows it is in the cache and even if the expire date is in the future, FF asks it again to the server.
    - Is it a FF bug? If u read the http specs or if u google a little, u can come to the conclusion that FF does not follow the standards,
    but... images.google.com for example manages to get its images cached with FF.
    They use an http response header "cache-control: public, max-age=604800".
    I tried the same and all kinds of combinations but without success.
    When i compare my image with the one from google in the FF cache, they both have the same attributes.
    - It's not an apex issue neither because it works with IE, most probably an incompatibility between apex and FF?
    Maybe the use of cookie? or the http request (not the response) containing "cache-control: max-age=0"?
    I've found so far 2 half solutions:
    1) use ETag and modified date, see the Tyler Muth's note Link: [http://tylermuth.wordpress.com/2008/02/04/image-caching-in-plsql-applications/].
    with this technique FF continues to send request each time but the answer is shorter because it's just a "304 not modified" instead of "200 OK" (200 response is bigger as it contains the image).
    it's better than nothing but you still have 1 request + 1 response for nothing.
    Another problem is that you need SYS access to implement this, which is not possible on an hosted server. (note that for images from the file system it is already foreseen by apex 3.1, Tyler's note is for images from the db)
    2) if you preload the image (using myimage=new Image();myimage.src='...';), then there is max 1 request per browser session.
    There are 2 minor issues here:
    - no caching across sessions
    - if u don't want to preload all the images (example a page with lots of thumbnails, when user clicks it show a bigger image, in that case the thumbnails can be preloaded but overkill for the big images), then you need to load the image, wait until the image has loaded before displaying it, it does not slow down the execution, but requires some extra JS.
    I'm not asking anyone to investigate it, i can live with the 2 workarounds,
    but just in case someone encountered the same problem and already fixed it.
    Let me know if u managed to use the John Scott's technique with Firefox. (U can use Firebug to see the http traffic)
    Thx
    Tim

    Hi Anshul, hope these help. Let me know if you need to see anything else.
    Best,
    Menu Settings:
    Tab Hyperlink:
    Label Text with with hyper link option not available (works as a hyperlink in chrome and IE though):
    Thanks for the help in advance!

  • Guide to installing XE and Apex on Oracle Enterprise Linux 5.3 (64 bit)

    I have just been through a time consuming and frustrating process of installing Oracle XE 10gR2 on Oracle Enterprise Linux 5.3 x86-64 and I want to share my experience so that others can benefit from it and overcome the same problems more quickly.
    Prior to starting I had installed OEL 5.3 and been using it for a few days. The system I am using is a home built box with an AMD Phenom X4 955 Black Edition, 8 Gb RAM, Highpoint RR2680 RAID controller with 4 1TB disks in a RAID5 array and an additional 320Gb HDD storing the OS. I am using KDE3.5 on the desktop.
    The main problem I encountered was with SELinux. As I eventually intend to have this system exposed on the Internet I was reluctant to switch it off despite having read extensively about the issues surrounding it and Oracle. I had several failed attempts at the installation process before succumbing to the reality that SELinux and Oracle are not happy bedfellows. I decided to switch SELinux to permissive mode having followed the advice here.
    I found a very helpful guide to installing XE on Linux here as part of the installation of an application called Spacewalk. Note that you do not need to complete the whole Spacewalk installation, but just follow the instructions in the linked page.
    Before you start you need to ensure that the UID of your oracle user is less than 500. Mine was 500, so I used the following commands to fix this:
    usermod -u 250 oracle
    find / -uid 500 -exec chown oracle {} \;
    These change the oracle UID to 250 (but check that isn't already used first!) and the find command searches for all files that were owned by oracle (but weren't after the usermod cmd) and changes them back to oracle's ownership.
    Now follow the Spacewalk instructions until you reach the Server Setup section. Before you do this you need to make a couple of changes to the script /etc/init.d/oracle-xe. I found these changes in various places, such as [link(1)|http://forums.oracle.com/forums/thread.jspa?messageID=1345771&#1345771] and [link(2)|http://dbataj.blogspot.com/2008/08/lblibrarypath-is-not-set-on-startup.html].
    Note that in link(1) the oracle-xe-selinux packages installed have the same effect as the chcon command on the shared libraries so it isn't necessary to perform this step.
    Open /etc/init.d/oracle-xe in vi (or your favourite editor) and do the following:
    line 49: change /bin/su to /sbin/runuser
    after line 52 (export PATH...) add the following lines:
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    There are further changes recommended to /etc/init.d/oracle-xe in [this post|http://forums.oracle.com/forums/thread.jspa?messageID=3201491&#3201491] but I haven't done them yet.
    Having done the above changes you can now configure Oracle XE by running /etc/init.d/oracle-xe configure (as root!). As I have Apache Tomcat running on port 8080 I changed the default HTTP port to 8500 but kept the listener on its default port of 1521. Once the confuration script is done you will need to change the ports SELinux uses for Oracle as follows:
    semanage port -d -t oracle_port_t -p tcp 9000 - deletes port 9000, which is the SELinux default port for Apex
    semanage port -a -t oracle_port_t -p tcp 1521 - ensure that listener port is OK (assuming you used default of 1521, change accordingly if you didn't)
    semanage port -a -t oracle_port_t -p tcp 8500 - add the new Apex HTTP port to SELinux
    After all this running:
    semanage port -l | grep oracle
    should show you:
    oracle_port_t tcp 1521, 8500
    I ignored the TNSNAMES.ORA part of the Spacewalk instructions and proceeded with the 'Client setup on 64bit platform' and 'Configuring sqlplus' sections.
    For the latter I created a bash script which I have made available in the oracle user and my own user's home directories:
    cat > configure_oracle_10g_xe.sh
    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    PATH=$PATH:$ORACLE_HOME/bin
    ORACLE_SID=XE
    export ORACLE_HOME ORACLE_SID PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    I did this as I intend to install other Oracle databases, e.g. 11gR2, on this box later so I didn't want to put the above in .bashrc.
    Having done the above you should be able to log into the database using sqlplus and the XE setup is complete.
    The upgrade of Apex 2.2 to Apex 3.2.1 was fairly painless so I won't go into much detail about it - just follow the instructions provided by Oracle.
    The only issue I had was right at the end of the process and is documented and answered in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=958611&tstart=0].
    That's it - I hope somebody will find this useful.

    On Oracle Metalink site, there are many documents which says that Oracle 32 bit software works on 32 bits OS and 64 bits software works on 64 bits OS. Official support is only in those combination....
    So there is no good way to help you in your case-XE is 32 bit application with hard codded compiled libraries which most of them would not work on 64 bit OS.
    Sorry
    8(
    Hope this helps

  • 10g Nested Tables and APEX

    Trying to use the following within Apex:
    CREATE TYPE location_typ AS OBJECT (
    location_id NUMBER(4),
    street_address VARCHAR2(40),
    postal_code VARCHAR2(12),
    city VARCHAR2(30),
    state_province VARCHAR2(25));
    CREATE TYPE nt_location_typ AS TABLE OF location_typ;
    CREATE TYPE country_typ AS OBJECT (
    country_id CHAR(2),
    country_name VARCHAR2(40),
    locations nt_location_typ);
    CREATE TYPE nt_country_typ AS TABLE OF country_typ;
    CREATE TABLE region_tab (
    region_id NUMBER,
    region_name VARCHAR2(25),
    countries nt_country_typ)
    NESTED TABLE countries STORE AS nt_countries_tab (
    (PRIMARY KEY (NESTED_TABLE_ID, country_id))
    ORGANIZATION INDEX COMPRESS
    NESTED TABLE locations STORE AS nt_locations_tab);
    Can get Apex to function in the Tabular Report mode by modifying the query to use the correct syntax:
    select "REGION_ID",
    "REGION_NAME",
    c.COUNTRY_ID,
    c.COUNTRY_NAME,
    l.LOCATION_ID,
    l.STREET_ADDRESS, l.POSTAL_CODE,
    l.CITY,
    l.STATE_PROVINCE
    from "#OWNER#"."REGION_TAB", TABLE(COUNTRIES) C, TABLE(LOCATIONS) L
    Built a 'Maintenance' form. Put the Region base column on it. Then built a tabular form (with an updateable query) on the same page to access the first level Nest ( countries). Haven't figured out how to actually edit the values yet, but feel comfortable I will.
    But - trying to provide editing to the 2nd level nested table elements creates a problem. First, only 1 updateable query can be on a page. Hmmm - so to get around this I guess I have to build a new page that the calling updateable query will access when selecting one of the tabular form elements. Not elegant by any means. Was hoping to provide a blank form on the right side that would be populated by the Location Nested Table values when a select was made on the first level nest. Oh well.
    Just curious how anyone has handled this? I could pass stack between pages for sure, but was hoping page regions would be sufficient to handle this.
    Any white papers on this? Anything in the DEMO area to use as a template? The default Demo doesn't provide this based on querying user objects.
    Thanks,
    Dwight Taylor

    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE OR REPLACE TYPE table_type AS TABLE OF VARCHAR2 (8);
      2  /
    Type created.
    SQL> CREATE TABLE r(
      2    a INTEGER,
      3    b table_type)
      4    NESTED TABLE b STORE as b_1;
    Table created.
    SQL> CREATE TABLE s(
      2    a INTEGER,
      3    b table_type)
      4    NESTED TABLE b STORE as b_2;
    Table created.
    SQL> INSERT INTO r VALUES (1, table_type ('a', 'b'));
    1 row created.
    SQL> INSERT INTO s VALUES (1, table_type ('b', 'c'));
    1 row created.
    SQL> COLUMN c FORMAT A10;
    SQL> SELECT r.a, r.b MULTISET UNION DISTINCT s.b c
      2  FROM   r, s
      3  WHERE  r.a = s.a;
             A C
             1 TABLE_TYPE('a', 'b', 'c')
    SQL>

  • Integrating Oracle EBS and ApEx Aplication with Responsibilities and SSO.

    Good day all.
    I am looking forward from getting somebody 's help, the trouble I am facing is described below:
    a) I am currently working on SSO with EBS. I mean, my users can connect and work perfectly.
    b) ApEx is Configured as Application Partner with SSO, and the application we built (it's call PR-Auto)
    is working good under SSO platform. I mean I am able to login using TEST user and password TEST in
    both applications (EBS and PR-Auto).
    c) The thing is that I need to call PR-Auto from one responsibility in EBS;
    Following my setup for the responsibility:
    - I have created a function:
    Name: APEX_FA_PR
    Properties:
    Function type: SSWA plsql
    Web HTML :apps.apex_launcher.launch_fa_pr
    Web Host agent: pls/apex
    - I have created a menu, application and responsibility using the function APEX_FA_PR.
    - I have create launcher package:
    create or replace package apex_launcher is
    procedure launch_fa_pr;
    end apex_launcher;
    create or replace package body apex_launcher as
    procedure launch_fa_pr as
    begin
    /** 110 Is ID of PR-Auto, my app **/
    /** 5 is my home page **/
    f(p=>'110:5');
    end;
    end apex_launcher;
    d) New responsibility shows on EBS menu page.
    e) Click on responsibility, and the page shows 'redirecting to login server for authentication', but
    nothing happens, page goes blank with this url:
    http://fahorromex37.fahorro.com.mx:8004/pls/apex/wwv_flow_custom_auth_sso.process_success?urlc=v1.2~42
    03F9A8A1D696097BEA96499E6B6845E80C14A56DF724C3FFF879578FC734C5E1DEEA9129A4117E62A3676A409528E8EB927AA55
    0EA7B208C34F5A3FDB4472679EDE448F8971966BE9BADD22207FE90BDBA2800E6529F3967A18DEC76DCC17DE21D96A65CA2C424
    319F159CC78ED78E8B99F69F1BA8297A1EECF6AD137A6C3896E1C4E8D5F93874A9A08887D3F95058D33F667D7B785FF0A065B53
    891B8B393DFD24530BD0720150F05DE63F0CD5AFD86F0267BAF4C9CAE8C5AA693B4E488B3776BF43450FD412167B402C962BABE
    A54707043AFA6FBB168B29EDB3BE120FFE0C30683D53283B036E781ABF1A5F7374ADF83463D57D2EE958765B0501CE2B0F4E3DF
    24845A54A1CF02526FA39EF60644ED5A0D9D2A05EBFAD3BD01007D0817135989A4B97D68C92C6E2BA767CFDB0AF188054024BB1
    EFFA7DEC8699BBA7485A349D87BA1C15475927E52110DF56FCC3FD560D2CBBA1C0D7D9D3ADFCDB975CD2
    the address of my application pr-auto is http://fahorromex37.fahorro.com.mx:8004/pls/apex/f?p=110
    f) DBA teams follow instructions from the following documentation
    "Integrating Oracle E-Business Suite Release 11i with Oracle Internet Directory and Oracle Single Sign-On"
    and "Note 261914.1 Integrating Oracle E-Business Suite Release 11i with Oracle Internet Directory and
    Oracle Single Sign-On"
    g) We are using:
    DB: Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    SO: Linux 2.6.9-42.ELsmp
    ApEx: 3.0.1.00.07
    Any help will be greatly appreciated.
    J.O.

    Many Thanks Daniel for your prompt reply.
    Tried to understand the white Paper and your thread but I am still facing problem,although able to Call ApEX page but now i
    want to pass th e session Id where I am stuck.
    MY three functions:
    CREATE OR REPLACE FUNCTION SYMAPEX.apex_authorise (
    p_username IN VARCHAR2
    , p_password IN VARCHAR2) RETURN BOOLEAN
    AS
    BEGIN
    IF apex_validate_hash (p_username, p_password) THEN RETURN TRUE;
    END IF;
    RETURN (FND_WEB_SEC.validate_login@VCSDEV2_QA (p_username, p_password) = 'Y');
    END apex_authorise;
    CREATE OR REPLACE FUNCTION SYMAPEX.apex_generate_hash (
    p_string IN VARCHAR2
    , p_offset IN NUMBER DEFAULT 0) RETURN VARCHAR2
    IS
    BEGIN
    IF p_string IS NULL THEN RETURN NULL;
    END IF;
    RETURN RAWTOHEX(UTL_RAW.cast_to_raw(
    DBMS_OBFUSCATION_TOOLKIT.MD5(input_string=>p_string||':'||
    TO_CHAR(SYSDATE-(p_offset/24*60*60),'YYYYMMDD HH24MISS'))));
    END apex_generate_hash;
    CREATE OR REPLACE FUNCTION SYMAPEX.apex_validate_hash (
    p_string IN VARCHAR2
    , p_hash IN VARCHAR2
    , p_delay IN NUMBER DEFAULT 5) RETURN BOOLEAN
    IS
    BEGIN
    FOR i IN 0..p_delay LOOP
    IF p_hash = apex_generate_hash (p_string, i) THEN RETURN TRUE; END IF;
    END LOOP;
    RETURN FALSE;
    END apex_validate_hash;
    MY Launch Procedure:
    CREATE OR REPLACE Package body OAE_PKG1 AS
    PROCEDURE LaunchOAE1 (application IN NUMBER DEFAULT 101
    , page IN NUMBER DEFAULT 111
    , request IN VARCHAR2 DEFAULT NULL
    , item_names IN VARCHAR2 DEFAULT NULL
    , item_values IN VARCHAR2 DEFAULT NULL)
    AS
    BEGIN
    OWA_UTIL.mime_header('text/html', false);
    OWA_COOKIE.send
    (name=>'APEX_APPS_'||application,
    value=>FND_GLOBAL.user_name||':'||apex_generate_hash@QA_VCSDEV2(FND_GLOBAL.user_name),
    domain => '.orvcsd01.symprod',
    path=>'/');
    OWA_UTIL.redirect_url('http://orvcsd01.symprod.com:7780'||'/pls/apex/f?p='||application||':'||page||'::'||request||':::'||ite
    m_names||':'||item_values);
    END LaunchOAE1;
    END OAE_PKG1;
    MY On Load before headre process:
    DECLARE
    c OWA_COOKIE.cookie;
    a wwv_flow_global.vc_arr2;
    BEGIN
    c := OWA_COOKIE.get('APEX_APPS_101');
    a := htmldb_util.string_to_table(c.vals(1));
    :P111_USERNAME := a(1);
    :P111_PASSWORD := a(2);
    IF :P111_PASSWORD IS NOT NULL THEN
    wwv_flow_custom_auth_std.login(
    P_UNAME => :P111_USERNAME,
    P_PASSWORD => :P111_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_FLOW_PAGE => :APP_ID||':111');
    END IF;
    END;
    I am doing custom authencitaion and calling apex_authorise function there.
    Although I am able to Call the ApEX and able to validate application server password,but moment i try taking help off cookies
    to pass on my application session details to ApEX so that users would not have to login twice,i am gettign the error.
    Second question:
    Do we have any other methos of passing session to ApEX from Application server other than cookies.
    Please suggest.
    Thanks.
    Ravijeet

  • Using oracle text in apex report search

    I am trying to use oracle text in apex, integrating it in an existing application. The idea is that it will allow to do a search in bigger textfields. Thats how I want it to get to work. In one of the oracle packaged applications oracle text is used as well, so I will have a look to that as well. I've addapted this search. I've added
    AND t. contains(oplossing, :P15_OPLOSSING)
    AND t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)
    That didn't work, so I changed those two to:
    AND t.oplossing = (t.contains(oplossing, :P15_OPLOSSING)>0)
    AND t.sleutelwoorden = (t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)>0)
    which didn't work either, which I expected to be the case. Clearly I'm not doing it correctly, I intend to look it up tonight in the packaged applications as I do want to findt it myself to.
    But does anyone can give a hint, on what I am doing wrong ?
    SELECT t.ticketid ticketnr, t.ticketid,
    g.voornaam||' '||g.naam aangemaaktdoor,
    t.credt, t.applicatiecd, t.titel,
    s.statusdefoms,
    si.statusdefoms instat,
    NVL2(t.toegekend,'Y','N') toegekend,
    sleutelwoorden, klantprioriteitid, oplossing, s.htmlkleur, si.htmlkleur inthtmlkleur
    FROM ticket t,
    gebruiker g,
    status s,
    status si
    WHERE t.gebruikerid = g.gebruikerid
    AND t.statusid = s.statusid
    AND t.statusinternid = si.statusid (+)
    AND t.applicatiecd = NVL(:P0_APPLICATIECD, :F101_APPLICATIECD)
    AND (t.categorieid = :P15_CATEGORIEID OR NVL(:P15_CATEGORIEID, 0) = 0)
    AND (t.moduleid = :P15_MODULEID OR NVL(:P15_MODULEID, 0) = 0)
    AND (t.statusid = :P15_STATUSID OR NVL(:P15_STATUSID, 0) = 0)
    AND (t.statusinternid = :P15_INTSTATUSID OR NVL(:P15_INTSTATUSID, 0) = 0)
    AND (t.versieid = :P15_VERSIEID OR NVL(:P15_VERSIEID, 0) = 0)
    AND t.ticketid LIKE '%'||:P15_TICKETID||'%'
    AND t.gebruikerid = DECODE(NVL(:P15_GEBRUIKERID,0), 0, t.gebruikerid, :P15_GEBRUIKERID)
    AND t.credt BETWEEN NVL(:P15_DATUMVAN, To_Date('01-01-1900', 'DD-MM-YYYY')) AND NVL(To_Date(:P15_DATUMTOT, 'DD-MM-YYYY'), sysdate) +1
    AND t.titel LIKE '%'||:P15_TITEL||'%'
    AND t. contains(oplossing, :P15_OPLOSSING)
    AND t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)
    AND PCK$Ticket_Admin.getklantid(t.gebruikerid) = DECODE(Pck$Ticket_Admin.isklantadminroleN(:APP_USER,NVL(:P0_APPLICATIECD, :F101_APPLICATIECD)), 1, PCK$Ticket_Admin.getklantid(:APP103_GEBRUIKERID), PCK$Ticket_Admin.getklantid(t.gebruikerid))
    AND (:APP103_GEBRUIKERID IN (t.voor_gebruikerid, t.gebruikerid)
    OR Pck$Ticket_Admin.isintern(:APP_USER,:P0_APPLICATIECD) = 1)
    changed to:
    AND t.oplossing = (t.contains(oplossing, :P15_OPLOSSING)>0)
    AND t.sleutelwoorden = (t.contains(sleutelwoorden, :P15_SLEUTELWOORDEN)>0)

    I have worked it further out now, and looked at the search of the packaged application. It turned out to be a pl/sql block . I used what I found in there to adapt the previous search. I added the following:
    OR (CONTAINS(t.oplossing, :P15_OPLOSSING)>0)
    OR (CONTAINS(t.sleutelwoorden, :P15_SLEUTELWOORDEN)>0)
         OR (CONTAINS(t.titel,:P15_SEARCH_T_O_S)>0 OR
         CONTAINS (t.oplossing, :P15_SEARCH_T_O_S)>0 OR
         CONTAINS(t.sleutelwoorden, :P15_SEARCH_T_O_S)>0 )
    OR (CONTAINS(t.titel,:P15_SEARCH_T_O_S)>0 AND
         CONTAINS (t.oplossing, :P15_SEARCH_T_O_S)>0 AND
         CONTAINS(t.sleutelwoorden, :P15_SEARCH_T_O_S)>0 )
    oplossing means solution
    sleutelwoorden means keywords
    titel means title
    Yet this doesn't work yet. It gives an error message:
    failed to parse SQL query:
    ORA-01719: outer join operator (+) not allowed in operand of OR or IN
    I've tried adding the addition in a different place, yet that gives the same error message. I'm not sure now.

Maybe you are looking for

  • Permanently save line spacing in a multi-line text field

    Me: Adobe Acrobat 8 Pro, Windows Vista (I think the people who will be using the form have Reader 7 on Windows) I work in a doctors' clinic, and we use phone message sheets to document conversations between the patients/us/nurses/doctors, and I scann

  • Color Correction with in Final Cut Pro 6

    Hi All, I have a showreel of my work, and some of the clips have sections that are darker than I would like them to be, and I would like to correct the color issues. Is it possible to only correct 3 seconds of over dark video, and not have the entire

  • Can I purchase a gift card?

    Can I buy a gift card with a credit card? With my walmart card I tried to buy a prepaid mastercard and it wouldnt let me. Is this always true or does it depend on the merchant/cc company?  

  • Link documents to PA30 screen

    Hello All, I have different documents for different infotypes, which is stored via DMS for a employee. Now i want to provide the link in PA30 screen for an employee, for different infotypes. Different link for different infotype. Question is, how do

  • Re: how can i interface Oracle 8i with webpages in HTML

    Hi all, I am a novice in Oracle 8i. I want to know how to interface some tables that are in Oracle 8i with some static pages in HTML? Can it be done or do I have to use Java? I need a prompt reply for this. Thanks, Sangeeta