Prev: How to track transation activities in transaction log in sql serve
Next: Can we have a TVF call inside a Scalar function ?
From: RG on 22 Jul 2010 14:44 Theoretically, we have 24x7 system. However, there are times of a day when there is little or no activity. The database is extremely overallocated and I would like to shrink it. I am thinking of creating a one-time maintenance plan that will perform shrink db maintenance plan task. Are there any issues in me doing so? I realize that the preferred method is to do it in single user mode. Unfortunately, I don't have that luxury now. Thanks in advance
From: Erland Sommarskog on 22 Jul 2010 16:31
RG (RG(a)discussions.microsoft.com) writes: > Theoretically, we have 24x7 system. However, there are times of a day > when there is little or no activity. The database is extremely > overallocated and I would like to shrink it. I am thinking of creating > a one-time maintenance plan that will perform shrink db maintenance plan > task. > > Are there any issues in me doing so? Why not use DBCC SHRINKFILE directly, rather than dealing with maintenance jobs. Make sure that you use a target size when you shrink the database, and also make sure that you run redindex shortly after, since shrink can induce quite some fragmentation. -- Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |