I have been asked how to automate SQLIOSim on several occasions. SQLIOSim is a utility to test SQL Server I/O integrity (not performance) patterns against a system without needing to install SQL Server on the system. It ships with SQL Server 2008 and SQL Server 2008 R2 and is located in the BINN directory.
There is a GUI version of SQLIOSim.exe and a command line version SQLIOSim.com.
You can invoke the command line version (.com) from a batch file and check the return value.
- 0 = No Errors or Warnings encountered and all cycles completed
- NOT 0 = Error, Warning or CTRL+C, cycles were not completed
Be sure to set the StopOnError=TRUE in the configuration file you are using. This way when an error is encountered the testing cycles are interrupted and control is returned to the command prompt where you can check the ERRORLEVEL.
You should take a look at the SQL Server High Availability website for more details. Specially the "SQL Server I/O Reliability Program" that outlines a common SQLIOSim stress test.
Bob Dorr - Principal SQL Server Escalation Engineer