Re: Unsplitting a log file?
From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 07/21/04
- Next message: Sadeesh[MSFT]: "Re: sql server installation hung/slow"
- Previous message: Mike: "Error looking at rows with SQL Server"
- In reply to: David Jenkins: "Re: Unsplitting a log file?"
- Next in thread: Sue Hoegemeier: "Re: Unsplitting a log file?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Jul 2004 09:00:54 +0530
Hi,
Do the below steps to remove the second LDF file:-
-- Backup the transaction log
backup log chk to disk='c:\chk.trn'
go
-- Empty the LDF which needs to be removed
dbcc shrinkfile('LDF_LOGICAL_NAME','emptyfile')
go
-- mention the database in which the LDF file needs to be removed.
alter database <dbname> remove file <LDF_LOGICAL_NAME>
Thanks
Hari
MCDBA
"David Jenkins" <davidD0Tjenkins@cmgD0TcoD0Tnz> wrote in message
news:#MCKdpsbEHA.3944@tk2msftngp13.phx.gbl...
> David Jenkins wrote:
>
> > General question.
> >
> > Got a 40GB database which has two log files. I want to be able to delete
> > one of them and return it to a single log file as the database will be
> > moving on to new hardware. I have been unsuccessful so far.
> >
> > I've used a dbcc shrinkfile emptyfile statement on the appropriate log
> > file, followed by a truncate log to purge the info. However this does
> > not empty the second log file completely. It leaves it at 76MB and I
> > cannot delete it accordingly.
> >
> > Any help appreciated.
>
> Should have mentioned that this is SQL7 SP4
- Next message: Sadeesh[MSFT]: "Re: sql server installation hung/slow"
- Previous message: Mike: "Error looking at rows with SQL Server"
- In reply to: David Jenkins: "Re: Unsplitting a log file?"
- Next in thread: Sue Hoegemeier: "Re: Unsplitting a log file?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|