Error
Error Code:
ORA-29264
Oracle Error ORA-29264: Invalid URL Scheme
Description
The ORA-29264 error in Oracle Database indicates that the URL scheme used in a network operation is either unknown or not supported by the database. This error typically occurs when using packages like `UTL_HTTP` or `UTL_SMTP` with an invalid or unrecognized URL.
Error Message
ORA-29264: unknown or unsupported URL scheme
Known Causes
4 known causesInvalid URL Scheme
The URL begins with a scheme that is not recognized or supported by the `UTL_HTTP` or related packages. This commonly includes typos or using custom schemes.
Missing Scheme
The URL lacks a proper scheme specifier (e.g., `http://`, `https://`, `ftp://`). The database requires a valid scheme to determine how to handle the request.
Unsupported Protocol
The specified URL scheme is not supported by the Oracle Database version or the configured network services. Some less common schemes may not be implemented.
Configuration Issues
Incorrect network configuration or restrictions on the database server may prevent certain URL schemes from being accessed. This could include firewall rules.
Solutions
3 solutions available1. Verify URL Scheme and Syntax easy
Ensure the URL provided to UTL_HTTP uses a supported scheme like HTTP or HTTPS.
1
Review the URL string being passed to the `UTL_HTTP` package procedures (e.g., `UTL_HTTP.REQUEST`, `UTL_HTTP.REQUEST_PIECES`). The ORA-29264 error typically occurs when the scheme (e.g., `ftp://`, `file://`, `mailto://`) is not recognized by `UTL_HTTP`.
SELECT UTL_HTTP.REQUEST('http://example.com') FROM dual;
-- Or for HTTPS:
SELECT UTL_HTTP.REQUEST('https://example.com') FROM dual;
2
Confirm that the URL starts with either `http://` or `https://`. If you intend to use a different protocol, `UTL_HTTP` is not the appropriate package. Consider using other Oracle features or external tools for protocols like FTP or file access.
Invalid URL: SELECT UTL_HTTP.REQUEST('ftp://example.com/file.txt') FROM dual;
-- Valid URL: SELECT UTL_HTTP.REQUEST('http://example.com/resource') FROM dual;
2. Configure Network Access for UTL_HTTP medium
Ensure the Oracle database server can resolve and connect to the specified URL.
1
Verify that the database server has network connectivity to the target URL. This involves checking firewalls, DNS resolution, and general network reachability from the database server's operating system.
# On the database server OS (Linux/Unix example)
ping example.com
telnet example.com 80
2
If you are using `https://`, ensure that the Oracle Wallet is properly configured and contains the necessary root certificates to trust the SSL/TLS certificate of the target server. The database needs to be able to validate the server's identity.
SQL> EXEC UTL_HTTP.SET_WALLET('file:/path/to/your/wallet', 'wallet_password');
3
If the target server is behind a proxy, configure `UTL_HTTP` to use the proxy. This is done using `UTL_HTTP.SET_PROXY`.
SQL> EXEC UTL_HTTP.SET_PROXY('proxy.example.com:8080');
3. Check Oracle HTTP Server (OHS) or WebLogic Configuration advanced
If UTL_HTTP is being proxied or managed by OHS/WebLogic, their configurations might be relevant.
1
If `UTL_HTTP` requests are being routed through an Oracle HTTP Server (OHS) or Oracle WebLogic Server, review the proxy configurations within those servers. Ensure they are correctly set up to forward or handle the requests to the target URLs.
Example OHS httpd.conf directive for proxying:
<VirtualHost *:80>
ServerName your_db_server
ProxyPass /app http://target_app_server/app
ProxyPassReverse /app http://target_app_server/app
</VirtualHost>
2
In WebLogic, check the proxy settings within the WebLogic Server console or domain configuration files if the database is configured to use WebLogic for outbound HTTP requests.
Refer to Oracle WebLogic Server documentation for specific proxy configuration steps.