|
Home > Archive > MS SQL Server > November 2006 > DBCC SHRINKFILE / SHRINKDATABASE -- A severe error occurred on the current command.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
DBCC SHRINKFILE / SHRINKDATABASE -- A severe error occurred on the current command.
|
|
| Alan Samet 2006-11-30, 12:12 am |
| I've got a database ~2GB w/ a logfile that's around 30 GB. Combined,
they should probably be around 500 MB. I need to do something about it
soon; I'm running out of space. When I attempt to run dbcc
shrinkdatabase or dbcc shrinkfile after attempting to truncate the log,
I get the following error:
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any,
should be discarded.
Here's what I've tried to get around it:
*Take offline/bring online
*detach/attach
*restart
*install service pack
*dbcc checkdb -- tried all options
*dbcc dbreindexall (single user mode)
*backup/restore then try to shrink the database/file; same error occurs
I'm at a loss for what to try next. I thought about trying to export
all objects to another database, but it doesn't seem like the 2005 team
didn't make that too easy for us. Anyone else run into this problem?
-Alan
| |
| Hari Prasad 2006-11-30, 12:12 am |
| Hello,
Do this...
Use <dbname>
go
BACKUP LOG <DBNAME> WITH TRUNCATE_ONLY
GO
DBCC SHRINK FILE('Logical_LDF_na
me','TruncateOnly')
After this verify the LDF usage..
Thanks
Hari
"Alan Samet" <alansamet@gmail.com> wrote in message
news:1164852728.265068.188390@j44g2000cwa.googlegroups.com...
> I've got a database ~2GB w/ a logfile that's around 30 GB. Combined,
> they should probably be around 500 MB. I need to do something about it
> soon; I'm running out of space. When I attempt to run dbcc
> shrinkdatabase or dbcc shrinkfile after attempting to truncate the log,
> I get the following error:
>
> Msg 0, Level 11, State 0, Line 0
> A severe error occurred on the current command. The results, if any,
> should be discarded.
>
> Here's what I've tried to get around it:
>
> *Take offline/bring online
> *detach/attach
> *restart
> *install service pack
> *dbcc checkdb -- tried all options
> *dbcc dbreindexall (single user mode)
> *backup/restore then try to shrink the database/file; same error occurs
>
> I'm at a loss for what to try next. I thought about trying to export
> all objects to another database, but it doesn't seem like the 2005 team
> didn't make that too easy for us. Anyone else run into this problem?
>
> -Alan
>
| |
| Alan Samet 2006-11-30, 12:12 am |
| The statement executed successfully, but the log file is still huge.
There is one thing that's a little suspicious:
DBCC OPENTRAN returns the following:
Replicated Transaction Information:
Oldest distributed LSN : (0:0:0)
Oldest non-distributed LSN : (163265:769:1)
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
-Alan
Hari Prasad wrote:[color=darkred
]
> Hello,
>
> Do this...
>
> Use <dbname>
> go
> BACKUP LOG <DBNAME> WITH TRUNCATE_ONLY
> GO
> DBCC SHRINK FILE('Logical_LDF_na
me','TruncateOnly')
>
> After this verify the LDF usage..
>
> Thanks
> Hari
>
>
> "Alan Samet" <alansamet@gmail.com> wrote in message
> news:1164852728.265068.188390@j44g2000cwa.googlegroups.com...
| |
| Alan Samet 2006-11-30, 7:14 pm |
| ok, so that's weird. I never had replication running on this server,
but I thought I'd try sp_repldone to get rid of that non-distributed
LSN. I had to configure replication to execute the sproc. Once I did
that, the log file shrank quite nicely. My primary database file still
has an issue, but at least I've been able to free up 30GB used by the
log.
If anyone has some advice on the "severe error" thing, let me know.
-Alan
Alan Samet wrote:[color=darkred
]
> The statement executed successfully, but the log file is still huge.
> There is one thing that's a little suspicious:
>
> DBCC OPENTRAN returns the following:
>
> Replicated Transaction Information:
> Oldest distributed LSN : (0:0:0)
> Oldest non-distributed LSN : (163265:769:1)
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> -Alan
>
> Hari Prasad wrote:
|
|
|
|
|