Hi all,
I've got a SQL 2000 SP4 server with a database that has 3 data files and 2
logs files.
I no longer need the 2nd log file and I would like to remove it. How is this
best accomplished with no or at least extremely minimal downtime. Is it done
the same way I remove a data file?
DBCC SHRINKFILE (MySecondLogFile, EMPTYFILE)
GO
USE master
GO
ALTER DATABASE MyDatabase
REMOVE FILE MySecondLogFile
Thanks for any advice or pointers!
-PhilHi,
As a first step take a transaction log backup to clear the active portion in
transaction log.
Step -1 - Transaction log backup
Step 2 - DBCC SHRINKFILE EMPTY FILE
Step -3 - ALTER DATABASE REMOVE FILE
Thanks
Hari
SQL Server MVP
"pmattson" <pmattson@.discussions.microsoft.com> wrote in message
news:CA34A3A3-1DC6-42EF-BFB9-C94DC2EC3CB2@.microsoft.com...
> Hi all,
> I've got a SQL 2000 SP4 server with a database that has 3 data files and 2
> logs files.
> I no longer need the 2nd log file and I would like to remove it. How is
> this
> best accomplished with no or at least extremely minimal downtime. Is it
> done
> the same way I remove a data file?
> DBCC SHRINKFILE (MySecondLogFile, EMPTYFILE)
> GO
> USE master
> GO
> ALTER DATABASE MyDatabase
> REMOVE FILE MySecondLogFile
>
> Thanks for any advice or pointers!
> -Phil
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment