How kann I store a very big file in to Oracle XML DB?

Hello,
I´m looking for a fast method to store a XML file in to a oracle 10g XE. I had try to store the 500 kb file in to the database as a xmltype or a clob, but I still have the same Error: "ORA-01704: string literal too long". I´m looking for a long time for a possibility to store this file and another one(113 MB) in to the database. I had searched by google to see if any solution are available, and the unique solution found is to splitt the document in a loop statement(due to the 32 kb limit). But this solution don´t allow any storage with a XML Schema and is to slow.
here is an example how I did it(but it didn´t work):
create table Mondial(Nr int, xmldata xmltype);
INSERT INTO Mondial VALUES (1, 'big xml file');
I would also try the alternative with a bind variable like this:
create or replace PROCEDURE ProcMondial IS
poXML CLOB;
BEGIN
poXML := 'big xml file';
INSERT INTO Mondial VALUES (1, XMLTYPE(poXML));
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20101, 'Exception occurred in Mondial procedure :'||SQLERRM);
END ProcMondial;
I become also the same Error:String to long!
I am using sql developer for the Query.
please help me, I´m despaired.
thanks!
Michael

If you use the suggested statement
create table Mondial(Nr int, xmldaten xmltype) TABLESPACE mybigfile;than I hope for you that this XML data content will not be used for content driven procedures like selecting, updating or deletion of parts of XML data. The default for "xmltype" has a CLOB physical representation that, if not on 11g combining it with an XMLIndex, is only useful for document driven XML storage. That means - You ALWAYS delete, select, update or insert the WHOLE XML content (/per record basis). If this is not your intent, you will encounter performance problems.
Use instead Object Relational or Binary XML (11g) while using the XMLType datatype or the XMLType datatype in conjunction with CLOB based storage AND an XMLIndex if on 11g. Carefully read the first and/or second chapter of the 10/11g XMLDB Development Guide. Carefully choose your XMLType needed (and or XML design) if you don't want to be disappointed regarding the end result and/or have to redesign your XML tables.
A short introduction on the possibilities can be found here (not only 11g related btw): http://www.liberidu.com/blog/?p=203

