Solved

sybase-How to check BLOB size

Posted on 2012-09-11
4
1,006 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 38424656
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
ID: 38449806
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
ID: 38450248
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
ID: 38458346
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Facebook has became the #1 social media platform. People share many funny videos there, yet you don't know how to download them? Now you can download Videos from Facebook in just 3 simple steps.
This article was initially published on Monitis Blog, you can read it here . When it comes to deciding which approach to website performance monitoring is best for your business, unfortunately, like so many options in life . . . it depends. In t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

730 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