How to insert 10 files from a directory to database,can i use dbms_lob??

Hii
I want to load 10files in my local drive into a table...how to do this.I'm able to do this individually using dbms_lob.loadfromfile and bfil but ,I want to copy all the files i that drive at time to my table...Is there any way to do this..?

Okay... Here is some sample code that will help you store the files in binary format into db tables.
create table t_blob(bid integer, blbdata blob);
select * from t_blob;
create or replace directory ext_tab_dir as 'C:\Oracle\ExtTab_Dir';
grant read, write on directory ext_tab_dir to priya;
declare
      src_file bfile;
      dest_file blob;
      len_file pls_integer;
begin
      src_file:=bfilename('EXT_TAB_DIR','XML.doc');
      insert into t_blob values(1,empty_blob()) returning blbdata into dest_file;
      select blbdata into dest_file
        from t_blob
       where bid=1 for update;
      dbms_lob.fileopen(src_file,dbms_lob.file_readonly);
      len_file:=dbms_lob.getlength(src_file);
      dbms_output.put_line(len_file);
      dbms_lob.loadfromfile(dest_file,src_file,len_file);
      update t_blob
         set blbdata = dest_file
       where bid = 1;
      dbms_lob.fileclose(src_file);
end;
/I haven't used the wrap utility yet, so not much hands on with it. I guess the wrap utility at the OS level. Not sure if it will work at SQL prompt.