Similar Messages

  • How do i open a VERY big file?

    I hope someone can help.
    I did some testing using a LeCroy LT342 in segment mode. Using the
    Labview driver i downloaded the data over GPIB and saved it to a
    spreadsheet file. Unfortunately it created very big files (ranging from
    200MB to 600MB). I now need to process them but Labview doesn't like
    them. I would be very happy to split the files into an individual file
    for each row (i can do this quite easily) but labview just sits there
    when i try to open the file.
    I don't know enough about computers and memory (my spec is 1.8GHz
    Pentium 4, 384MB RAM) to figure out whether if i just leave it for long
    enough it will do the job or not.
    Has anyone any experience or help they could offer?
    Thanks,
    Phil

    When you open (and read) a file you usually move it from your hard disk (permanent storage) to ram.  This allows you to manipulate it in high speeds using fast RAM memory, if you don't have enough memory (RAM) to read the whole file,  you will be forced to use virtual memory (uses swap space on the HD as "virtual" RAM) which is very slow.  Since you only have 384 MB of RAM and want to process Huge files (200MB-600MB) you could easily and inexpensively upgrade to 1GB of RAM and see large speed increases.  A better option is to lode the file in chunks looking at some number of lines at a time and processing this amount of data and repeat until the file is complete, this will be more programming but will allow you to use much lass RAM at any instance.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • VERY big files (!!) created by QuarkXPress 7

    Hi there!
    I have a "problem" with QuarkXPress 7.3 and I don't know if this is the right forum to ask...
    Anyway, I have createed a document, about 750 pages, with 1000 pictures placed in it. I have divided it in 3 layouts.
    I'm saving the file and the file created is 1,20GB !!!
    Isn't that a very big file for QuarkXPress??
    In that project there are 3 layouts. I tried to make a copy of that file and delete 2 of 3 layouts and the project's file size is still the same!!
    (Last year, I had created (almost) the same document and as I checked that document now, its size is about 280 MB!!)
    The problem is that I have "autosave" on (every 5 or 10 minutes) and it takes some time to save it !
    Can anyone help me with that??
    Why does Quark has made SO big file???
    Thank you all for your time!

    This is really a Quark issue and better asked in their forum areas. However, have you tried to do a Save As and see how big the resultant document is?

  • Question about reading a very big file into a buffer.

    Hi, everyone!
    I want to randomly load several characters from
    GB2312 charset to form a string.
    I have two questions:
    1. Where can I find the charset table file? I have used
    google for hours to search but failed to find GB2312 charset
    file out.
    2. I think the charset table file is very big and I doubted
    whether I can loaded it into a String or StringBuffer? Anyone
    have some solutions? How to load a very big file and randomly
    select several characters from it?
    Have I made myself understood?
    Thanks in advance,
    George

    The following can give the correspondence between GB2312 encoded byte arrays and characters (in hexadecimal integer expression).
    import java.nio.charset.*;
    import java.io.*;
    public class GBs{
    static String convert() throws java.io.UnsupportedEncodingException{
    StringBuffer buffer = new StringBuffer();
    String l_separator = System.getProperty("line.separator");
    Charset chset = Charset.forName("EUC_CN");// GB2312 is an alias of this encoding
    CharsetEncoder encoder = chset.newEncoder();
    int[] indices = new int[Character.MAX_VALUE+1];
    for(int j=0;j<indices.length;j++){
           indices[j]=0;
    for(int j=0;j<=Character.MAX_VALUE;j++){
        if(encoder.canEncode((char)j)) indices[j]=1;
    byte[] encoded;
    String data;
    for(int j=0;j<indices.length;j++) {
         if(indices[j]==1) {
                encoded =(Character.toString((char)j)).getBytes("EUC_CN");
                          for(int q=0;q<encoded.length;q++){
                          buffer.append(Byte.toString(encoded[q]));
                          buffer.append(" ");
                buffer.append(": 0x");buffer.append(Integer.toHexString(j));
                buffer.append(l_separator);
        return buffer.toString();
    //the following is for testing
    /*public static void main(String[] args) throws java.lang.Exception{
       String str = GBs.convert();
       System.out.println(str);*/

  • How does table SMW3_BDOC become very big?

    Hi,
    The table SMW3_BDOC which store BDocs in my system becomes very big with several million records. Some BDocs in this table are sent several month ago. I'm very strange that why those BDocs were not processed?
    If I want to clean this table, will inconsistancy occurrs in system? And how can I clean this table for those very old BDocs?
    Thanks a lot for your help!

    Hi Long,
    I have faced the same issue recently on our Production system and this created a huge performance issue and completely blocked the system with TimeOut errors.
    I was able to clean up the same by running the report SMO8_FLOW_REORG in SE38.
    If you are very sure about cleaning up, first delete all the unnecessary Bdocs and then run this report.
    At the same time, check any CSA* queue is stuck in CRM inbound queue SMQ2. If yes, select it, manually unlock it, activate and then refresh. Also check any unnecessary queues stuck up there.
    Hope this could help you.
    regards,
    kalyan

  • Upload of very big files (300MB+)

    Hello all,
    I am trying to create application in HTMLDB to store files via webbrowser in DB(BLOB). I created all needed components and now stuck with the problem of uploading big files. Basicaly when file is over 100MB it becomes unreliable and for big files does not work at all. Can somebody help me to figure out how to upload big files into htmldb application. Any hints and sugestions are welcome. Examples will be even more appreciated.
    Sincerely,
    Ian

    Ian,
    When you say "big files does not work at all", what do you see in the browser? Is no page returned at all?
    When a file is uploaded, it takes some amount of time to simply transfer the file from the client to modplsql. If you're on a local Gbit network, this is probably fast. If you're doing this over a WAN or over the Internet, this is probably fairly slow. As modplsql gets this uploaded file, it writes it to a temporary BLOB. Once fully received, modplsql will then insert this into the HTML DB upload table.
    I suspect that the TimeOut directive in Apache/Oracle HTTP Server is kicking in here. The default setting for this is 300 (5 minutes).
    I believe the timeout is reset by modplsql during file transfer to avoid a timeout operation while data is still being sent. Hence, I believe the insertion of your large file into the file upload table is taking longer than the TimeOut directive.
    The easy answer is to consider increasing your TimeOut directive for Apache/Oracle HTTP Server.
    The not so easy answer is to investigate why it takes so long for this insert, and tune the database accordingly.
    Hope this helps.
    Joel

  • A very big file

    i have a very big text file . almost 800 MB . in some lines i have a special pattern "from the end" is present. i want to pick up those lines.
    whats are the possible efficient solutions ?
    as the file is large , i hesitate to use BufferedReader + readLine + indexOf("from the end") because its not efficient . it reads all the lines.
    is RandomAccessFle will be a good solution ? but RAF dont have readLine + indexOf("from the end") .how do i solve it then ?
    i have java 1.4 . in java 1.4 what is the best solution for solving this kind of problem ?

    Under all circumstance you'll have to read all bytes
    of the file once.Not true! If the file consists of bytes with a character representation that uses only one byte (e.g. ASCII or iso-8859-x) then the following class if very efficient.
    import java.io.*;
    import java.util.*;
    public class GetLinesFromEndOfFile
        static public class BackwardsFileInputStream extends InputStream
            public BackwardsFileInputStream(File file) throws IOException
                assert (file != null) && file.exists() && file.isFile() && file.canRead();
                raf = new RandomAccessFile(file, "r");
                currentPositionInFile = raf.length();
                currentPositionInBuffer = 0;
            public int read() throws IOException
                if (currentPositionInFile <= 0)
                    return -1;
                if (--currentPositionInBuffer < 0)
                    currentPositionInBuffer = buffer.length;
                    long startOfBlock = currentPositionInFile - buffer.length;
                    if (startOfBlock < 0)
                        currentPositionInBuffer = buffer.length + (int)startOfBlock;
                        startOfBlock = 0;
                    raf.seek(startOfBlock);
                    raf.readFully(buffer, 0, currentPositionInBuffer);
                    return read();
                currentPositionInFile--;
                return buffer[currentPositionInBuffer];
            public void close() throws IOException
                raf.close();
            private final byte[] buffer = new byte[4096];
            private final RandomAccessFile raf;
            private long currentPositionInFile;
            private int currentPositionInBuffer;
        public static List<String> head(File file, int numberOfLinesToRead) throws IOException
            return head(file, "ISO-8859-1" , numberOfLinesToRead);
        public static List<String> head(File file, String encoding, int numberOfLinesToRead) throws IOException
            assert (file != null) && file.exists() && file.isFile() && file.canRead();
            assert numberOfLinesToRead > 0;
            assert encoding != null;
            LinkedList<String> lines = new LinkedList<String>();
            BufferedReader reader= new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));
            for (String line = null; (numberOfLinesToRead-- > 0) && (line = reader.readLine()) != null;)
                lines.addLast(line);
            reader.close();
            return lines;
        public static List<String> tail(File file, int numberOfLinesToRead) throws IOException
            return tail(file, "ISO-8859-1" , numberOfLinesToRead);
        public static List<String> tail(File file, String encoding, int numberOfLinesToRead) throws IOException
            assert (file != null) && file.exists() && file.isFile() && file.canRead();
            assert numberOfLinesToRead > 0;
            assert (encoding != null) && encoding.matches("(?i)(iso-8859|ascii|us-ascii).*");
            LinkedList<String> lines = new LinkedList<String>();
            BufferedReader reader= new BufferedReader(new InputStreamReader(new BackwardsFileInputStream(file), encoding));
            for (String line = null; (numberOfLinesToRead-- > 0) && (line = reader.readLine()) != null;)
                // Reverse the order of the characters in the string
                char[] chars = line.toCharArray();
                for (int j = 0, k = chars.length - 1; j < k ; j++, k--)
                    char temp = chars[j];
                    chars[j] = chars[k];
                    chars[k]= temp;
                lines.addFirst(new String(chars));
            reader.close();
            return lines;
        public static void main(String[] args)
            try
                File file = new File("/usr/share/dict/words");
                int n = 10;
                    System.out.println("Head of " + file);
                    int index = 0;
                    for (String line : head(file, n))
                        System.out.println(++index + "\t[" + line + "]");
                    System.out.println("Tail of " + file);
                    int index = 0;
                    for (String line : tail(file, "us-ascii", n))
                        System.out.println(++index + "\t[" + line + "]");
            catch (Exception e)
                e.printStackTrace();
    }

  • How can I store and share PDF files via iCloud?

    I am trying to use iCloud to store and share PDF files from my PC, iPad2 and iPhone 4S... They are supposedly supported. I can share .docs, .xls, etc.... However, I cannot figure out how to share a pdf!

    Welcome to the Apple Community.
    You can download an iWork document from iCloud as a PDF, but you can't share a PDF document with iWork apps on iOS devices.

  • How to use functions(to_char,to_date,trim..etc) in oracle xml table

    Hi I am new to oracle xml.
          In the below scenario how can use the functions like (to_char,To_date,trim..etc) In oracle xmltable."username","password" are inputs to my procedure.
    SELECT *
        INTO l_username,
                  l_password
        FROM xmltable('/InputParameters/ParamSet'
                        passing l_xmldoc
                        COLUMNS
                                l_username  VARCHAR2(28)    path 'username',
                                l_password VARCHAR2(28)     path 'password'
    and please Help how to write above with xmlquery.
    Thanks,

    In the same place you would for any regular SELECT statement
    SELECT TO_CHAR(...),
           TO_NUMBER(...)
      FROM random_table
    WHERE TO_CHAR(...) = col1
       AND TO_NUMBER(...) = col2
    username and password are the results of the SQL statement.  I'm guessing l_xmldoc is the input? There is not need to write something so simple as XQuery so what is your larger goal?  If you provide a clearer example and question, we can help you better.

  • HOW Do I Store All My MP3 files on an external drive, and point iTunes?

    I see on this forum that folks are storing byte-hogs like MP3 and MP4 files on an external hard drive, leaving the internal drive with more room for processing.
    My internal drive is full, so I got a 2 Tb external drive where I want to store my MP3 and MP4 files.
    After I move the files to the external drive, HOW do I point iTunes, iPhoto, and iMovie to the external drive?

    Type "move itunes library to external drive" into the search bar at the top of this screen next to "Support".

  • How to store multiple format text file in a oracle table

    Hi,
    I want to store a file which has multiple format for field separation so is it possible in Oracle data integrator if yes then how .....
    Waiting for reply
    regards
    palash

    Hello,
    <p>Read this article.</p>
    Francois

  • How do you store all your video files?

    I am starting to wonder about space. I have a macbook pro that I put a 320GB drive in, I installed all my final cut content to an external 500 GB 7200RPM drive, and started wondering about how long until I need more space. I record video in HD so the files are always a few GB, I have a Terabyte external that I am going to save stuff on for now, as in footage I want to keep for later use.
    But I also work with a friend who does some at his place, so I was curious about Network storage. Anyone use that?

    Drives are cheap. Pick up a few and store on them. And remember that if you are still recording to tape just hang on to them and you can recapture anytime... no need to keep the files on a drive.
    rh

  • How can I store and access 'jpg' files on an iPad?

    How can I access stored jpg files on an iPad?  At the moment, I can save them but they are distorted when retrieved.

    You can use 3rd party apps like Photo Manager Pro.
    https://itunes.apple.com/sg/app/photo-manager-pro/id393858562?mt=8

  • How can I store and read text files on my 7th generation ipod nano

    I have gone through the several contributions but I cannot follow those instruction for my ipod nan0 - the 7th generation.

    Yes, I know the idiom, but Microsoft strives for backwards compatibility while Apple is known for not slavishly adhering to it. Since they dropped it from the OS on the Nano with the 6th, and they also would have had to add controls for scrolling I'm sure they decided it wasn't worth the time or effort given the demand. You are the first person I've seen ask for this in a long time and I fail to see any big demand for it.

  • How to extract the contents of ZIP file stored in oracle database column ?

    The file is in ZIP format and it is stored in BLOB databse column . The contents of file is in binary format .
    How to extract those contents from file and thus creating the same ZIP file as output in ODI ?
    Thanks
    Arun

    Perhaps you can something like what is described in the support note "How To Load A PDF File Or Other Binary Files To a BLOB Column From ODI (Doc ID 1412753.1)"

Maybe you are looking for

  • DW8 text not visible in design view

    I have imported a site from DWMX(6?) to DW8. In DWMX everything is visible in design view. In DW8 the text is NOT visible in design view unless I switch off rendering using CSS (Display Styles Off), but displays fine in a browser. If I switch off ren

  • How to make sure an applet runs with Java 5?

    Hi all, First let me say thanks for all the help in the past. You've help me go from noob to intermediate noob. I've just about finished my first applet game which can be checked out here . Now I've been reading about problems with mac and 1.6. (note

  • Run a formula if a cell contains particular data from various cells

    I have a formula which checks a list of domains to see what the TLD is and then returns a renewal price based on the TLD e.g. .co.uk may return with $5.99 and .com $10.00. The formula I am using is below: =VLOOKUP(RIGHT(A2,LEN(A2)−SEARCH(".",A2)+1),$

  • Unlimited license key for SAP NETWEAVER 7.1

    Hi for all ; I downloaded the trial version of SAP NETWEAVER 7.1 which I installed.  I also received the key of activation for 90 days duration. My question is as follows. How  to obtain an unbounded key date ? Thinks

  • JMSAdapter for MQSeries 6.0 (JMSException)

    Hi, I'm used JMSAdapter for connect to queue MQSeries 6.0. And i get error : javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:QMTEST' MQSeries and BPEL PM place on my localhost. I write oc4j-ra.xml from tutorial: