Friday, February 24, 2012

Drive Fragmentation

The drive on my SQL 2K Server is highly fragmented. Do I
need to shut down SQL before I run the defrag or can I
just run it?From an old post...
There are 2 kinds of fragmentation. You have fragmentation at the OS (or
file) level and at the Table level inside the DB file(s). The first kind
(OS) can be fixed with a product like Disk Keeper but you have to stop SQL
Server for it to work. The .MDF will only be fragmented if you didn't have
enough contiguous space when you created it or if it was resized at a later
date and there wasn't a contiguous space. More than likely it is at the
table level. If you have clustered indexes you can use DBCC DBREINDEX or
DBCC INDEXDEFRAG to fix that.
HTH
Ryan Waight, MCDBA, MCSE
"JUSBYS" <anonymous@.discussions.microsoft.com> wrote in message
news:061901c3a545$4c761780$a001280a@.phx.gbl...
> The drive on my SQL 2K Server is highly fragmented. Do I
> need to shut down SQL before I run the defrag or can I
> just run it?
>|||I was told from a defrag too manufacturer that you can defrag it without
shutting down SQL Server. I still don't defrag without shutting down,
though... :-)
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"JUSBYS" <anonymous@.discussions.microsoft.com> wrote in message
news:061901c3a545$4c761780$a001280a@.phx.gbl...
> The drive on my SQL 2K Server is highly fragmented. Do I
> need to shut down SQL before I run the defrag or can I
> just run it?
>|||If this fragmentation is of the OS type and you have
enough room, you can try a utility from
www.sysinternals.com called 'contig'. This will defrag
individual database files without needing to shut down the
database. I use it here to defrag my Oracle and SQL
Server databases and I've never had a problem with it.
That's said, every environment is different so test it
EXTENSIVELY and make sure your backup/recovery plan is
bulletproof before turning on a live system!
HTH
>--Original Message--
>The drive on my SQL 2K Server is highly fragmented. Do I
>need to shut down SQL before I run the defrag or can I
>just run it?
>
>.
>

No comments:

Post a Comment