Monday, March 19, 2012

log file in USE

I am using the following command but it gave me an error that the log file
is in Use
alter database Aspstate set RESTRICTED_USER with ROLLBACK IMMEDIATE
Go
DBCC SHRINKFILE(Aspstate_Log, EMPTYFILE)
Go
any idea what I have to do?
Thanks
Noor
Hi,
Can you take the transaction log backup and try shrinking the transaction
log file.
Backup log <dbname > to disk='d:\backup\dbname.trn'
After that try shrinking the file using the comand:-
DBCC SHRINKFILE(Aspstate_Log, EMPTYFILE)
Thanks
Hari
MCDBA
"Noor" <noor@.ngsol.com> wrote in message
news:exrHGdWdEHA.1648@.TK2MSFTNGP11.phx.gbl...
> I am using the following command but it gave me an error that the log file
> is in Use
> alter database Aspstate set RESTRICTED_USER with ROLLBACK IMMEDIATE
> Go
> DBCC SHRINKFILE(Aspstate_Log, EMPTYFILE)
> Go
> any idea what I have to do?
> Thanks
> Noor
>
|||Thanks HARI
Noor
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:ert9hRYdEHA.3988@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Hi,
> Can you take the transaction log backup and try shrinking the transaction
> log file.
> Backup log <dbname > to disk='d:\backup\dbname.trn'
> After that try shrinking the file using the comand:-
> DBCC SHRINKFILE(Aspstate_Log, EMPTYFILE)
> Thanks
> Hari
> MCDBA
>
> "Noor" <noor@.ngsol.com> wrote in message
> news:exrHGdWdEHA.1648@.TK2MSFTNGP11.phx.gbl...
file
>

No comments:

Post a Comment