Link to home
Start Free TrialLog in
Avatar of wilson0728
wilson0728

asked on

How do I defrag a drive with a sql db?

I've very seldomly used SQL but have noticed that the drive that our big SQL database is on is really fragmented and maybe the database itself.

If I run a regular disk defrag on the hard drive with either windows or diskeeper, will I do any damage to the database?

Also, how do I go about defragging the database itself, or is this even possible?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of udaya kumar laligondla
udaya kumar laligondla
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also worth mentioning, that the physical database files can only become fragmented on disk when the file is initially created or it is expanded.  This is a good reason in itself to not have auto grow enabled.  It allows you to plan ahead for manual expansion and defragmentation of the database.