Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Changing the initial size of db file Expand / Collapse
Author
Message
Posted Monday, January 19, 2009 9:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:39 PM
Points: 7,084, Visits: 14,681
binary lumberjack (1/19/2009)
You can't shrink below the initial size. Your only option is to back up the database, drop and recreate it with a lower initial size, and then restore. You should only set the initial size when you know you will always need at least that much space.


Again - if you use shrinkdatabase, that might be true, but shrinkfile DOES in fact allow you to make the initial size smaller.....


----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Post #639404
Posted Monday, March 23, 2009 10:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, April 13, 2012 9:10 AM
Points: 1, Visits: 128
It looks like shrinkfile worked as I can see all the expected size from sys.database_files and sqlperf(logspace). But the actual size of the logfile still keeps the same physical size as the initial size.
Post #681640
Posted Wednesday, March 30, 2011 10:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 8:14 PM
Points: 4, Visits: 272
Make sure the log has been backed up first or set the recovery model to simple.

This will allow the log file to be shrunk to a size smaller than the original file size specified.
Post #1086614
Posted Monday, April 09, 2012 9:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:05 PM
Points: 9, Visits: 32
shrinkfile will let you go below the initial size. I shrunk the file and tried to lower the initial size, stopped and restarted the sql service and it went right back to the original initial size. Does that make any sense?
Post #1280215
Posted Thursday, December 27, 2012 5:47 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, April 14, 2014 9:52 AM
Points: 30, Visits: 275
From BOL:
You can reduce the default size of an empty file by using DBCC SHRINKFILE target_size. For example, if you create a 5-MB file and then shrink the file to 3 MB while the file is still empty, the default file size is set to 3 MB. This applies only to empty files that have never contained data.



Post #1400762
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse