Script to List Row Counts of All Tables

Something I had a use for the other day that I thought I would share.  The following script can be run as-is against any SQL Server database, and will list one row per table and give you the row (record) count for each table.  The results are sorted and returned as a single result set…

3

SQL Profiler EventClass & EventSubClass Column Descriptions

You can use SQL Profiler to store trace data into files or tables.  If you configure SQL Profiler to store trace information into a SQL Server table, you will notice that the EventClass and EventSubClass descriptions are converted to numeric values instead of textual descriptions.  This is because numeric values are language neutral, whereas SQL…

8

Database Change Scripts – Mambo Style

One of the more traditional approaches to database development is where developers simply work against a shared database instance through SQL Management Studio or Enterprise Manager.  Changes are thought of, designed through a GUI interface, and DDL is created and applied right then and there.  If you’ve ever taken this approach, you already know it’s…

4