|
The data base total data files sizes are 35GB. The following are the top 10 tables with sizes in KB's. But tables sizes are around 1GB but database size 35GB why?
(comments are locked)
|
|
There could be a number of reasons for the database to be taking the size it does on disk.
To see where the space is you can use these queries when connected to the database you are interested in and read how they work and what information they provide at the links shown No Large trans are running, No open trans running, Log file is also 300MB only but data files only have 34GB space but tables are have that much space only.... Why it happend need to get the details?
Jul 03 '12 at 09:12 AM
narendba
I wouldnt expect there to still be a transaction running. Good job checking the logfile size. So, at some point the data file was set to a certain size or grew to a certain size. Can you see which tables are taking the space?
Jul 03 '12 at 09:17 AM
Fatherjack ♦♦
Find the above database individual file details .... Full Backup file size 35GB around... Largest table size is 40MB aroun....
Jul 03 '12 at 10:33 AM
narendba
So it would appear that the database was created at this size or it has been resized to its current size
Jul 03 '12 at 11:09 AM
Fatherjack ♦♦
how are you getting the database and table sizes? If you are getting this from SSMS Object Explorer Details then you need to add the Index Space Used (KB) column too. Indexes may well be consuming a large amount of DataFile space
Jul 03 '12 at 11:48 AM
Fatherjack ♦♦
(comments are locked)
|
|
I would suggest that you are storing a lot of BLOB data and your method of calculating row sizes doesn't take that into account. Does the dB store .doc, .xml, .mp3, .xls, etc.? Great Just I had a talk with apps owner they told me users are uploated attachments into one table.... But how to fine BLOB data and size details?
Jul 04 '12 at 01:32 PM
narendba
SELECT DATALENGTH(fieldname) FROM tablename
Jul 04 '12 at 01:37 PM
Blackhawk-17
(comments are locked)
|


I am getting the staticstic by using top 10 largest tables scirpt and database file sizes script.....
SELECT SUM(DATALENGTH(image)) FROM tablename
@narendba - you can get details of the DATALENGTH function and its output by placing your cursor in the function name and pressing F1. All the details will be there
Try
It returns number of bytes. I guess you have not followed Fatherjack's advice to see the details related to DATALENGTH function.