I thought I had the same problem, but later learned that the DB was set to an 
"initial size" of 40GB even though it only needed 15.  This was to:
A) prevent the DB from going through an "autogrow" during business hours, and 
B) prevent the possibility of the DB needing to autogrow and the drive not 
having enough space available (this would cause a crash).

To see if this is the case, right click the database and select properties.  On 
"select a page" section of the DB properties, select files.  In that window the 
4th section is initial size.  It should agree with what you are seeing when you 
look at the size of the .mdf in windows explorer (65GB).

Warning - make sure you have a good backup AND allow plenty of time for 
processing.  Depending on the power and memory of your server this could take 
many hours.  You might want to try a dry run on a non-production database 
and/or server.

Assumption - we are working with SQL2005 Pro or Enterprise with at least 2 
dual-core processors and at least 4GB RAM, and a high speed SCSI array or SAN.  
Read/Write speed will be a determining factor in how long this will run.  Slow 
older drives could double or triple the amount of time needed.

To free up the space (although I don't recommend it), you will follow the 
directions previously discussed to shrink, with a couple exceptions;
right click the DB and select TASK - SHRINK - FILES.  In the "available size" 
it will have a number around 30GB.  If you subtract this from the "currently 
allocated space " you will get the number of GB you need for your DB.  Add 1 
GB.  In the bottom portion of the screen where it says shrink action select the 
second option: "reorg pages" - and set the "shrink file to" size to the number 
you came up with in the previous step.  I would guess this will take 4-5 hours 
to shrink, reorg, and release the space.   Again, depending on what's under the 
hood.

Good luck!

Mike




  ----- Original Message ----- 
  From: Craig Fidler 
  To: Axapta-Knowledge-Village@yahoogroups.com 
  Sent: Monday, October 27, 2008 3:56 AM
  Subject: RE: [Axapta-Knowledge-Village] Db Size



  Jim tried that.



  From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Jim Hummer
  Sent: Friday, October 24, 2008 2:32 PM
  To: axapta-knowledge-village@yahoogroups.com
  Subject: RE: [Axapta-Knowledge-Village] Db Size



  Do the function by file and it will work better.
   
  Jim


  ======================================================= 


------------------------------------------------------------------------------

  Extend your network, join the Microsoft Dynamics AX Knowledge Village at 
LINKEDIN ! Microsoft Dynamics AX Knowledge Village 


------------------------------------------------------------------------------


  To: Axapta-Knowledge-Village@yahoogroups.com
  From: [EMAIL PROTECTED]
  Date: Fri, 24 Oct 2008 12:00:28 +0200
  Subject: RE: [Axapta-Knowledge-Village] Db Size



  Hi,



  Have tried the shrink function to no avail



  From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Joydeep Dasgupta
  Sent: Friday, October 24, 2008 11:03 AM
  To: Axapta-Knowledge-Village@yahoogroups.com
  Subject: Re: [Axapta-Knowledge-Village] Db Size



        Hi



        Try the "SHRINK" option from the Enterprise Manager toolbar. Just 
check, you need to give the % i.e how much need to be free.



        Regards



        Joydeep


        Extend your network, join the Microsoft Dynamics AX Knowledge Village 
at LINKEDIN ! Microsoft Dynamics AX Knowledge Village 


        --- On Tue, 10/21/08, Craig Fidler <[EMAIL PROTECTED]> wrote:

          From: Craig Fidler <[EMAIL PROTECTED]>
          Subject: [Axapta-Knowledge-Village] Db Size
          To: Axapta-Knowledge-Village@yahoogroups.com
          Date: Tuesday, October 21, 2008, 8:10 AM

          Hi All,



          When looking at my Ax db it is 65gig with 54% free space. How do I 
free up that free space?



            

          Thanks
       







   

Reply via email to