I am facing with “XDB authentication popup dialog” for a long time. This usually happened when I tried to access the apex root url such as http://xxx.xxx.xxx.xx/apex. When I was accessing to the apex login page directly, such as http://xxx.xxx.xxx.xxx/apex/f?p=4550, everything was fine. So, I did not give importance to fix XDB authentication issue for long time.
Since Today morning, this issue popped up for any page that I would tried to access. It became a very annoying problem and I had to fix it immediately or just forget about using APEX until the issue is fixed. I already knew that it has to do with permissions. A little google search took me to apexexplorer.com. I know the admin “Md. Kamam Hossain”. He is an early bird APEX Certified expert. So, I was confident about this solution and wanted to try that instead of searching at other urls.
However, the script which he published has some syntax errors. So, I am publishing the working script here.
Make sure you are connected to SQL Plus with SYSDBA privileges such as using the command “CONNECT SYS AS SYSDBA”
l_value VARCHAR2(5) := 'true'; --(true/false)
l_configxml := DBMS_XDB.cfg_get();
IF l_configxml.existsNode('/xdbconfig/sysconfig/protocolconfig/httpconfig/allow-repository-anonymous-access') = 0 THEN
-- Add missing element.
XMLType('<allow-repository-anonymous-access xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">' ||
-- Update existing element.
You can download the script here
Apart from executing the script, you need to also unlock XDB & Anonymous account. Use the command below for it.
SQL > ALTER USER ANONYMOUS IDENTIFIED BY anonymous;
SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK;
SQL> ALTER USER XDB IDENTIFIED BY xdb;
SQL> ALTER USER XDB ACCOUNT UNLOCK;