Insert More than 2GB Data into the Column

  • Hi,

    I have a html content in which the data is more than 2 GB when i am inserting this data in to the column its truncating the data.

    How to insert more than 2GB data into a particular column.

    Thanks,

    Angad

  • Whats your current datatype of the column? Why do you look for to store the data in DB(any particular reason)?

  • Data type is ntext.Its an requirement from the client.

  • First of all, plese try to void text,ntext and image datatype for new development work, this is going to be deprecated in future versions.

    I would recommand you to look an option as FILESTREAM Varbinary(MAX).

  • Can you provide me any example where i can able to insert more than 2Gb data into the column.

  • Could you please go through the below sites for the instructions:

    http://technet.microsoft.com/en-us/library/bb933995.aspx

    I will come back to you with the sample script with my next working day.

  • I agree that if you are on SQL 2008 R2 go with filestream. It is the only option that should allow you to insert more than 2GB of data in a column. Filestream limit is the limit of the OS.

    Joie Andrew
    "Since 1982"

  • Data type is ntext.Its an requirement from the client.

    The client probably has a requirement that the database system manages data with a length greater than 2GB. It is up to the developers to put together a workable and performant system that meets the requirements.

    Within SQL Server, the most effective way to store data larger than 2GB is to use Filestream. This might mean a redesign of part of the system, but it is the best solution available.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

  • depend of situation use filestream or varbinary. If you read freaquently use filestream, in other case varbinary(max)

  • I am not sure varbinary(max) is an option. The poster needs to be able to input data larger than 2GB. Varbinary(max) has a limit of 2^31 - 1 bytes, which is 2GB.

    Joie Andrew
    "Since 1982"

  • angadsk83 (8/30/2011)


    Data type is ntext.Its an requirement from the client.

    If ntext is a requirement from the client, then you cannot store more than 2GB in the db.

    You could store the file path and file name information instead of the data or you'd need to use FILESTREAM. There are no other options I can think of.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply