Solved

sybase-How to check BLOB size

Posted on 2012-09-11
4
936 Views
Last Modified: 2012-10-18
I have one question about how to check blob db size, not sure how to check this ?
0
Comment
Question by:motioneye
  • 3
4 Comments
 
LVL 24

Expert Comment

by:Joe Woodhouse
Comment Utility
Tell us more about what you're trying to do here...?

Do you want to know how big one particular BLOB in one row is? How much space is used for all BLOBs in one table? In the whole database?
0
 

Author Comment

by:motioneye
Comment Utility
Hi,
I want to know how much space is used for all BLOB in one table or how much space used by BLOB in all tables within database.
0
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 500 total points
Comment Utility
Well, those are two separate questions. :)

For the first, run

     exec sp_spaceused [table], 1
     go

This will give you a breakdown of the space for each index as well. BLOBs are stored as indid (index id) 255. The column you want is the "reserved" column as this much space has been taken from the database and is not available for anything else.

The second takes more work, I'll come back to you later with this.
0
 
LVL 24

Assisted Solution

by:Joe Woodhouse
Joe Woodhouse earned 500 total points
Comment Utility
Does this answer have to be entirely in SQL? If so, you'll need to use the data_length column, and write some dynamic SQL to figure out which columns in which tables it needs to be run on.

If you can run this (say) in a shell script, you could run a whole pile of sp_spaceused commands as above, and detect when it is for indid 255, and sum the reserved column of those lines. Slower but easier to code.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Marketing can be an uncomfortable undertaking, especially if your material is technology based. Luckily, we’ve compiled some simple and (relatively) painless tips to put an end to your trepidation and start your path to success.
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now