How to save 150MB BLOB file in the database(SQL server)?

Dear experts,
I have written some code to save BLOB into a MS SQLserver7.0 database as follows:
PreparedStatement ps=connection.prepareStatement("INSERT INTO jdbctest" + "(id, content, image) VALUES (?,?,?)");
ps.setString(1,"2");
ps.setString(2,"L11.avi");
ps.setObject(3,data);
It works for upto 12MB but for files that are as big as 150MB I always get an SQLException as follows,
"Exception in thread "main" java.lang.OutOfMemoryError
<<no stack trace available>>" .
The SQLserver7.0 database is running on NT server 4. The client machine is SGI UNIX. I'm using i-net JDBC driver.
It seems I should break the BLOB into chunks before saving into SQLserver but I don't know how to do it.
Can someone please advise?
THANKS!
Yu

Could you tell me more about it? Thanks.Depends on the application.
For example for internal use you can set up a shared drive and then everyone gets a mapped read only access to it. Then you use a direct drive reference.
For external, or just wider internal distribution, you could set up a ftp server. Then the address is just an ftp address.
I believe there are other variations which can be implemented via browsers and support by the websever. For example loading a word doc via the browser.
The advantage to the above is that you don't have to push it into the database and it allows for some more flexible storage alternatives. The disadvantages are all the things you might want a database for - like concurrency checking and a single source.

