2 Replies Latest reply: Jan 30, 2013 5:09 AM by 955432 RSS

    XDB username and passwrod

    user13653962
      I have installed oracle 11g Release 1 , i heared apex is preconfigured with oracle 11g release 1 then how can i access it when i run the

      http://repsrv.mydomain.com:8080/apex/apex_admin

      i get a window which ask the username

      enter username and passwrod for "XDB" at http://repsrv.mydomain.com:8080/apex/apex_admin

      User Name :
      Password :

      what username and password should i give?
        • 1. Re: XDB username and passwrod
          srecio
          Hi,

          If you search in this forum, something as "login prompt xdb" for example, you will find several threads regarding this issue (please, do so before posting in the future). The login prompt comes up because APEX uses the XML DB repository and anonymous access to it is disabled by default because as the Oracle documentation says, it is a security risk, so take that into account when using the following solution. To enable anonymous access to the XML DB repository and stop getting the login window use the following code:
          CONN sys/password AS SYSDBA
          
          SET SERVEROUTPUT ON
          DECLARE
          l_configxml XMLTYPE;
          l_value VARCHAR2(5) := 'true'; -- (true/false)
          BEGIN
          l_configxml := DBMS_XDB.cfg_get();
          
          IF l_configxml.existsNode('/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access') = 0 THEN
          -- Add missing element.
          SELECT insertChildXML
          (
          l_configxml,
          '/xdbconfig/sysconfig/protocolconfig/httpconfig',
          'allow-repository-anonymous-access',
          XMLType('<allow-repository-anonymous-access xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">' ||
          l_value ||
          '</allow-repository-anonymous-access>'),
          'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"'
          )
          INTO l_configxml
          FROM dual;
          
          DBMS_OUTPUT.put_line('Element inserted.');
          ELSE
          -- Update existing element.
          SELECT updateXML
          (
          DBMS_XDB.cfg_get(),
          '/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access/text()',
          l_value,
          'xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"'
          )
          INTO l_configxml
          FROM dual;
          
          DBMS_OUTPUT.put_line('Element updated.');
          END IF;
          
          DBMS_XDB.cfg_update(l_configxml);
          DBMS_XDB.cfg_refresh;
          END;
          /
          Also, remember to change your user handle to something more meaningful.

          Regards,

          Sergio
          • 2. Re: XDB username and passwrod
            955432
            Did you ever get a solution to your question? The answer posted here addresses the issue of anonymous access which isn't my problem at the moment - I just want to know what usernname and password I should use to access APEX admin.