Author |
Topic |
daniel50096230
Yak Posting Veteran
99 Posts |
Posted - 2009-12-01 : 01:41:49
|
Hi,I had delete some data from my sql server 2000 database, but after I deleted it, when i checked the properties of my database, the size did not change where it should decrease after i delete some of the data.Anyone can help me on this issue??? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
daniel50096230
Yak Posting Veteran
99 Posts |
Posted - 2009-12-01 : 03:35:34
|
Hi, is there any sample for me to have a look for the DBCC SHRINKFILE because I never know about this. |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2009-12-01 : 03:38:23
|
USE MyDBDBCC SHRINKFILE (dataFile, 10)GOIf you don't include the target size (in MB) , then the file will be shrunk to a default sizeJack Vamvas--------------------http://www.ITjobfeed.com (IT jobs) |
|
|
daniel50096230
Yak Posting Veteran
99 Posts |
Posted - 2009-12-01 : 03:41:56
|
Hi, I has searched for the DBCC Shrinkfile, it actually is use to reduce the database size. But what I needed is I need to know the size of database after I delete my data. |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-12-01 : 03:56:05
|
HiMore clearAll data and log files for a specific database. Execute DBCC SHRINKDATABASE.One data or log file at a time for a specific database. Execute DBCC SHRINKFILE. -------------------------R... |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-01 : 07:44:25
|
quote: Originally posted by daniel50096230 Hi, I has searched for the DBCC Shrinkfile, it actually is use to reduce the database size. But what I needed is I need to know the size of database after I delete my data.
Have you read Tara's reply?Re-read itMadhivananFailing to plan is Planning to fail |
|
|
daniel50096230
Yak Posting Veteran
99 Posts |
Posted - 2009-12-01 : 09:32:16
|
Frankly speaking, I just want to know the size of my database after I deleted some data... But what I can see is the size still remain the same as before the data been deleted after I had deleted my data. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-12-01 : 10:20:46
|
In 2005 click on your database in Object Explorer,then choose Disk Usage fom Report in Summary window.In 2008 right click database - reports - disk Usage.There are all inforamtion provided that you want. No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2009-12-01 : 10:51:55
|
quote: Originally posted by daniel50096230 Frankly speaking, I just want to know the size of my database after I deleted some data... But what I can see is the size still remain the same as before the data been deleted after I had deleted my data.
If you can see the size remains the same after the delete, then how can you not see the database size?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog"Let's begin with the premise that everything you've done up until this point is wrong." |
|
|
daniel50096230
Yak Posting Veteran
99 Posts |
Posted - 2009-12-01 : 19:43:36
|
Hi, I think I has confused you all. For example, before I delete my data, the database size is 200mb, but after I delete a lot of data, it still remain 200mb. I just want to know how can be like this??? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|