Manchmal ist es sehr nützlich, herauszufinden auf welchem Server man gerade arbeitet. Dann kann man z.B. auf einem Testserver eine andere Seiten-Region ausgeben, als auf dem Produktivserver.Leider funktioniert der Tipp nur innerhalb von APEX und nicht via SQL*Plus, SQL Developer oder anderen Tools:
Gehen Sie daher in APEX und erstellen Sie eine Dynamische PL/SQL Content Region in APEX und legen Sie dort folgenden Code ab:
Nun wird beim Aufbau der Seite z.B. folgende Ausgabe erscheinen:
REMOTE_IDENT =REMOTE_USER = APEX_PUBLIC_USERhost = 172.30.30.230:8080user-agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0accept = text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8accept-language = de,en-US;q=0.7,en;q=0.3accept-encoding = gzip, deflatereferer = http://172.30.30.230:8080/connection = keep-alivecookie =upgrade-insecure-requests = 1APEX_LISTENER_VERSION = 21.4.1.r0250904DAD_NAME =DOC_ACCESS_PATH =DOCUMENT_TABLE =GATEWAY_IVERSION = 3GATEWAY_INTERFACE = CGI/1.1HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8HTTP_ACCEPT_ENCODING = gzip, deflateHTTP_ACCEPT_LANGUAGE = de,en-US;q=0.7,en;q=0.3HTTP_ACCEPT_CHARSET =HTTP_IF_MODIFIED_SINCE =HTTP_IF_NONE_MATCH =HTTP_HOST = 172.30.30.230:8080HTTP_ORACLE_ECID =HTTP_PORT = 8080HTTP_REFERER = http://172.30.30.230:8080/HTTP_USER_AGENT = Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0PATH_ALIAS =PATH_INFO = /rest-template-erstellungPLSQL_GATEWAY = WebDbQUERY_STRING = session=1647342785893REMOTE_ADDR = 172.30.30.30REQUEST_CHARSET = AL32UTF8REQUEST_IANA_CHARSET = UTF-8REQUEST_METHOD = GETREQUEST_PROTOCOL = httpREQUEST_SCHEME = httpSCRIPT_NAME = /ords/scott/r/oracle-restSCRIPT_PREFIX =SERVER_NAME = 172.30.30.230SERVER_PORT = 8080SERVER_PROTOCOL = HTTP/1.1SERVER_SOFTWARE = Mod-ApexWEB_AUTHENT_PREFIX =X-APEX-METHOD = GETX-APEX-BASE = http://172.30.30.230:8080/ords/scott/X-APEX-PATH = r/oracle-rest/rest-template-erstellung?session=1647342785893X-APEX-REMOTE-ADDRESS = 172.30.30.30X-APEX-CHARSET = UTF-8HTTP_COOKIE =
Damit kann man nun in einer Condition wunderbar arbeiten, z.B. mit einer Exists SQL Query
Weitere Tipps und Tricks erfahren Sie in einem unserer APEX Kurse in Unterhaching bei München.