Similar Messages

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How I save a 1D-folat array to MS Sql Server"s image field?

    How I save a 1D-folat array to MS Sql Server"s image field?
    I try.
    First all I flat the array.
    Then I insert the flated string into the table.It 's OK.
    I read it from the table.
    There is a error.
    The field data is empty.
    why?
    Attachments:
    01.vi ‏51 KB

    TimeWaveZero wrote:
    Just use the Array to spreadsheet string and insert the array, then retrieve with Spreadsheet string to array. 
    This is a lossy conversion that does not allow recovery of the identical DBL array due to limitations in the decimal formatting. Not the same! It is also significantly less efficient.
    LabVIEW Champion . Do more with less code and in less time .

  • Hibernate mapping XML files for the two SQL Server tables below.

    Hello all..,
    Question 1:
    I am working on a project that needs to support a database with an inherited legacy schema that you cannot change. The schema is provided below.Hibernate mapping XML files for the two SQL Server tables below. Please provide those two XML files. Assume some hypothetical package and class names. Assume that no "fancy" stuff such as lazy initialization, optimistic locking etc is needed at this time.
    CREATE TABLE [SURVEY_ANSWERS] (
    [ANSWER_ID] [int] IDENTITY (1,1) NOT NULL,
    [QUESTION_ID] [int] NOT NULL,
    [POSITION] [int] NULL,
    [TEXT] [varchar](350) NULL
    CREATE TABLE [dbo].[SURVEY_QUESTIONS] (
          [QUESTION_ID] [int] IDENTITY (1, 1) NOT NULL ,
          [TEXT] [varchar] (350) NULL
    GO
    ALTER TABLE SURVEY_ANSWERS
    ADD CONSTRAINT pk_SURVEY_ANSWERS PRIMARY KEY(ANSWER_ID,QUESTION_ID);
    ALTER TABLE [dbo].[SURVEY_QUESTIONS] ADD
           PRIMARY KEY  CLUSTERED
                [QUESTION_ID]
    GO
    ALTER TABLE [dbo].[SURVEY_ANSWERS] ADD
           FOREIGN KEY
                [QUESTION_ID]
          ) REFERENCES [dbo].[SURVEY_QUESTIONS] (
                [QUESTION_ID]
          )Question 2:
    Assume that you are working on a project developing, say, a banking application. You are the Architect and thinking that Hibernate ORM should be used for the entire access to the relational database. As usual, you have created (or auto-generated) a set of HBM XML files as well as POJOs for which you define the mappings. Assume now that a new requirement has just popped up. The system needs to be able to import new bank accounts and user information in bulk from a very large XML file at once and store it in the database. Assume the XML file contains all necessary information to populate fields in database tables. As performance is very important for this operation. Given this description, how would you approach the problem?
    Please describe briefly.
    -Thanks and regards
    Praveen Soni

    You're not fooling anyone Dennis_Mox. But nice try.Jeez, man. Mail me at denismox[at]yandex.ru, I will show you that exact test, dammit.

  • Log the local variables (string type) to the database (SQL Server)

    i have a customized PreUUT callback so that my own VI gets the information from barcode. it contains serial number as well as other information. i am collecting the information into local variables of the PreUUT callback.
    Now i want to log the local variables (string type) to the database (SQL Server).
    i have a successful connection to the database and i am using a generic recordset schema.
    can anyone help me how to do it?
    also shall i have to create the corrosponding fields (columns) in the database? or is there any option in TestStand4.0 to do it?

    Hello i like original,
    After re-reading your original message, I think I might have a better understanding of what you would like to do.  I have included a few links to Knowledge Base and Developer Zone articles that should be very useful for you.  I have included these links below:
    Logging a New UUT Property to a Database in TestStand
    Logging a New Step Property to a Database in TestStand
    Creating a TestStand Database Schema from Scratch
    Thanks,
    Jonathan C
    Staff Application Engineering Specialist | CTD | CLA
    National Instruments

  • How to save an Excel file to the desk top

    How can I save an Excel file to the desk top?

    Hi Tim!
    There's a whole bunch of entries that come up when I open terminal and key in the command you gave; here's what is shown:
    Davids-Mac-Pro:Desktop pdf3$ ls -ale ~
    total 38384
    drwxrwxrwx+  41 pdf3  admin      1394 Nov  2 09:12 .
    0: group:everyone deny delete
    drwxr-xr-x    6 root  admin       204 Sep 19 14:58 ..
    -rw-rw-rw-    1 pdf3  admin         3 Jan 24  2012 .CFUserTextEncoding
    -rw-rw-rw-@   1 pdf3  admin     39940 Nov  3 10:48 .DS_Store
    drwx------    2 pdf3  admin        68 Nov  6 09:02 .Trash
    drwxrwxrwx    3 pdf3  admin       102 Feb  1  2012 .adobe
    -rw-rw-rw-    1 pdf3  admin       302 Nov  6 09:20 .bash_history
    drwxrwxrwx    6 pdf3  admin       204 Dec 31  2013 .blurb
    drwxrwxrwx    3 pdf3  admin       102 Oct 21  2012 .config
    drwxrwxrwx    3 pdf3  admin       102 Jan 27  2012 .cups
    drwx------    7 pdf3  admin       238 Jul 26 20:36 .dropbox
    drwxr-xr-x    4 pdf3  admin       136 Dec  7  2013 .fontconfig
    drwxrwxrwx    3 pdf3  admin       102 Mar 17  2012 .nchsoftware
    -rw-rw-rw-@   1 pdf3  admin        17 Oct 21  2012 .vbftpxmn
    -rw-r--r--@   1 pdf3  admin   1315548 Sep  3  2013 2014 Bellevue SW Collection Contract 04 15 2013 draft for RFP.pdf
    drwxrwxrwx    2 pdf3  admin        68 Sep 21 11:04 Applications
    -rw-r--r--@   1 pdf3  admin    326665 Aug 30  2013 Bellevue Reliability Report 2012 042613 Final-1.pdf
    -rw-r--r--    1 pdf3  admin      6737 Sep 25  2013 Bellevue Reliability Report 2012 042613 Final.txt
    -rw-r--r--@   1 pdf3  admin     35892 Oct 30 22:15 Bellevue Utility Bills, 2015-16.xlsx
    drwxrwxrwx@   3 pdf3  admin       102 Aug 16 14:52 Burn Folder.fpbf
    -rw-rw-rw-@   1 pdf3  admin     25989 Jun 18  2012 Concerns Expressed to City of Bellevue Regarding Approval of.pdf
    -rw-r--r--@   1 pdf3  admin    165592 Sep  5  2013 David's Autobiography copy.pdf
    -rw-r--r--@   1 pdf3  staff     34836 Jul 26 21:21 Deck Repair, 2014.xlsx
    drwx---rwx@  35 pdf3  staff      1190 Nov  5 12:54 Desktop
    0: group:admin allow list,add_file,search,add_subdirectory,readattr,writeattr,readextattr,writeextat tr,readsecurity
    -rw-r--r--@   1 pdf3  admin    111548 Nov 15  2013 Document2.pdf
    drwx------+  18 pdf3  staff       612 Nov  5 11:43 Documents
    0: group:everyone deny delete
    drwx------+ 494 pdf3  staff     16796 Nov  2 22:09 Downloads
    0: group:everyone deny delete
    drwxr-xr-x    2 pdf3  admin        68 Nov  1 11:54 Excel Work Book
    drwxr-xr-x    2 pdf3  admin        68 Oct 31 20:42 Excel Workbooks
    -rw-rw-rw-@   1 pdf3  admin  16862554 May 29  2012 Group Shot.psd
    drwx------@  53 pdf3  staff      1802 Sep 19 15:17 Library
    0: group:everyone deny delete
    drwx------+   6 pdf3  staff       204 May 28  2013 Movies
    0: group:everyone deny delete
    drwx------+   8 pdf3  staff       272 Feb 24  2014 Music
    0: group:everyone deny delete
    -rw-rw-rw-@   1 pdf3  admin    117444 Jul 21  2008 P6M-2 In Close copy.jpg
    -rw-r--r--@   1 pdf3  admin     46473 Aug 16 14:50 PW-M-1 Overlay Budget.xlsx
    drwx------+  65 pdf3  staff      2210 Nov  5 11:43 Pictures
    0: group:everyone deny delete
    drwxr-xr-x+   5 pdf3  staff       170 Jan 24  2012 Public
    0: group:everyone deny delete
    drwxr-xr-x    6 pdf3  admin       204 Mar 10  2014 Sound Transit Bel-Red Cost Estimate
    drwxr-xr-x   34 pdf3  admin      1156 Sep 21 09:24 WW II Songs & Opera #1
    -rw-r--r--@   1 pdf3  admin    172859 Feb 25  2014 photo 1.JPG
    -rw-r--r--@   1 pdf3  admin    172859 Feb 25  2014 photo 3.JPG
    Davids-Mac-Pro:Desktop pdf3$
    I have no idea what all this stuff means, but I've done a 'disk verify' for both my drives, and the results indicated they were both 'OK'.Dave P.

  • How to Save a text file in the server?

    hello
    i just want to save an text file in the server.
    My idea is to load an xml text file maybe make some changes
    and then save it back to the server, so i can avoid all the
    database/php work because i know nothing about it.
    thank you

    hello
    i just want to save an text file in the server.
    My idea is to load an xml text file maybe make some changes
    and then save it back to the server, so i can avoid all the
    database/php work because i know nothing about it.
    thank you

  • How to store a JSP file in the SAP Application server ?

    Hello All,
    My reqt. is as follows :
    1. I need to store a JSP File on the SAP Application server .
    How can I do this ?
    2. I want to call the uploaded jsp file from the server and call this jsp from abap to view the result of it .
    How can I achieve this ?
    First of all is this possible ?
    Regards,
    Deepu.K

    Hello Mike,
    Thanks for ur reply.
    I've imported the JSP as a mime object into the BSP.
    Now I've created the page to show that Mime Object as an image.
    But nothing is coming as an output.
    But then,there is an option for that mime object. i.e when I right click on the mime object there is an option called " convert to BSP".
    I selected that option and it created a view in my BSP .( My BSP is a page with flow logic application )
    Now how should i make this view to be an output ?
    I guess this shud be posted in the BSP Forum ...but still taking a chance here :)-
    Regards,
    Deepu.K

  • How to import an .csv file into the database?

    and can we code the program in JSP to import the.csv file into the database.

    It is better to use Java class to read the CSV file and store the contents in the database.
    You can use JSP to upload the CSV file to the server if you want, but don't use it to perform database operations.
    JSPs are good for displaying information on the front-end, and for displaying HTML forms, there are other technologies more suitable for the middle layer, back end and the database layer.
    So break you application into
    1) Front end - JSPs to display input html forms and to display data retrieved from the database.
    2) Middle layer - Servlets and JavaBeans to interact with JSPs. The code that reads the CSV file to parse it's contents should be a Java Class in the middle layer. It makes use of Java File I/O
    3) Database layer - Connects to the database using JDBC (Java Database Connectivity), and then writes to the database with SQL insert statements.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Keeping the above concepts in mind, first build a simple JSP and get it to work,
    then research on Google , for Java File I/O , discover how to read a file,
    Then search on how to readh a CSV file using Java.
    After researching you should be able to read the CSV file line by line and store each line inside a Collection.
    Then research on Google, on how to write to the database using JDBC
    Write a simple program that inserts something to a dummy table in the database.
    Then, read the data stored in the Collection, and write insert statements for each records in the collection.

  • SQL Server 2012 Management Studio: How to install AdventureWorks2012_Data.mdf file to the Databases of my SQLEXPRESS?

    Hi All,
    I just downloaded AdventureWorks2012_Data.mdf file from
    http://msftdbprodsamples.codeplex.com/releases/view/55330 to my C:/ Downloads folder.  I don't know how to install this AdventureWorks2012_Data.mdf file to the Databases (in Object Explorer) of the \SQLEXPRESS of my SQL Server 2012 Management
    Studio.  Please kindly help, advise and respond.
    Thanks in advance,
    Scott Chang

    Hi Olaf Helper, Thanks for your response.
    As you  and https//msdn.microsoft.com/en-us/library/ms190209.aspx instructed, I tried to attach the AdventureWorks2012_Data.mdf file (Using SQL Server Management Studio) to my Databses. After I did Steps 1 & 2, (in Step 3) I clicked on
    Add, and tried to locate the AdventureWorks2012_Data.mdf file in my C:/Users/e1enxshc/Downloads folder: this mdf file was not there in the "Select the file" box!!!??? I am pretty sure that mdf file has been downloaded into that "Downloads"
    folder.  I am lost completely.  Please kindly help, advise me what it is going wrong in my "Attach" the mdf file to my Databases of SQLEXPRESS, and respond.
    Thanks,
    Scott Chang
    ===============================================
    Hi Prashanth,
    I cannot find/locate the
    http://serverintellect.com/sqlserver/sql-database-attach/ in my internet websites to do the "Attach" task I need badly. Please tell me where I can find/locate/access that website>
    Thanks,
    Scott Chang
    ==================================================== 
    P.S. I moved the AdventureWorks2012_Data.mdf file to my C:\Temp folder and did the "Add" again. It located the mdf file. I added the AdventureWorks as the name of Database in SQLEXPRESS, then I clicked Add. I got the following fatalerror:
    Failed to retrieve data for this request. (Micosoft....)
    ADDITIONAL INFORMATION:    mICROSOFT sql sERVER, eRROR:5123).
    wHY DOES IT NOT WORK EITHER? 

  • How to load a XML file into the database

    Hi,
    I've always only loaded data into the database by using SQL-Loader and the data format was Excel or ASCII
    Now I have to load a XML.
    How can I do?
    The company where I work has Oracle vers. 8i (don't laugh, please)
    Thanks in advance!

    Hi,
    Tough job especially if the XML data is complex. The have been some similar question in the forum:
    Using SQL Loader to load an XML File -- use 1 field's data for many records
    SQL Loader to upload XML file
    Hope they help.
    Regards,
    Sujoy

  • How to read a .dbf file on 64 bit sql server?

    We are running 64 bit windows server 2003 / sql server 2005. 
    I need to use openrowset to read a dbf file. 
    Is there ANY way to do that?

    The basic issue is that 64 bit processes cannot load 32 bit dlls.  Many drivers only release in 32 bit mode.  I am not sure if there is an intent to add 64 bit drivers in the future.  There is a way to work around this issue, but it is sort of roundabout.  You can install SQL Express in 32 bit mode and double hop to the dbf file (or any other 32 bit only provider) through 64 bit SQLNCLI.  The 32 bit express instance can OPENROWSET using all the 32 bit drivers, and the 64 bit SQLNCLI provider can connect to the 32 bit express instance.
    I hope that helps,
    John

  • How to do Ad-hoc reports with SSRS 2012 (Report Builder 3.0) for the database SQL Server 2012

    <p>Hi,</p><p>Please could anybody help me how to do ad-hoc reports by using SSRS 2012.</p><p>I am able to create ad-hoc reports using Report Builder3.0 and SQL Server 2008 R2. </p><p>I have built the report Model
    in for the instance 2008 R2&nbsp;</p><div class="t-paste-container">Using Report Manager 2012 </div>

    Hi Gowri,
    From your description, you can create create ad-hoc reports using Report Builder 3.0 and SQL Server 2008 R2, and now you want to know how to how to do ad-hoc reports by using SSRS 2012, right? In SQL Server 2012, the default version of Report Builder is
    3.0, so you can create create ad-hoc reports using Report Builder 3.0 as before.
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How do you store BLOBS external to the database?

    Hello
    My project manager wants to have users upload files, make them available on-line and store them external ( in the file system ) in a app I am building for her.
    I am using 11gR2, with Apex 4.1, I have looked at BFILES but I am not having much luck getting them to work.
    I am hoping someone has had to do this before, or at least has an idea of how to get this done.
    Thanks
    Merph

    OK , the code load_blob_to_bfile work, but I am not sure how to plug it in to my app.
    I have a screen that allows a user to feel in some basics about the pdf they are uploading, they hit the submit/update button and the file is uploaded. I am not sure where i would call my procedure from that this point. I tried to build a step in the branchs that I would pass a file_id so I can call the procedure but I am missing something somewere.

  • Create Fiat File Using Trigger in SQL Server

    Dear All,
        How to Create a Flat File using Trigger in SQL Server?

    Take a look at osql/sqlcmd, bcp, COM calls, xp_cmdshell, etc.  Here are a few links with code examples:
    https://www.simple-talk.com/sql/t-sql-programming/reading-and-writing-files-in-sql-server-using-t-sql/
    http://www.nigelrivett.net/SQLTsql/WriteTextFile.html
    http://stackoverflow.com/questions/8132663/creating-a-text-file-on-local-machine-using-sql-server-2008
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

Maybe you are looking for

  • My iMac has less than 2 years. The hard drive from 1TB just failed. Possible to recover data?

    The support store just told me that the hard drive of my IMAC 27" is damaged and the solution is to replace for a new one. Meanwhile, I saw this: "Apple has determined that a very small number of Seagate 1TB hard drives used in 21.5-inch and 27-inch

  • ZFS in solaris 10 x86 ?

    In the Solaris 10 installation, I can only set the filesystem to UFS ? I want to know if ZFS is in Solaris 10 for X86 and if yes, how I can enable it. Thanks. Willits

  • Grey Screen after update - need help

    Hi My friend just called me - her macbook is stuck on the grey screen with apple logo - after she done the security updates and restarted. She can boot into Windows XP (bootcamp) without any issues. I'm going over there tomorow to help her out and wa

  • Foreign Currency exchange gain & loss

    Dear expert, I have a problem here, need help. I have made the setting for foreign exchange gain/loss in OB09 and start to use f-28 for incoming payment. When run the simulation, it gives me 2 lines of exchange gain/loss calculation. 1st line with am

  • Can someone help with importing video from Canon XA10 (AVCHD) into PE 11?

    In PE 11 when I import video from my canon xa10 (avchd) the quality is terrible, I also have a canon xa20, 60D and gopro that I video with and they all turn out with great video quality.  Is there a reason why the xa10 video quality is bad? Setting I