Re: HELP!!
From: Hari (hari_prasad_k_at_hotmail.com)
Date: 04/15/04
- Next message: Andy: "Re: ms sql server 2000 security too weak ?"
- Previous message: Geoff N. Hiten: "Re: Counting number of IO Accesses per DB"
- In reply to: DAVE: "HELP!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 15 Apr 2004 09:34:29 +0530
Hi,
The best option is shrinking the transaction log and data file individually
using the DBCC SHRINKFILE command.
How to check the Transaction log file size and usage, execute the below
command
DBCC SQLPERF(LOGSPACE)
How to shrink the transaction log file if your database is FULL recovery
model.
1. Backup the Transaction Log using (Backup log command)
2. Use DBCC SHRINKFILE('logical_tran_log_name','Truncateonly')
How to shrink the transaction log file if your database is Simple recovery
model.
1. Truncate the Transaction Log using (Backup log dbname with triuncateonly
command)
2. Use DBCC SHRINKFILE('logical_tran_log_name','Truncate_only')
How to shrink the data files
1. Check any open transactions or there using DBCC OPENTRAN(DBname)
2. If not, Run DBCC SHRINKFILE('logical_datafile_name',size)
Note:
If your data is not that critical (Development Server) and if you do not
require a time based
recovery go for SIMPLE recovery Model for your database. This
require less monitoring of tranasction log usage.
Thanks
Hari
MCDBA
"DAVE" <anonymous@discussions.microsoft.com> wrote in message
news:64DAA4E3-173F-43B6-A12A-104336227E8A@microsoft.com...
> how do i reduce the size of an mdf and ldf file in sql server2000. they
have grown to the point of locking up my machine
- Next message: Andy: "Re: ms sql server 2000 security too weak ?"
- Previous message: Geoff N. Hiten: "Re: Counting number of IO Accesses per DB"
- In reply to: DAVE: "HELP!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|