2 Replies Latest reply: Jan 27, 2013 8:22 AM by One_Two_Three RSS

    Database Link in Apex

    One_Two_Three
      Hi,

      In my company I have two branches and in each branche we are using oracle database version 11.2.0.1.0 with APEX verion 4.0.2.00.07.
      and we have IP connection between the two branches, so I created the database links between two databases.
      but I have a problem that when I using the link through APEX the performance of database is very slow and I can see the following procedure in enterprise manager:

      declare
      rc__ number;
      simple_list__ owa_util.vc_arr;
      complex_list__ owa_util.vc_arr;
      begin
      owa.init_cgi_env(:n__,:nm__,:v__);
      htp.HTBUF_LEN := 63;
      null;
      null;
      simple_list__(1) := 'sys.%';
      simple_list__(2) := 'dbms\_%';
      simple_list__(3) := 'utl\_%';
      simple_list__(4) := 'owa\_%';
      simple_list__(5) := 'owa.%';
      simple_list__(6) := 'htp.%';
      simple_list__(7) := 'htf.%';
      simple_list__(8) := 'wpg_docload.%';
      simple_list__(9) := 'ctxsys.%';
      simple_list__(10) := 'mdsys.%';
      if ((wwv_flow_epg_include_modules.authorize(
      +'f'+
      +) = false) or (owa_match.match_pattern(p_string =>+
      +'f'+
      +/* */,p_simple_pattern =>+
      simple_list__
      +,p_complex_pattern =>+
      complex_list__
      +,p_use_special_chars =>+
      false)))

      then
      rc__ := 2;
      else
      null;
      null;
      f(p=>:p);
      if (wpg_docload.is_file_download) then
      rc__ := 1;
      wpg_docload.get_download_file(:doc_info);
      null;
      null;
      null;
      commit;
      else
      rc__ := 0;
      null;
      null;
      null;
      commit;
      owa.get_page(:data__,:ndata__);
      end if;
      end if;
      +:rc__ := rc__;+
      end;



      but when I am using the database link from normal sql query out of APEX, I am not facing a performance issue.

      Any Idea about this issue?

      Thanke and best regards,
        • 1. Re: Database Link in Apex
          VC
          Have you tried to debug?

          And what is the status of this process? I mean is it waiting, taking time to execute this block or is there any network issue?

          What was this request/link actually doing?

          I have done a similar thing in the pas and never really had these kind of problems.

          Cheers,
          Vikram
          • 2. Re: Database Link in Apex
            One_Two_Three
            Thanks for reply,
            It is showing in enterprise manger as network issue.
            The request is selecting or inserting or updating in other database.
            I think it is related to APEX only.

            Is there any suggestion that can be done to avoid this problem.

            with regards,