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 |
|
sumwanlah
Starting Member
43 Posts |
Posted - 2004-01-05 : 06:09:35
|
Hey FolksI'm trying to run a dbcc shrinkfile (emptyfile option) on a existing file (only 25% used, with 100GB of space available) in the Primary Filegroup to a newly-created file in the same group. Obviously, the emptyfile option didn't work this way, which is why I'm writing in... Strangely though, the emptyfile option works if the the newly-created file is emptied onto the already existing file, which is not what I want.The whole point is that I'm trying to free up that 100GB space. I've tried truncates, compress&truncate and now emptyfile. Nothing seems to work.I also noticed something strange in my Enterprise Manager Taskpad for this same database. The Taskpad indicates that the database has no space available! It should show the same 100GB free space!I've recently applied a patch to fix something else on this database:Refer to Microsoft KB's Q811205.------------------------What goes around...? Is the belt around my waist! |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-01-05 : 12:36:02
|
| Have you run DBCC UPDATEUSAGE to get EM to show the correct information?Have you run DBCC SHRINKDATABASE? What is your database recovery model set to? If FULL, are you running BACKUP LOG occassionally?Tara |
 |
|
|
sumwanlah
Starting Member
43 Posts |
Posted - 2004-01-05 : 20:50:37
|
| ARGH!!! *hand slaps forehead* Rats!How did I forget DBCC UPDATEUSAGE?!?!? Urgh! I'm running that as we speak, though it's gonna take some time (2.5TB db).I'd already used DBCC SHRINKDATABASE also, and it too didn't work then. Let's see what happens after UPDATEUSAGE. In case you wanna know, I'm using BULK-LOGGED recovery mode. 10x!------------------------What goes around...? Is the belt around my waist! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-01-06 : 12:08:42
|
| Are you running BACKUP LOG occasionally? You can't shrink the log unless it has room to shrink.Tara |
 |
|
|
sumwanlah
Starting Member
43 Posts |
Posted - 2004-01-06 : 20:45:17
|
I run Backup Log once daily actually. But my problem's not with the Log file, it's with a data file in the Primary filegroup. I've already done UPDATEUSAGE twice, SHRINKDATABASE once, and EMPTYFILE twice more, I'm still not able to free my 100GB! "Gimme back my 100GB!!!" ------------------------What goes around...? Is the belt around my waist! |
 |
|
|
scottpt
Posting Yak Master
186 Posts |
Posted - 2004-01-07 : 10:52:53
|
| Have you tried running shrink file specifying a size? It will try and get the file as close to that size as possible. |
 |
|
|
sumwanlah
Starting Member
43 Posts |
Posted - 2004-01-08 : 02:25:02
|
Yup. Been there, done that too... Still ain't budgin'... ------------------------What goes around...? Is the belt around my waist! |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-01-08 : 07:54:35
|
| If you can't get that working, you can use bcp to export all of your tables to files, truncate all the data, shrink the database, then bcp the data back in. If you have foreign keys you'll have to drop them in order to use TRUNCATE TABLE though. |
 |
|
|
|
|
|
|
|