There are different packages using which you can check whether a file exists on the database / application server. The different ways are 1. Using UTL_HTTP from Web Server 2. Using UTL_FILE from Database Server 3. Using DBMS_LOB from Database Server 1. You can also use UTL_HTTP package to check whether a file exists on a web server from the database. SET SERVEROUTPUT ON DECLARE url VARCHAR2(256) := 'http://www.oracle.com/index1.html'; username VARCHAR2(256); password VARCHAR2(256); req UTL_HTTP.REQ; resp UTL_HTTP.RESP; BEGIN req := UTL_HTTP.BEGIN_REQUEST(url); IF (username IS NOT NULL) THEN UTL_HTTP.SET_AUTHENTICATION(req, username, password); END IF; resp := UTL_HTTP.GET_RESPONSE(req); DBMS_OUTPUT.PUT_LINE('response -->' || resp.status_code); END; / If the f...
The Blog contains the New Features, Tips on usage of SQL and PLSQL.
Comments
Post a Comment