Monday, February 27, 2012

HELP!

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 machineYou can use DBCC SHRINKFILE. See BOL for syntax plus look at
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/defaul...b;en-us;Q272318
INF: Causes of SQL Transaction Log Filling Up
http://support.microsoft.com/defaul...b;en-us;Q110139
INF: Transaction Log Grows Unexpectedly or Becomes Full on SQL Server
http://support.microsoft.com/defaul...kb;EN-US;317375
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"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|||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','Trun
cateonly')
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','Trun
cate_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

No comments:

Post a Comment