You are here: Re: How calculate space that occupied? « MsSQL Server « IT news, forums, messages
Re: How calculate space that occupied?

Posted by M A Srinivas on 06/12/07 09:47

On Jun 12, 12:35 pm, visu <k.vis...@gmail.com> wrote:
> I want to know following memory space related question.
>
> 1 . How can i get a Database Size by means of a SQL query?
>
> 2. How can i Get a field size (not allocated space) .. ie. i am
> storing some textual data to a field..
> after a insertion i want to know how much space has been occupied by
> that particular field .
>
> ex sno product_name Description
> 1 sample1 dfkjsdkfj kldsjfkdjk
> sdkjdfskdjk vcmvxcvmcvnksdjfkdsn m
>
> Here i want know the space occupied by the field name "description"
> for the product id=1.
>
> Thanks in adavance
>
> Regards
> Visu.

1. How can i get a Database Size by means of a SQL query

sp_helpdb 'dbname'

2. Here i want know the space occupied by the field name "description"
for the product id=1.

SELECT SUM(DATALENGTH(description)) FROM table
WHERE product_id=1.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация