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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to shrink MDF file

Author  Topic 

imughal
Posting Yak Master

192 Posts

Posted - 2007-09-06 : 06:36:44
My database MDF file growth is high and due to space limitation i have to shrink the MDF file so how do i do that

Kristen
Test

22859 Posts

Posted - 2007-09-06 : 06:37:22
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Database%20Shrinking,Shrink,Shrinking

kristen
Go to Top of Page

AnjaliK
Starting Member

2 Posts

Posted - 2011-04-10 : 11:20:20
Hi ,

Plz tell me, how many hour to execute shrink database query.

I have 300 GB Mdf file and Before two or three days,I have delete massive records. when I see its free space then it show to me its approx 50 GB .Now,approx 22 hrs is going on for executing this query and till now doesn't show to me free space of 1 GB at least but it increase the LDF file size to approx 2 MB

and all of this there is too much fragmentation and can i run the job for defrag the Index and stop shrinking Query Because tomorrow is working .

Thanks,
Anjali
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-04-10 : 12:00:37
Anjali, we can't tell you how long it'll take. But we would recommend shrinking in small increments such as 200MB.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

AnjaliK
Starting Member

2 Posts

Posted - 2011-04-10 : 12:21:49
Hi,

Thanks for your revert.

I am taking 50 MB size for shrinking in increment and target for shrinking is 1000 MB.

Now,Can I stop the query and run Job defrag the Index.

If I stop then it impact it on my production Database Server?

If yes, where?

Thanks
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-04-10 : 16:15:59
Yes you can stop it and defrag. But I'd suggesting defragging AFTER you are done shrinking.

If you stop it, it won't have any impact.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -