File images in SQL Server

  • I have a database of 56GB of images. This came becuase of over size of images due to problem in scanner. Now we have solved thep problem with the scanner and now it is giving small size images. But i want to compress the previously stored images. Please let me know how can i do this.

    Advance thanks

    Vijayendhar Reddy

  • There's no automatic way. You'll have to build a client that will retrieve the image, change the format and then update the database.

  • Regardless you have compressed the images to smaller file size, the problem will remain in long run, if scanning is going to be on going, database will eventually grow back to it.

    Storing the images in database is not the best solutions, the best to store in files and split across directories.

  • The first step will be to export all of the images. You will probably have to write a custom application to handle this, but I suspect you already have an application that uses the image data in you database, so this may not be too hard.

    In order to change the images to a more compressed format, you need a graphics program that can do batch conversions. I don't know the name of one off-hand since I don't work with graphics. I'm sure one of Adobe's programs can do it, or you might ask around to see if anyone knows of a good one.

    You will then need to use your custom program to update your database with the new versions of the images.

    I agree with yan_aung that you generally don't want to store images in the database, but if your application already works with them in the database, a lot of the time there isn't much you can do about it.

  • This topic is to me a classical case of 'It depends...'

    There is no ultimate answer, but my impression is that this question has some kind of religious aspects

    Here we are running a SER document management system. Each document is scanned, stored on the filesystem and referenced in the db. For this software the filesystem is the right choice, because the files are frequently accessed.

    I have a db where a store research documents of all kind, mostly pdfs'. Those files aren't accessed frequently. The reason why I decided to use the db what that I wanted to have one single backup mechanism (eg. that of SQL Server). Also I don't have to deal with data inconsistencies and do not have to develop some extra logic when deleting a row like I need to develop when using the filesystem.

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

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

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