Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-03-02 : 07:00:42
|
There is a database of size of about 500MB.I have now truncated many tables which have had several thousand records.Still the size shows as 500 MBDo you know why the size has not been reduced?Thanks |
|
ahmad.osama
Posting Yak Master
183 Posts |
Posted - 2010-03-02 : 07:02:44
|
quote: Originally posted by arkiboys There is a database of size of about 500MB.I have now truncated many tables which have had several thousand records.Still the size shows as 500 MBDo you know why the size has not been reduced?Thanks
you need to shrink the datafile to reduce the size. |
 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-03-02 : 09:14:56
|
I know how to shrink log file but not datafile.How is this done please?Thanks |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-02 : 09:17:28
|
in ssms right click on database name in object explorer.under tasks you will find what you need. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
Peter99
Constraint Violating Yak Guru
498 Posts |
Posted - 2010-03-02 : 12:12:51
|
It is same as you shrink logfile, just give datafile name instead of logfile name |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2010-03-02 : 15:41:02
|
Why you need to shrink database which is 500 MB? |
 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-03-02 : 16:15:33
|
thank you all |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-02 : 16:18:42
|
welcome  No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
ahmad.osama
Posting Yak Master
183 Posts |
Posted - 2010-03-03 : 06:28:28
|
quote: Originally posted by sodeep Why you need to shrink database which is 500 MB?
May b he is out of storage |
 |
|
|
|
|