Storing File in SQL database - Best option

  • What do I tell a .net developer is the best approach for storing various file type in a SQL db?

    PDF, TIF, JPG...

  • drbob wrote:

    What do I tell a .net developer is the best approach for storing various file type in a SQL db?

    PDF, TIF, JPG...

    Tell them to read the documentation comparing the different approaches and figure out which is best for your environment and situation. This is the article to refer them to and also check the link towards the end on RBS:

    Compare Options for Storing Blobs (SQL Server)

    Sue

  • I'd have one word:

    Don't.

    That's the best advice on how to store a file inside SQL Server.

    Can you do this? Yes. The link provided above will give you the details. Should you do this? Is SQL Server a good place to maintain files? No. It isn't. File systems are a much better place to maintain files. While you can get them into SQL Server, guaranteed, it's going to be a pain in the bottom, and, it's going to affect all sorts of downstream stuff from backups & restores to log shipping, availability groups and the rest. Managing files within SQL Server is not something I would recommend.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

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