Hi all,
I'm running MS SQL 2000 on a 2003 Server. I have found that the drive that
contains the database has become massively fragmented in the last two months
since the system was put in. I'd like to run defrag on the drive and then
set it up as a scheduled task to run weekly to keep the fragmentation down.
I'm new to the SQL world and don't think that running defrag will mess
anything up but am worried about the "what if" factor. I'm learning SQL out
of a couple of books (no training budget). None of my books say anything
about defrag itself.
Can anyone reassure me that running defrag on a drive with a database on it
is safe? Is there anything I should look out for?
Thanks.
DanIt is safe, as the database is stored on "regular" files (seen from the operating system's
perspective). Just stop the SQL Server service before defragging. And do SQL Server backups first,
just in case. Also, consider why the files are so fragmented. For instance, read this:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Dan Allen" <Dan Allen@.discussions.microsoft.com> wrote in message
news:DBB7C6E1-B36C-4EA5-98EE-9ACC98C527AE@.microsoft.com...
> Hi all,
> I'm running MS SQL 2000 on a 2003 Server. I have found that the drive that
> contains the database has become massively fragmented in the last two months
> since the system was put in. I'd like to run defrag on the drive and then
> set it up as a scheduled task to run weekly to keep the fragmentation down.
> I'm new to the SQL world and don't think that running defrag will mess
> anything up but am worried about the "what if" factor. I'm learning SQL out
> of a couple of books (no training budget). None of my books say anything
> about defrag itself.
> Can anyone reassure me that running defrag on a drive with a database on it
> is safe? Is there anything I should look out for?
> Thanks.
>
> Dan
>|||Tibor,
Thanks for the quick reply. I'm feeling more comfortable about it now.
Dan
"Tibor Karaszi" wrote:
> It is safe, as the database is stored on "regular" files (seen from the operating system's
> perspective). Just stop the SQL Server service before defragging. And do SQL Server backups first,
> just in case. Also, consider why the files are so fragmented. For instance, read this:
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Dan Allen" <Dan Allen@.discussions.microsoft.com> wrote in message
> news:DBB7C6E1-B36C-4EA5-98EE-9ACC98C527AE@.microsoft.com...
> > Hi all,
> >
> > I'm running MS SQL 2000 on a 2003 Server. I have found that the drive that
> > contains the database has become massively fragmented in the last two months
> > since the system was put in. I'd like to run defrag on the drive and then
> > set it up as a scheduled task to run weekly to keep the fragmentation down.
> >
> > I'm new to the SQL world and don't think that running defrag will mess
> > anything up but am worried about the "what if" factor. I'm learning SQL out
> > of a couple of books (no training budget). None of my books say anything
> > about defrag itself.
> >
> > Can anyone reassure me that running defrag on a drive with a database on it
> > is safe? Is there anything I should look out for?
> >
> > Thanks.
> >
> >
> > Dan
> >
>
>
No comments:
Post a Comment