Re: How to insert wave file into Oracle8 DB?

From: srivenu <srivenu_at_hotmail.com>
Date: 6 Mar 2002 22:02:19 -0800
Message-ID: <1a68177.0203062202.433ef701_at_posting.google.com>


  1. You need to first create a Directory object like this CREATE DIRECTORY my_dir AS '/usr/home/venu'; Note: /usr/home/venu is the directory where you have placed the wave file

The DIRECTORY object enables administering the access and usage of BFILEs in an Oracle8 Server.
A DIRECTORY specifies a logical alias name for a physical directory on the server's filesystem under which the file to be accessed is located.
example

2)In the table that has the BFILE column insert the values like this INSERT INTO lob_table VALUES

         (1, BFILENAME('MY_DIR', 'song1.wav'));

3)Once physical files are associated with records using SQL DML, subsequent read operations on the BFILE can be performed using PL/SQL DBMS_LOB package and OCI. However, these files are read-only when accessed through BFILES, and so they cannot be updated or deleted through BFILES.

For more details on using the DBMS_LOB package, refer to this URL http://technet.oracle.com/doc/server.804/a58241/ch_lob.htm#1106

Best of luck Received on Thu Mar 07 2002 - 07:02:19 CET

Original text of this message