Maximum file size for SQL db

  • Hi

    I would like to know what's the maximum file size i can keep in SQL database. Can i store a file size of over 30MB (pdf format) in a SQL databse for one entry... At this moment i can easily upload small files..

    Thanks

  • The max size for blob data is 2GB. Whether you should store files that big or not is a different question.

  • I agree with Chris.

    I'd seriously be looking at why you're storing a supposedly unchanging file in a database where you'll have to constantly perform maintenance and backups.

    Stored on a file system the file is backed up once and the archive bit turned off. Then subsequent backups would skip the file because it hasn't changed. In a database you'll be backing up the entire database everytime, even if the only change is that you've just added one more file.

     

    --------------------
    Colt 45 - the original point and click interface

  • Thanks Chris for the answer..

    Phill>

    I've learnt from a friend that on his last system crash he didn't manage to get the files and link from the db to pair each other. I know that i'm losing on performance and efficiency. At least when i recover from a crash i would get all the files in the db.

    I'm not too sure about keeping the files on the system rather on the db. any backup process that would ensure that these 2 will always be paired correctly?

    i apologise if i'm asking some silly questions i'm still learning a lot..

    Thank you

  • Just to clear myself: I am not saying you should never store files inside the database. Neither am I saying you should. It dpends.

    Generally, I ask whether the files can be recreated (often they can) and/or if they are necessary for the integrity of the data. I might say losing the employee photo database is unimportant, while losing digtial copies of signed contracts might be unallowable. In the later case I would store them in the database, not only for backup purposes but also for transactional processing etc.

  • Just to be clear myself.

    When it comes to storing files in a database as blobs, I advocate that if the item does not change as part of regular database transactional processing then it is a waste of resources constantly maintaining that data. Everyone that has used the blob datatypes in SQL Server 2000 knows what a pain they are.

    An item like a digital copy of a signed contract would be committed to CD/DVD and forever held in prosperity. I'm not aware of any database transaction processing that would explicitly require a PDF file that is stored in the database.

    Maybe for legal requirements you need to provide a signed copy of a document with each transaction. I'm currently employed at a stock broking company and this is something that needs to be done on a regular basis. The business objective is achieved using a third-party application without a single document stored in a database. Each applicable printed document, there are several for each of our 200,000+ clients is scanned to PDF and stored on hard disk and archived to DVD.

    When we need to include documentation it's a simple matter of including the reference from the database and the application includes the document as necessary.

    In my view, losing a digtial copy of an item that you cannot lose falls into the same category of losing the database backup file. Something that only due diligence will ensure never occurs.

     

    --------------------
    Colt 45 - the original point and click interface

Viewing 6 posts - 1 through 5 (of 5 total)

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