After discovering two undocumented procedures in package DBMS_XDB in Oracle XE (10gR2), i was eager to try out a configuration of a secondary listening endpoint.
These two undocumented procedures, called DBMS_XDB.SetListenerEndpoint and DBMS_XDB.GetListenerEndpoint, are actually documented in the 11gR1 manual, so i guess they were added to the package when it was too late to be described in the manuals.
When i attempted to execute the following block as a normal user, i got the exception shown below:
beginAfter connecting as SYS and executing the block again, i got my second listening endpoint up and running on port 8082.
DBMS_XDB.SETLISTENERENDPOINT (
endpoint => DBMS_XDB.XDB_ENDPOINT_HTTP2,
host => NULL,
port => 8082,
protocol => DBMS_XDB.XDB_PROTOCOL_TCP);
end;
/
ORA-31050: Access denied
ORA-06512: at "XDB.DBMS_XDB", line 382
ORA-06512: at "XDB.DBMS_XDB", line 671
ORA-06512: at line 2
Note that existing sessions won't pick up the new configuration until you refresh it.
Indeed i when executed the following block from an existing session as a normal user:
declarei only got null values.
l_host varchar2(255);
l_prot number;
l_port number;
begin
DBMS_XDB.GETLISTENERENDPOINT (
endpoint => DBMS_XDB.XDB_ENDPOINT_HTTP2,
host => l_host,
port => l_port,
protocol => l_prot);
dbms_output.put_line(l_host);
dbms_output.put_line(l_port);
dbms_output.put_line(l_prot);
end;
/
As soon as i executed DBMS_XDB.CFG_REFRESH the new values took effect for that session.
According to the documentation for Oracle 11g, the second listening endpoint is most useful for implementing the HTTPS protocol. I configured a normal (secondary) HTTP port just to verify the possibility of connecting to a specific Apex box from remote using a non standard port.
See message translations for ORA-31050 and search additional resources.
No comments:
Post a Comment