2 Replies Latest reply on Mar 30, 2018 3:58 AM by jariola

    ORDS: Query using owa_util.get_cgi_env

    jariola

      I'm testing this with ORDS 17.4 and Oracle XE.

      But same result when trying apex.oracle.com workspace RESTful services .

       

      I like use owa_util.get_cgi_env in GET resource handled from query, but it gives ORA-06512.

       

      Here is simplified case:

      I did try create GET resource handler that use below query

      select owa_util.get_cgi_env('REMOTE_ADDR') as ip
      from dual
      

      It result ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", line 354

       

      But if change it to PL/SQL and below code it works

      begin
      htp.p(owa_util.get_cgi_env('REMOTE_ADDR'));
      end;
      

       

      Just wonder why owa_util.get_cgi_env don't work in query?

      Is there workaround?