I'm having an issue regarding with utl_http, oracle 8.1.7 and 9.0.2. If
I use sqlplus from any server the utl_http function doesn't work, but if
I do the same thing directly from the server it does works. I don't know
if is something regarding the listener configuration or not.
I need to do this using the oracle 8 installation. This works ok for 9.
Any clues?
Thanks,
Lazy mike
Following my configuration:
I have two oracle installations
Oracle8i Enterprise Edition Release 8.1.7.4.0
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit
In an AIX server: 5.2 oslevel=5200-04
When I use sqlplus on Oracle 8 from my computer and run:
SQL> select utl_http.request('172.24.45.9') from dual;
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_HTTP", line 174
ORA-06512: at line 1
In the other hand, it works fine if I run directly from the server:
$ env
ORACLE_BASE=/ora01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/8.1.7; export ORACLE_HOME
ORACLE_TERM=vt100
TNS_ADMIN=$ORACLE_HOME/network/admin
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib
ORA_DB=$ORACLE_HOME/dbs
CLASSPATH=$ORACLE_HOME/JRE/lib:$ORACLE_HOME/JRE/lib/rt.jar:$ORACLE_HOME/
jlib:$ORACLE_HOME/rdbms/jlib
PATH=$ORACLE_HOME/bin:/usr/bin:/etc:/usr/lbin:/usr/bin/X11:/usr/local/bi
n:.
$ export ORACLE_SID=drpi
$ sqlplus
SQL*Plus: Release 8.1.7.0.0 - Production on Thu Oct 5 17:19:00 2006
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Enter user-name: mine
Enter password:
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
SQL> select utl_http.request('172.24.45.9') from dual;
UTL_HTTP.REQUEST('172.24.45.9')
------------------------------------------------------------------------
--------
<html><head><title>Jetty Java HTTP Servlet Server</title>
<link REL="STYLESHEET" TYPE="text/css" HREF="/jetty/jetty.css">
<META NAME="description" CONTENT="Jetty Java HTTP Servlet Server"><META
NAME="ke
ywords" CONTENT="Jetty Java HTTP Servlet Server">
</head>
<body TOPMARGIN="0" LEFTMARGIN="0" alink="#606CC0" vlink="#606CC0"
text="#00000
0" MARGINHEIGHT="0" link="#606CC0" RIGHTMARGIN="0" MARGINWIDTH="0"
bgcolor="#FFF
FFF">
<table cellspacing=0 cellpadding=0 border=0><tr><td bgcolor="#E8ECF8"
align="cen
ter" valign="top"><A HREF=http://jetty.mortbay.org><IMG
SRC="/jetty/images/power
ed.png" WIDTH=140 HEIGHT=58 BORDER=0 ALT="Powered by Jetty"></A>
UTL_HTTP.REQUEST('172.24.45.9')
------------------------------------------------------------------------
--------
<P><FONT SIZE=+1><B>About Jetty</B></FONT><BR><font size="-1"><a
href="/jetty/LI
CENSE.html">License</a
></font
><BR><font size="-1"><a href="/jetty/history.html">History</a
></font
><BR><font size="-1"><a href="/jetty/versions.txt">Versions</a
></font
><BR><font size="-1"><a href="/jetty/iX.html">Review</a
></font
><P><font size="+1"><a href="/jetty/resources.html">Resources</a
></font
UTL_HTTP.REQUEST('172.24.45.9')
------------------------------------------------------------------------
--------
><BR><font size="+1"><a href="/jetty/demos.html">Demos</a
></font
><BR><font size="+1"><a href="/jetty/download.html">Downloads</a
></font
><BR><font size="+1"><a href="/jetty/contributing.html">Contributing</a
></font
><BR><font size="+1"><a href="/jetty/sponsors.html">Sponsors</a
></font
> <P> <P><A HREF="http://www.mortbay.com"><IMG
SRC="/jetty/images/mbLo
goBar.png" WIDTH=120 HEIGHT=75 BORDER=0 ALT="Mort Bay"></A><P>
<A HREF="http://www.inetu.com"><IMG SRC="/jetty/images/inetu.png"
WIDTH=121 HEIG
UTL_HTTP.REQUEST('172.24.45.9')
------------------------------------------------------------------------
--------
HT=52 BORDER=0 ALT="InetU"></A><P>
<A HREF="http://sourceforge.net/projects/jetty"><IMG
SRC="/jetty/images/sourcefo
rge.png" WIDTH=88 HEIGHT=31 BORDER="0" alt="SourceForge"></A><P>
</A><P>
<P> <P> <P> <P> <P> <P> <P> <P>
<P
> <P> <P> <P> <P> <P><font size=-4
color="#606CC0">Copy
right 2001<BR>Mort Bay Consulting.</FONT></td
><td bgcolor="#606C90" width=3><BR></td
><td width=1
SQL>
Oracle LazyDBA home page