On behalf of every database administrator everywhere, I implore you not to run CHKDSK
on a system that has a live database installed and running. This includes, but is not limited to:
- SQL Server
- PostgreSQL
- MySQL
- MariaDB
- SQLite
- Oracle
- DB2
This also includes development and test environments.
If you have any of these database systems installed, please make sure they aren’t running if you feel the need to run CHKDSK
. This is especially true if you add the /r
switch to attempt a repair. CHKDSK
can physically move data from one place on a drive elsewhere, and this can cause database corruption if those files are in use.
If you need to run CHKDSK /r
for any reason, make sure you set it to run in Safe mode, before any services start. Also make sure you have full backups of your databases. That means testing them too.
This seems obvious, but it isn’t if I have to write a blog post about it.
I couldn’t agree more, Randolph. (Great to read from you again, by the way!)
However, a lot of DBAs do not administer the windows server they are their DBs having on. That are oftentimes other folks. If someone of them has the glorious idea to run CHKDSK /r with a schedule, the only hope of the DBA is to have a backup. Therefore: Take backups. Frequently. Hope is not a strategy!
This post was more targeted at system administrators, not DBAs. Thank you for commenting!
Comments are closed.