Tag Archives: database

Disk Space – Finding I/O Bottlenecks(SQLIO)

As a production DBA , I get to start diving into the internals of the SQL Server environment. Over the last year, we had an opportunity to ‘let loose’ on a new clustered environment with a dedicated SAN.  Zoom… Zoom…Zoom! It was like performing sea trials or a shakedown tour in a new ship. Much of the testing centered around the execution of existing SQL code and processes. We were able to set-up a series of tests using the  Microsoft ‘s  SQLIO Disk Subsystem Benchmark Tool to saturate the disk subsystems.

 The tool does not actually test your SQL Server configuration , but provides the means to script out and execute a controlled load against the disk subsystem. Scripts can be executed to create a variety of read and write operations. Parameters allow the load to use a variety of file sizes, number of threads, latency, outstanding requests in random or sequential reads/writes for specific durations.   I am not going to get into the specifics of the scripts we used. The links below provide a much better examples than I could tap out in this post.

Read more »

For Each … SQL System Stored Procedures

Sql server has some great built-in commands procs that can help you script server or database wide commands. sp_MSForEachTable and Sp_MSForEachDb

When first looking at a database , I sometimes like to run the following:
execute sp_MSforEachTable @command1=‘Print ”?”; Select Count(*) as [? – (count)] from ?;Select Top 10 * from ? ‘

I used the sp_MSforeachDB just the other day to set all the non-system
databases on a test server to Simple Recovery mode.Just made a quick stored procedure that I passed the ? value and filter out the system databases ( Master, Model, Tempdb and MSDB).

For More Information Checkout :

November 30, 2004
SQL Server Undocumented Stored Procedures sp_MSforeachtable and sp_MSforeachdb
By Gregory A. Larsen