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 |
|
sndhearn
Starting Member
1 Post |
Posted - 2004-09-21 : 11:58:24
|
| Hi,Im having a nightmare. I am trying to free up space on our server. One of the databasesis 10 gb in size, 8 gb used and 2 gig free space. All I want to do is free the 2 gb back to the OS, but everything I try fails. According to the documentation:DBCC SHRINKDATABASE (i3_eic, TRUNCATEONLY)should do it, but nothing happens, and it returns no error messages. I have also tried many other variations of this to try and shrink it but to no avail.Anybody got any ideas, or should I just buy more hard disks.Cheers,Simon |
|
|
hgorijal
Constraint Violating Yak Guru
277 Posts |
Posted - 2004-09-22 : 02:01:29
|
| TRUNCATEONLY release only the pages at the end of the file.Perform SHRINKDATABASE with NOTRUNCATE; this move the datapages from the end of the file to any unused pages in the begining of the file. Then perform SHRINKDATABASE with TRUNCATEONLY; this truncates the unused pages at the end of the file and releases it to the OS.Hemanth GorijalaBI Architect / DBA... |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-09-22 : 02:08:02
|
| how about truncating the log file? be sure to back it up first if you will need itbackup log logfilename with truncate_onlythen issue the dbcc shrinkdatabase command |
 |
|
|
|
|
|