Skip to main content

Posts

Move BLOB files into Oracle Directory

Solution: Step 1: Click  Oracle Directories  to understand about directory creation. Step 2:  Create plsql procdure  blob_to_file . It move BLOB files into respected database directories . CREATE OR REPLACE PROCEDURE blob_to_file (     p_blob     IN OUT nocopy BLOB,     p_dir      IN VARCHAR2,     p_filename IN VARCHAR2) AS   l_file utl_file.file_type;   l_buffer RAW(32767);   l_amount binary_integer := 32767;   l_pos      INTEGER           := 1;   l_blob_len INTEGER; BEGIN   l_blob_len := dbms_lob.getlength(p_blob);   -- Open the destination file.   l_file := utl_file.fopen(p_dir, p_filename,'wb', 32767);   -- Read chunks of the BLOB and write them to the file until complete.   WHILE l_pos <= l_blob_len   LOOP     dbms_lob.READ(p_blob, l_amount, l_pos, l_buffer);     ...

Oracle Directories

Step 1:  Allow user to create any directory in database . GRANT CREATE ANY DIRECTORY TO scott; GRANT DROP ANY DIRECTORY TO scott; Step 2:  Create directory . CREATE OR REPLACE DIRECTORY temp AS '/d08/temp'; Step 3:  Give access to the directory . GRANT READ, WRITE ON DIRECTORY temp TO scott; optional: (REVOKE WRITE ON DIRECTORY tmp FROM scott) Step 4:  View database directories . SELECT  *    FROM all_directories; Note: You must have DBA rights, if you don't have DBA rights, you will get an error  "Invalid Directory Path". Related Posts: Move BLOB files into Oracle Directory Check if file exists in Oracle Directory

Integration of Oracle BI Publisher 10g with Oracle Apex 4.2

Objective : To integrate Oracle BI Publisher with Oracle Apex.  Step 1:  Create a procedure using below given PLSQL coding, which integrate Oracle BI with Oracle Apex. CREATE OR REPLACE PROCEDURE "WEB_SERVICES_CALL" (    p_name1         IN  VARCHAR2 DEFAULT NULL,    p_value1          IN   VARCHAR2 DEFAULT NULL,    p_name2            IN  VARCHAR2 DEFAULT NULL,    p_value2            IN   VARCHAR2 DEFAULT NULL,    p_name3           ...