Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Problem calling UTL_HTTP in oracle XE.

SamB
Member Posts: 592
I'm running 10g express and have tried running this connected as system well as other users.
SELECT COUNT(*) from dba_objects where object_name='UTL_HTTP' AND OBJECT_TYPE ='PACKAGE';
COUNT(*)
1
declare
req utl_http.req;
BEGIN
NULL;
END;
ORA-06550: line 2, column 9:
PLS-00201: identifier 'UTL_HTTP' must be declared
ORA-06550: line 2, column 9:
SELECT COUNT(*) from dba_objects where object_name='UTL_HTTP' AND OBJECT_TYPE ='PACKAGE';
COUNT(*)
1
declare
req utl_http.req;
BEGIN
NULL;
END;
ORA-06550: line 2, column 9:
PLS-00201: identifier 'UTL_HTTP' must be declared
ORA-06550: line 2, column 9:
Comments
-
SQL> select owner from dba_objects where object_name='UTL_HTTP' AND OBJECT_TYPE
='PACKAGE';
OWNER
------------------------------
SYS
SQL> declare
2
3 req sys.utl_http.req;
4
5 begin
6 null;
7 end;
8 /
PL/SQL procedure successfully completed.
SQL>
Depends on whic user you are running it with... -
There exists a public synonym for UTL_HTTP so I didn't think I would need to prefix it with SYS.
I got the following error when I ran your code
ORA-06550: line 3, column 6:
PLS-00201: identifier 'SYS.UTL_HTTP' must be declared
ORA-06550: line 3, column 6: -
Does the user you are logged in as have privilege to execute UTL_HTTP? There is a public synonym for UTL_HTTP but PUBLIC does not, by default, have execute privilege on UTL_HTTP.
-
I am doing this through the sql command line (Wont have access to any other interface until tomorrow) in APEX after logging in as system.
-
Out of the box, SYSTEM does not have execute privilege on UTL_HTTP in XE
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 25 00:28:09 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> desc utl_http
PROCEDURE ADD_COOKIES
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
COOKIES TABLE OF RECORD IN
.
.
.
PROCEDURE WRITE_TEXT
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
R RECORD IN/OUT
URL VARCHAR2(32767) IN/OUT
METHOD VARCHAR2(64) IN/OUT
HTTP_VERSION VARCHAR2(64) IN/OUT
PRIVATE_HNDL BINARY_INTEGER IN/OUT
DATA VARCHAR2 IN
SQL> conn system
Enter password:
Connected.
SQL> desc utl_http
ERROR:
ORA-04043: object "SYS"."UTL_HTTP" does not exist -
Thankyou this does seem to be the problem in this case. I will probably have to wait until I have access to the machine to grant this privelege since the only access I have now is remotely through APEX.
This discussion has been closed.