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 |
|
spider
Starting Member
3 Posts |
Posted - 2008-02-12 : 07:15:20
|
| Hi, I wish resize the allocated space of my DB.It's 245GB, but the DB is 50GB.I tryed this query:use masterGOALTER DATABASE mydbMODIFY FILE(NAME = 'mydb_data',SIZE= 50000)GObut I receive an error:Msg 5039, Level 16, State 1, Line 1MODIFY FILE failed. Specified size is less than current size.Can you help me?Thanks |
|
|
CShaw
Yak Posting Veteran
65 Posts |
Posted - 2008-02-12 : 10:34:12
|
| So you want to shrink the file? If that is the case I would run a DBCC Shrinkfile.Chris Shawwww.SQLonCall.com |
 |
|
|
spider
Starting Member
3 Posts |
Posted - 2008-02-12 : 10:50:52
|
| No, I don't want shrink the file! I want to decrease allocation file (245GB) of datafile (50GB)! |
 |
|
|
dewacorp.alliances
452 Posts |
Posted - 2008-02-12 : 11:50:37
|
quote: \No, I don't want shrink the file! I want to decrease allocation file (245GB) of datafile (50GB)!
That is what CShaw said. You need DBCC Shrinkfile on the specific file (data or tlog file). See BOL regarding this syntax. That 250GB will take awhile to shrink it. Log the time this on your UAT environment to see how long it takes. |
 |
|
|
spider
Starting Member
3 Posts |
Posted - 2008-02-12 : 12:28:34
|
| ok thank you very much! |
 |
|
|
|
|
|