SQL Loader: How to load binary files

Hi All,
I need to load a binary file into the database (BLOB) using SQL Loader. What I have are only two files. The first file is an attributes file that contains the file names, the file sizes, the file descriptions, etc. The second file is a binary file that contains ALL the files described in the attributes file. They are concatenated in the same order that the attributes file names them.
This data load is different from any other that I've encountered before because I am familiar with loads that have separate files.
I'm sorry if this is not the right board to post this question, but I'd greatly appreciate any help.
Regards,
mike six

Check out following link. It might be of help.
http://www.oracle-base.com/forums/viewtopic.php?p=7680

Similar Messages

  • How to upload binary file in database?

    Using servlets..how to upload binary file into database...
    How to get the data of file in servlet...
    Please reply...i'm unable to find exact code...that i want..

    You need to do two separate parts: accept the file from a HTTP multi-part POST and then stream it into a BLOB on the database. To do the former, download Jakarta Commons FileUpload. There is extensive documentation on how to write a simple handler for the upload. You then need to send the data to a BLOB. The specifics vary from database to database but generally you will insert or update a row with an empty blob, get a reference to the blob, pipe the data and then commit.
    If you do a quick forum search, this question has been asked (and answered) dozens of times. Some of the replies may even have code for you. Best of luck.
    - Saish

  • SQL*Loader - How to load only a few columns from a .csv file to ora table

    Hi there,
    Could anyone please let me know how to load few columns from a .csv
    file into a oracle table using SQL*Loader.
    I know how to create a .dat and .ctl file and run the sql loader.
    Suppose I have a .csv file with
    col1, col2, col3, col4
    and I only need to load col1 and col3 into col_a and col_b respectively
    in table_a?
    structure of table_ a
    col_a,
    col_b
    Please advice

    Try like..it i will work..
    LOAD DATA
    INFILE 'test.txt'
    LOAD DATA
    TRUNCATE INTO TABLE T1
    FIELDS TERMINATED BY ','
    (col1,
    col2 FILLER,
    col3,
    col4 FILLER
    )

  • SQL*Loader: How to load multi-line report data?

    Hi,
    is it possible to use SQL*Loader to load data from a hierarchical structured fixed column ASCII file like this
    001 scott
    New York 01.01.2002 1234
    Chicago 15.10.2001 9876
    002 smith
    Los Angeles 24.12.1999 5678
    Washington 01.12.1999 0000
    Chicago 01.01.2000 1111
    into one database table:
    id name city day code
    001 scott New York 01.01.2002 1234
    001 scott Chicago 15.10.2001 9876
    002 smith Los Angeles 24.12.1999 5678
    002 smith Washington 01.12.1999 0000
    002 smith Chicago 01.01.2000 1111
    The number of lines per name is unlimited, the next line starts after a separating ---- line.
    We cannot change the format of the text file to import.
    There is an example in the documentation that shows how to load a structure like the following via insert triggers:
    001 scott New York 01.01.2002 1234
    Chicago 15.10.2001 9876
    002 smith Los Angeles 24.12.1999 5678
    Washington 01.12.1999 0000
    Chicago 01.01.2000 1111
    But we have the name information on a separate header line, so I don't know if we can use a similar technique here.
    regards
    Sven

    Try enclosing your strings with e.g. a double-quote. To do so, the control file needs the following (example):
    LOAD DATA
    REPLACE
    INTO TABLE test          
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    id1,
    id2,
    id3,
    id4,
    )of course this does mean that your data must change...
    L.

  • How to handle binary file at the time of import in javacvs

    hi ,
    I am using netbean api for cvs command.I am having the same problem that i am not able to open binary file after importing in cvs repository.
    I want to import a directory which contain both text and binary file.
    can you please hel me out to how to import a directory which contain binary files.
    MY CODES
    ImportCommand command = new ImportCommand();
    Map wrapperMap = new HashMap();
    String filenamePattern="*.ppt";
    KeywordSubstitutionOptions keywordSubstitutionOptions;
    Object b= KeywordSubstitutionOptions.BINARY;
    wrapperMap.put(new SimpleStringPattern(filenamePattern),b);
    command.addWrapper(filenamePattern,org.netbeans.lib.cvsclient.command.KeywordSubstitutionOptions.BINARY);
    command.setWrappers(wrapperMap);
    command.setModule(module);
    command.setLogMessage(comment);
    command.setReleaseTag(releaseTag);
    command.setImportDirectory(path);
    client.setLocalPath(path);
    command.setVendorTag(vendorTag);
    result = client.executeCommand(command, globalOptions);
    Regards
    ruchira

    Please don't cross post.
    http://forum.java.sun.com/thread.jspa?threadID=5127696&tstart=0

  • How to convert binary file to a particular format?

    Hi,
    I am having a requirement. I have in database various kinds of files stored as binary format. Its a sybase database. Now the files can be .pdf, or .doc also. But they are stored in binary format.
    I need to read the file from database.
    Now I can use jdbc to read the particular column value which contains the file in binary format.
    But tricky part is how to convert the binary file entry in a proper respective file format? So I have another column which basically has the value to tell the type of file. So I have ".doc" or ".pdf" as each entry of file...
    So please help me how can we do this using Java?
    THanks

    Hi,
    I am having a requirement. I have in database various
    kinds of files stored as binary format. Its a sybase
    database. Now the files can be .pdf, or .doc also.
    But they are stored in binary format.
    I need to read the file from database.
    Now I can use jdbc to read the particular column
    value which contains the file in binary format.
    But tricky part is how to convert the binary file
    entry in a proper respective file format? So I have
    another column which basically has the value to tell
    the type of file. So I have ".doc" or ".pdf" as each
    entry of file...
    So please help me how can we do this using Java?
    THanks

  • How to Convert binary file to s-records

    Hi all,
    can anybody help how to convert binary ".bin" files to s-record ".s" files
    any idea or code snippets are very appreciated
    best regards,
    gebi

    There is a ready-made converter: "BINARY to Motorola S-Record Conveter Utility" or BIN2MOT.
    http://www.keil.com/download/docs/bin2mot.zip.asp
    Other references:
    http://www.cs.net/lucid/moto.htm
    http://www.amelek.gda.pl/avr/uisp/srecord.htm
    http://www.seattlerobotics.org/encoder/jun99/dougl.html
    http://semmix.pl/mipc/specyf/filehex/mhexu.htm
    http://pmon.groupbsd.org/Info/srec.htm

  • How to parse binary files

    Hi All,
    I have one binary file (abc.dat) file I want to parse that file and need it in text format.
    Can anyone tell me how can I achieve that? is there any third party tools available?
    lines are like below:
    00000000h: 76 04 00 01 00 FF 0F 11 FF 09 07 03 15 ; v....
    can anyone have idea how can i resolve this?
    Thanks!!!

    Hi
    thanks for reply...
    actually what I want is a line that I have posted in first conversation the whole file has lines like that. Now, I want to convert that file in to text format.
    right now I am reading lines with the below code...
    try{
                   FileInputStream fstream = new FileInputStream("test.dat");
                   DataInputStream in = new DataInputStream(fstream);
                   BufferedReader br = new BufferedReader(new InputStreamReader(in));
                   //BufferedInputStream bufferedInputStream = new BufferedInputStream(in);
                   String strLine;
    //               Read File Line By Line
                   while ((strLine = br.readLine()) != null) {
    //                Print the content on the console
                   System.out.println (strLine);
    //               Close the input stream
                   in.close();
                   }catch (Exception e){//Catch exception if any
                   System.err.println("Error: " + e.getMessage());
                   }and I don't get output in the text format.
    So, after doing this can anyone please tell me how can I get decoded format file?
    what are the next steps I should go?
    For, example we can go for (index.dat) file.
    Thanks!!!

  • How to read binary file in Matlab

    "Hello all!
    Labview 7.0 has an example "Cont Acq to File (binary).vi" log the PCI 6014 card and writes the data to a binary file. How can I read that
    file in Matlab(6.5.0... R13)? Does anyone have a solution for this?

    Hello,
    Basically you can do it by saving the data in a file in MATLAB and reading it directly from LabVIEW, or vice versa. In MATLAB , the command "save" allows you to save the data in binary format (*.mat) or ASCII format. You also have an option of saving it in ASCII format using a tab delimiter between data points.
    There is a knowledge base which talks in detail about how to share data in between labview and matlab Import data from labview to Matlab and vice versa.
    Hope this helps. If not, please feel free to ask more questions.
    Good luck and have a great day!
    Koninika
    National Instruments

  • How to read binary file ?

    Hi All,
    I want to read a binary file which has double data. The first byte is an unsigned byte. I have tried using DataInputStream readUnsignedByte method. But then how to convert this value into double.
    int hdop = _data.readUnsignedByte();

    Hi,
    I have managed to read the first byte i.e hdop. I am getting the values of first 2 bytes properly. But the values where I have to read more than 1 byte is creating problem. Can anyone let me know whats wrong in the code?
    import java.io.DataInputStream;
    import java.io.FileInputStream;
    import java.util.Vector;
    public class SBPParser {
         //RandomAccessFile _file = null;
         FileInputStream _file = null;
         DataInputStream _data = null;
         int eofmark = 0;
         public SBPParser(FileInputStream f, DataInputStream d) {
              _file = f;
              _data = d;
         public void parseSBPFile() {
              try {
                        int hd = _data.readUnsignedByte();
                        double douhd = (hd & 0xff) * 0.2;
                        int svid = (_data.readUnsignedByte()) & 0xff;
                        int utcsec = _data.readUnsignedShort();
                        double utcs = (utcsec & 0xff) * 0.001;
                        int utc = Integer.parseInt(utcdatetime);
                        int sec = utc & 0xFC000000;
                        int min = utc & 0x3F00000;
                        int hour = utc & 0xF8000;
                        int day = utc & 0x7C00;
                        int months = utc & 0x3FF;*/
                        int utc = _data.readInt();
                        int sec = utc & 0xFC000000; //For fetching first 6 bits
                        int min = utc & 0x3F00000;  //For fetching next 6 bits
                        int hour = utc & 0xF8000;    //For fetching next 5 bits
                        int day = utc & 0x7C00;   //For fetching next 5 bits
                        int months = utc & 0x3FF; //For fetching next 10 bits
                        int svidlist = (_data.readInt()) & 0xff;
                        int lat = (_data.readInt()) & 0xff;
                        double latitude = lat * 0.0000001;
                        int lon =(_data.readInt()) & 0xff;
                        double longitude = lon * 0.0000001;
                        int alt = (_data.readInt()) & 0xff;
                        System.out.println("Value of Hdop ==> " + douhd);
                        System.out.println("Value of SVIDCnt ==> " + svid);
                        System.out.println("Value of UtcSec ==> " + utcs);
                        System.out.println("Value of seconds ==> " + sec);
                        System.out.println("Value of minutes ==> " + min);
                        System.out.println("Value of hours ==> " + hour);
                        System.out.println("Value of day ==> " + day);
                        System.out.println("Value of months ==> " + months);
                        System.out.println("Value of SVIDList ==> " + svidlist);
                        System.out.println("Value of Latiutude ==> " + latitude);
                        System.out.println("Value of Longitude ==> " + longitude);
                        System.out.println("Value of Altitude ==> " + alt);
                        //_data.skipBytes(31);
              } catch(Exception e) {
                   e.printStackTrace();
         public void print() {
              for(int i = 0; i < hdopVct.size(); i++) {
                   System.out.println("HDOP => " + hdopVct.elementAt(i));
              /*System.out.println("SVIDCNT => " + svidlistVct.elementAt(0));
              System.out.println("UTCSEC1 => " + utcsecVct.elementAt(0));
              System.out.println("UTCSEC2 => " + utcsecVct.elementAt(1));*/
         public static void main(String [] args) {
              try {
                   FileInputStream file_input = new FileInputStream("000000000_GPSLOG_20090605_122548.sbp");
                  DataInputStream data_in    = new DataInputStream (file_input);
                   SBPParser sbp = new SBPParser(file_input, data_in);
                   sbp.parseSBPFile();
                   //sbp.print();
              } catch(Exception e) {
                   e.printStackTrace();
    }Thanks & Regards
    Sunil

  • How to read binary files wrt specific BYTE size and length??

    Hello Everyone,
                                I have a project I want to accomplish. I have a binary file, and I would like to read the data and print on wfm in a specific order and size.
    The data is 16 bit binary type , and needs to be read in chunks of 2 bytes.
    i have 30 bytes of sample 1.
    followed by 2 bytes of sample 2.
    followed by another 2 bytes of sample 3.
    steps 2-4 should be repeated 10 times and then i should read sample 4 which is of 2 bytes.....
    How should I do it?? I don't have any VI build... all i have is the example VI...
    can anyone pleasehelp me???
    Now on LabVIEW 10.0 on Win7

    smercurio_fc, sorry for the confusion, i will try my best to explain...
    1. No, i don;t have to read the file again, once it has read, I used
    while loop just to see the data updating (i press run, and before i can
    visualize i have the waveforms; i can get rid of the while loop)
    2. I have 30 different values of 1 sample. actually, the data is cmg
    from tri-axial accelerometer; each axis is of 10 bytes(hence 3*10 =
    30bytes)
    3. I am repeating the steps 2-4 10 times because the data was written
    into the binary file after 10 times sampling the sensors(if first 3
    samples are read @ 1000hz, sample 4 was read at 1000/10 = 100hz)
    4. I am using the graphs to interpret the values, that's it. The
    values are already scaled when they were wrote to the binary file, I
    have to simply interpret it.
    I have made some changes in the VI, now i am reading only the first
    30bytes, that too, in chunks of 10-10-10 bytes, and plotting the 3
    samples simultaneously on a waveform chart. (will approach 1
    sensor/sample at a time) and running the loop for 10 times. I have changed I8 to I16 now.
    Please let me know if it makes sense to you now.
    P.S. each sample is a sensor data.
    Now on LabVIEW 10.0 on Win7
    Attachments:
    data_read.vi ‏24 KB

  • How to read binary file in developer 2000

    Hi,
    Is there any method through which i can read a binary file(pdf)
    in developer 2000
    Thanks in advance

    Hello,
    Basically you can do it by saving the data in a file in MATLAB and reading it directly from LabVIEW, or vice versa. In MATLAB , the command "save" allows you to save the data in binary format (*.mat) or ASCII format. You also have an option of saving it in ASCII format using a tab delimiter between data points.
    There is a knowledge base which talks in detail about how to share data in between labview and matlab Import data from labview to Matlab and vice versa.
    Hope this helps. If not, please feel free to ask more questions.
    Good luck and have a great day!
    Koninika
    National Instruments

  • How to determine binary file data set size

    Hi all
    I am writing specific sets of array data to a binary file, appending each time so the file grows by one data set for each write operation.  I use the set file position function to make sure that I am at the end of the file each time.
    When I read the file, I want to read only the last 25 (or some number) data sets.  To do this, I figured on using the set file position function to place the file position to where it was 25 data sets from the end.  Easy math, right ?  Apparently not.
    Well, as I have been collecting file size data as I have started the initial tet run, I am finding the the file size (using file size command and getting number of bytes as a result) that the size is not growing the same amount every time.  My size and format of my data being written is identical each time, an array of four double precision numbers.
    The increments I get are as follows, after first write - 44 bytes, after 2nd - 52 bytes, 3rd - 52 bytes, 4th 44 bytes, 5th - 52 bytes, 6th - 52 bytes, 7th - 44 bytes and it appears to maintain this pattern going forward.
    Why would each write operation not be identical in size of bytes.  This means that my basic math for determining the correct file poistion to read only the last 25 data sets will not be simple and if somewhere along the line after I have accumulated hundreds or thousands of data sets, what if the pattern changes.
    Any help on why this is occuring or on a method of working around the problem would be much appreciated.
    Thanks
    Doug
    Doug
    "My only wish is that I am capable of learning each and every day until my last breath."
    Solved!
    Go to Solution.

    I have stripped out the DSC module functions from the vi and attached it here.  I also set default values to all the inputs so it will run with no other inputs.  I also included my current data files (zipped as I have four of them) though the file names are hard coded in the vi so they can be changed to whatever works locally. In fact probably will have to be to modified for the path anyway.
    If you point to a path that has no file, it will create a new one on the first run and the file size will show zero since there is no data in it. It will start to show the changes on each subsequent run.
    As I am creating and appending four different files, each with it's own set of data but always the same format (array of four double precision numbers) and the file size information always increments the same for all four files (as will be seen in the File Size Array) I don't think it is a function of the size of the acutal numbers but something idiosyncracy with how the binary file is created.
    If this proves to be a major hurdle I guess I could try a TDM file but I already got everything else working with this one and need to move on to other tasks.
    Thanks for any continued assistance
    Doug
    Doug
    "My only wish is that I am capable of learning each and every day until my last breath."
    Attachments:
    !_Data_Analysis_Simple.vi ‏40 KB
    SPC.zip ‏2 KB

  • How to create Binary File

    Hi all,
    Please can anybody tell how to crate a Binary file in Java? because I have to convert a MP3 file into a binary file and store it into a Database as binary value.
    Thanks in advance
    -Nelson

    jwenting wrote:
    paulcw wrote:
    An MP3 file is already in a binary format.
    Binary basically just means "not text".strictly speaking a text file is also binary, in that it's in the end just a stream of bits interpreted in a specific way :)It's like saying "animal" as opposed to "human". Strictly speaking, humans are a subset of animals, but when people say "animal" they usually mean the set of animals minus the set of humans.

  • How to display binary file saved in BLOB column in Discoverer PLUS /VIEWER

    HI, Friends,
    I tried to display the binary file saved in the database in BLOB column with the *.doc or *.xls fomats, but it seemed not work at all. I can display them in discoverer DESKTOP, but not the web version PLUS or VIEWER. MY Discoverer PLUS/VIEWER version is 9.0.4.45.02 and the database is 9.2.0.4. Are there any special setting/configuration in somewhere (Discoverer administration/Applicaiton server/PLUS/VIEWER?)
    Any help /information will be greatly appreciated.
    Thanks a lot.

    Hi,
    Sorry but this feature is not available in the web version of 9.0.4.45. You will have to write your own mod_plsql function to download the file.
    Rod West

Maybe you are looking for

  • Why FaceTime does not supported in my i-phone 5 I live in Saudi Arabia? How can I let it work?

    I Live in Saudi arabi, I have I-phone 5 & using last version of iOS. I can not find face time in setting. When I call the icon of face time appears but with question mark  ccan u tell me the solurion to let me use it? thanks

  • USB Adapter Question

    I feel pretty ridiculous asking this; but I searched all the similar topics and am still confused. I have a first gen. ipod nano and an ipod usb power adapter. The usb cord that came with the nano works just fine and connects to my old imac, to the n

  • Mac App Store download speed very slow...

    I have been trying to download the App Store updates OS X Update 10.10.3 and OS X Yosemite Recovery Update to my iMac for the past several days.  When opening the Mac App Store, I click on updates and they appear.  However, when I select 'download' m

  • Stamp vdo in photoshop cs6

    I want how to stamp / clone vdo in photoshop cs6 please help me. Thank you.

  • Re: Broadband problem in Aberdeenshire: could it b...

    Hi ilive in Danestone And the internet speed atm is a joke, Please help me, I am now wired as i thought it would help. But just the same.