SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


image vs varbinary(max)


image vs varbinary(max)

Author
Message
noumanjee
noumanjee
SSC Rookie
SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)

Group: General Forum Members
Points: 31 Visits: 9
I maintain an application which was developed back in 2000 and it was developed against SQLServer 2000. Last year we migrated the Database to SQLServer 2005. The Main table that our application uses has a column with image datatype to store large objects (blobs).

Question:
1. I was told that that SQLServer 2005 has better way of handling the binary objects i.e. varbinary(max) and that I should consider migrating to varbinary(max) from image datatype. I was also told that with varbinray(max) i can reclaim the space if the large objects are deleted from the DB.

2. I cannot reclaim space enough space after i purge lot of data from the table that contains image datatypes. I have tried re indexing as well as DB shrink but i cannot reclaim more than 10%.

FYI I do the following to reclaim all true space.
a. Transfer all the objects from the main table to the template table.
b. I drop and recreate the Main Table.
c. I transfer the objects back form temp table to the main table.

I hope someone could comment on this.

Thanks,
Oliiii
Oliiii
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2090 Visits: 777
The same thing happen with text field, switching to varchar(max) fixed the problem.
I guess if you switch to varbinay(max) your problem will also be fixed (you still need to reindex to get the space back though).
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search