Similar Messages

  • How to pick files from ECC directory

    Hi All,
    I have to pick files from the directory of ECC. can anyone tell me how to configure the sender File apapter? Can i use NFS for the same?
    Regards,
    Lavanya R

    Hi Lavanya,
    With my knowledge two ways to pick the file from ECC using File adapter.
    1. If you use NFS, mount point should be created in ECC for the Directory to access from PI.
    2. If you use FTP, FTP ports must be opened between PI and ECC.

  • How to read files from MIT-BIH arrhythmia database using labview

    hello friends,
    How can i read the files from MIT-BIH arrhythmia database using labview 8.6. These file extensions are in different format ie is .atr, .dat and .hea
     The link for the following database is below, any example vi for reading this data in labview would be very useful.
    http://www.physionet.org/physiobank/database/mitdb​/
    Message Edited by infra444 on 01-27-2009 07:01 AM

    You will find some help here.
    http://www.physionet.org/physiotools/matlab/#wfdb
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • How to transfer file from PC to PC via serial port using labview

    I need to transfer files(.txt, .doc, .xls) from PC to PC via serial port using LabVIEW. Is it possible to transfer files, if so how to transfer?
    Solved!
    Go to Solution.

    Yes, it is possible to transfer files with the serial port using LabVIEW.  Files are just collections of bytes and the serial port is pretty good at shipping bytes from one PC to another.  You need to connect the serial ports together with a null modem cable.
    First, take a look at the example for serial communication.   In LabVIEW, go to the Help menu and select "Find Examples...".  From there you can search for "serial" or navigate to Hardware Input and Output >> Serial.  Select the "Basic Serial Write and Read.vi".  Experiment with that example to gain confidence on the serial communication methods.
    Next, it's time to learn about how to read and write files.  For that, the examples could be somewhat confusing since they all deal with files that are presumed to have data of a specific type in them.  I would recommend just getting familiar with the functions on the File I/O palette.  Specifically, get to know the following functions.
    Open/Create/Replace File - On your destination side, you'll need to create the copy of the file that you are trying to transfer
    Close File - When you are finished reading from or writing to a file, you should close it.  It cleans up the memory being used and finalizes any write operations that are still floating in the write buffer.
    Read From Binary File - The best way to read from a file when you do not really care what type of file it is.  In your case, you just want to get those bytes read and sent out so they can be written down at the destination.
    Write to Binary File - At the destination side, this is what will store those bytes to the file you created with number 1.
    Get File Size (under the Advanced File Functions sub-palette) - You need to know how big the file is so you know when you are finished.
    OK, so once you are able to create files, write bytes to them, and read bytes from existing files you can move on to transferring.
    The basic method I would suggest is to have the user specify a source file on the source PC and a destination folder on the destination PC.  Then, find out the size of the source file using number 5.  Divide that size number by the number of bytes you feel like transferring at once.  The serial buffers are usually around 32k (if I remember correctly) so do not exceed that.  Now begin sending data by reading some number of bytes and wiring that string output to the VISA Write function.  On the destination side, you'll want to be monitoring the serial port for bytes and reading them when they arrive.  Wire that string to the Write to Binary File function to add them to your destination file.
    That is the basic outline of how to do it.  You have to be careful not to overload the write and read buffers on the serial ports.  Initially you can use delays on the sending side to make sure the reading side has enough time to digest.  To get things moving faster, you can bring in some flow control.
    If all that sounds a bit intimidating, there are Alliance Member companies out there (such as PrimeTest Automation) who can write such code for you and even provide a turnkey solution for you.
    Happy wiring,
    Dan Press
    Certified LabVIEW Architect
    PrimeTest Automation

  • How to upload file from client machine to  database in server machine?

    I am developing a web application. this application is suppose to take file from client machine and store that to database in the server side.
    My jsp form is of multi part type. but I am confused about what to write in servlet.
    Can any one help me ?
    Edited by: chinmaya_mishra on Feb 16, 2009 2:55 AM
    Edited by: chinmaya_mishra on Feb 16, 2009 2:58 AM

    http://www.google.com/search?q=jdbc+blob
    Blob processing varies between databases; see also examples for whatever database you are using, e.g.
    http://www.google.com/search?q=jdbc+blob+oracle
    If you are storing text data instead of binary data, replace "blob" by "clob" in the searches.

  • How to read files from current directory for applet

    I have an applet that needs to read some audio files located in its current directory on the server and I just can't seem to figure it out...maybe I am being dumb...any help?

    You can use the ListSorter File Adapter Configuration property to sort based on timestamp. Basically add the following property to the inbound JCA file:
    <property name="ListSorter"
    value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"/>
    <property name="SingleThreadModel" value="true"/>
    More info see section 4.2.6 in http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm

  • How to insert data from a table to database

    Hi all,
    My problem statement is that:
    I have jsp page, which has a table with some columns editable for inserting data. I am using MySql database.
    Now when I insert the data in the table and click submit button , the data entered must get stored in the database.
    If its a single data I can do it , but how to do for mulitple rows or columns.
    Please suggest me a solution
    Regards,
    Suraj

    i did one program similar to this requirement. when the rows and columns are fixed then what is the problem.
    use java script and capture all the values into an array and pass this to servlet and there call a method which will set
    the bean objects. or else no need to pick the array directly pass all the parameters and set the beans by retrieving these
    parameters(request.getParameter()).
    Diablo

  • To pick files from multiple directory in FILE ADAPTER

    Hi all,
    Is their any settings or adapter configuration parameters to be used  to pick  the files from multiple directory .

    Hi,
    You can only specify one directory on the communication channel. The advance selection allows the selection of different files within this directory.
    Therefore you will need a communication channel for each directory you wish to pull files from.
    (Just looked at the blog and see it is possible after all - I'm on the wrong SP)
    Kind regards
    Colin.
    Message was edited by:
            Colin Bickell

  • Anyone knows how to delete a file from a directory?????

    hi there
    anyone has any idea on how to delete a file from a directory? delete(String filename)? thank you.

    Hi,
    Check this link.
    Gives you an example code to show how to delete a file.
    http://examples.oreilly.com/jenut/Delete.java
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How can I create a array with all files from a directory

    How can I create a array of files or varchar with all files from a directory?

    I thought the example could be improved upon. I've posted a solution on my blog that doesn't require writing the directory list to a table. It simply returns it as a nested table of files as a SQL datatype. You can find it here:
    http://maclochlainn.wordpress.com/2008/06/05/how-you-can-read-an-external-directory-list-from-sql/

  • How to insert data from *.dmp file to  oracle 11g using Oracle SQL Develope

    hi
    i backup my database using PL/SQL developer and made *.dmp file
    how to insert data from *.dmp file to oracle 11g using Oracle SQL Developer 2.1.1.64
    and how to make *.dmp file from sql*plus ?
    thanks in advance

    Pl/Sql developer has a config window, there you choose the exec to do the import/export.
    Find it and his home version, it may be exp or expdp, the home version is the version of the client where the exp executable is.
    Then use the same version of imp or impdp to execute the import, you do not need to use Oracle SQL Developer 2.1.1.64. If you want to use it, you must have the same version in the oracle home that exp/imp of sql developer use.

  • How do i move a file from one directory to another?

    Can anyone help me in moving a file from one directory to another?
    The following code just does not work!!
    File source_file = new File(source_file);
    if(source_file.exists())
    File dest_file = new File(destination_file);
    if(!dest_file.exists())
    boolean moved = source_file.renameTo(dest_file);
    System.out.println("moved.."+moved);
    The varirable moved is always false.
    Can anyone tell me whts wrong in this code?

    The problem in your code is you used file object as argument when you create a new File. I changed a little bit codes and it should be fine now.
    String source_file1="test111.txt";
    String destination_file1="test222.txt";
    try{
         File source_file = new File(source_file1);
         if(source_file.exists())
              File dest_file = new File(destination_file1);
              if(!dest_file.exists())
                   boolean moved = source_file.renameTo(dest_file);
                   System.out.println("moved.."+moved);
    catch(Exception e){
               e.printStackTrace();
    }

  • HT1379 Summary: how to transfer files from SD card when the system (Mac OS X v 10.7.5) will NOT recognize SD cards.

    How to transfer files from SD card when the system (Mac OS X v 10.7.5) will NOT recognize SD cards?
    Insert the SD card.
    System opens iPhoto with SD contents.
    Want to transfer files from SD card to system drive.  iPhoto closes
    SD card directory removed from the Finder window and is not available again. 
    I don't want to have to reboot the system every time I want to perform this option.
    What's wrong here. 
    The support columns show this isn't an isolated incident with all sorts of solutions possible.
    This is a simple task - there should be a simple method for the system to recognize SD cards.
    What's the answer?
    I've reviewed a recommendation to reset the SMC.
    https://discussions.apple.com/message/18500187#18500187
    and
    http://support.apple.com/kb/HT3964
    and another thread that says, basically, you must buy extra hardware to perform this simple task,
    https://discussions.apple.com/message/16911326#16911326
    another one that has the same problem with OS Mountian Lion,
    https://discussions.apple.com/message/21919740#21919740
    another one with the problem that says SD cards can't be read by Apple unless the card is formatted specifically for Apple, ie. that Apple is not compatible with other cards, but the problem maybe something else that requires Apple service - (bad SD card reader?).
    https://discussions.apple.com/message/18711818#18711818
    there are probably more discussions, but I dont' want to spend my entire sunny in Seattle day working this.
    thanks for the help!

    Bucky Fullmeister wrote:
    When I plug in an SD card, the finder window shows it under the DEVICES section.  At this point, I can drag the contents to the hard drive.  However, when I screw up and click the character on the right side of the name - it apparently closes the SD card and I can't find any command to reload or re-recognize the card.  I have to remove and reinsert the card and then sometimes it recognizes the card.  Other times I reboot and it will recognize it.
    What does that character on the right side of the SD card name do?  Is it an eject function - with no way to subsequently reread the drive?
    It ejects or unmounts the card. When the SD card mounts click on it once to highlight it and then drag the files shown within it to the new folder.
    Pete

  • HOw to delete files from remote server?

    Hi,
    I want to delete files from a directory on remote server.
    I use the following command to delete on current server:
    find $srcdir -mtime +90 -name "COR*.txt" -exec rm -f {} \;
    Now, how can I delete files from remote server ?
    Thanks!
    Yogini

    Some possible options:
    1. There exists SSH implementation for Windows.
    2. You can make a workaround. You can setup share for specific/wanted directory.
    Then you can mount it on Linux machine and execute command localy and delete files "localy" in mounted directory.
    3. You can setup FTP server on Windows machine and do that remotely via FTP commands.

  • How to list files from .jar file in applet?

    I have created applet and export all files to .jar file.
    I use File.list() method in applet to list files from one directory and that works ok but if I try to do that from web browser it sends exception AccessDenied meaning that File.list() isn't allowed in browser.
    I know what's the problem but I don't know how to solve it.
    What I want is to read from directory list of files.
    Help anyone?

    I will post here my code so that can be seen what I want to do:
    import java.awt.BorderLayout;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.URLClassLoader;
    import java.nio.charset.Charset;
    import javax.swing.JApplet;
    import javax.swing.JPanel;
    import javax.swing.JTextPane;
    public class test extends JApplet {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JTextPane jTextPane = null;
          * This is the xxx default constructor
         public test() {
              super();
          * This method initializes this
          * @return void
         public void init() {
              this.setSize(449, 317);
              this.setContentPane(getJContentPane());
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new JPanel();
                   jContentPane.setLayout(new BorderLayout());
                   jContentPane.add(getJTextPane(), BorderLayout.CENTER);
              return jContentPane;
          * This method initializes jTextPane     
          * @return javax.swing.JTextPane     
         private JTextPane getJTextPane() {
              if (jTextPane == null) {
                   jTextPane = new JTextPane();
              return jTextPane;
         public void start(){
              File fileDir= new File("somedirectory");
              String strFiles[]= fileDir.list();
              String a="";
              for(int i =0;i<strFiles.length;i++){
                   a=a+strFiles;
              this.jTextPane.setText(a);
    Method init() is irelevant, it just adds JTextPane in applet.
    Method start() is relevant, it runs normaly when started from Eclipse but from browser it sends exception AccessDenied.

Maybe you are looking for

  • Motion not opening correctly

    When I open Motion I select what preset I need (PAL DV), click ok....then nothing. The programme is open but I have no Project Pane, Library, etc etc. I know you can go to Window/show project pane or press the 'F' keys to open windows but they still

  • Product key code is invalid

    I try to install Crystal reports XI release 2 fron DVD and received Key code expired or invalid. What caused this? I know key code is valid. Is product keycode associated with CD? Thanks jann Lin

  • Scrolling in adobe 9

    since the update to adobr 9 I have not been able to scroll through pages using the scroll wheel on the mouse. When using the scrolling wheel the page will resize

  • Doubt login as sysdba

    hi gems... i have noticed that : sqlplus yugtyugy/ssarhb as sysdba (means any garbage value as username and password) is allowed and all operations can be done such as startup and shutdown or backup....how is it possible???? is there any problem with

  • Link to older version of Itunes?

    I'm one of the ones who "upgraded" to a non-functional Itunes 7.6.1. I can't find a download to revert to an older version of Itunes. Does anyone have one? Also how do I uninstall Itunes 7.6? Thanks, Anthony