-
Windows disk throughput benchmark steps with sqlio
Credits to Linchi Shea, SQLServerPedia/Brent Ozar, and Jonathan Kehayias for their discussions on sqlio. Update: The test below, against one drive, can run for more than 1 hour. That is a long time. I’ve tested running 2 sqlio batch scripts against 2 locally attached drives, similar to the ones listed below, and found the results…
-
Parse sqlio log file with Python pyparsing
-
Utility script for instance level objects comparison between 2 SQL Server instances
Useful for SQL Server upgrade and migration, instance consistency check in the enterprise, et cetera. Known assumptions: 1. pyodbc and proper SQL Server database driver setup and tested; 2. Windows Active Directory trusted connection to both instances. Login/password can also be used with very simple modification of the code; 3. Proper permission is set on…
-
Search objects in SQL Server databases with pyodbc
Command line utility to search for objects based on names. Search results will be displayed in well formatted tabular format, left-justified. 1. pyodbc installed; 2. Use trusted authentication by default. Find the relevant code to adjust to login/password as needed; 3. -w for wild card search. Default is exact name match, case insensitive in almost…
-
Drop a schema and all its objects in SQL Server
Via Ranjith Kumar S, a script to drop all objects in a schema and then the schema itself in SQL Server. I made very slight modifications so stored procedure creation is unnecessary. All you need is adjusting values for @SchemaName and @WorkTest variables. Limitations: 1. If a table has a PK with XML or a…