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 decrease the initial size of a DB file?

Author  Topic 

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-06-08 : 17:08:21
How to decrease the initial size of a DB file? Is there an easy option?

GUI and ALTER database statemnets failed!

------------------------
I think, therefore I am - Rene Descartes

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-06-08 : 17:43:49
ALTER DATABASE is the ticket. Post the command that you tried as well as the error.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://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."
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-06-08 : 18:00:10
quote:
Originally posted by tkizer
ALTER DATABASE is the ticket. Post the command that you tried as well as the error.



alter database shr modify file (name=shr ,size =75 )

Msg 5039, Level 16, State 1, Line 1
MODIFY FILE failed. Specified size is less than current size.

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-06-08 : 19:00:37
I misunderstood this topic completely. You'll need to use the DBCC SHRINKFILE command to reduce the size of the file.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://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."
Go to Top of Page

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2009-06-09 : 14:52:23
That worked. Thank you Tara!

------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page
   

- Advertisement -