In preparation for a SQL Saturday presentation I have created another report to add to the FREE SQL Server Health reports project.   The Database Size Report has been added to the SQL Health Reports.  The Database Size Report  is the 6th report to be added to the Database Health Reports package. The Database Health reports package is a FREE …

Database Size report added to SQL Health Reports Read more »

I submitted another abstract for SQL Saturday titled TSQL Basics – SQL Server Join Types. Focusing on inner join, left outer join, right outer join, full outer join, cross join and self join. This is for the SQL Saturday in Vancouver BC sessions. That makes three sessions for Vancouver now. I still need to figure out the selection process to …

SQL Server Join Types – inner join, left outer join, right outer join, full outer join, cross join and self join Read more »

Here is a script that I created to get the size of all of the databases on one SQL Server. Generally I stay away from temp tables, especially global temp tables, but I didn’t see a good way to do this without them. CREATE TABLE ##alldatabasesizes   (      dbname    VARCHAR(1024),      type_desc VARCHAR(1024),      name      VARCHAR(1024),      size      INTEGER   ); EXECUTE Sp_msforeachdb ‘INSERT INTO ##AllDatabaseSizes  SELECT db_name() as dbName, type_desc,  name, size FROM [?].sys.database_files’ SELECT * FROM   ##alldatabasesizes; DROP TABLE ##alldatabasesizes

Working on a new report for the SQL Server Health reports, I needed to display the amount of free disk space on a SQL Server. EXEC MASTER..Xp_fixeddrives; Which was useful if I just wanted to look, but I needed to use the results in a query, and I didn’t want to put the results into a temp table, so here is …

Determining free disk space with TSQL Read more »

As part of my planning for the SQL Saturday Presentation in Vancouver I am creating an hour long presentation on Common Table Expressions. The easiest way to do a recursive query in SQL server is to use a recursive CTE (Common Table Expression). What is a Common Table Expression in SQL Server? Similar to the ease of a temporary table …

Recursive CTE’s Read more »

After creating and deploying the duplicate indexes report earlier today I discovered that although the report did exactly what it says, it didn’t do what I needed. The earlier  duplicate indexes report only found indexes that were an exact match on the columns.  And that is useful to track down, it didn’t point out indexes that were similar, but had additional columns. …

Free – Duplicate Indexes Report – Updated Read more »

After yesterdays Long Running Queries Report, I have decided to add one more SQL Server Health report. A duplicate indexes report has been added to the Server Health reports. With this report you can track down time waste associated with duplicate indexes. Here is a sample of the new free report. This is part of my growing collection of free SSRS reports to …

Free – New Duplicate Indexes Report added Read more »