As part of a data warehouse project that I’m working on, I need to be able to grant or deny access to users. I do…
Tag: T-SQL
The following tSQLt test checks that a view is not empty. This test is primarily used to check the views that expose data to the end…
The following tSQLt test checks that all the indexes exist & are enabled as expected: CREATE PROCEDURE testSchema.[test that all indexes exist] AS BEGIN IF…
The following tSQLt test checks the historical unchanging data in a fact table to ensure that it has not been changed unexpectedly as part of…
The following tSQLt test checks the unchanging (or very slowly-changing) data in a dimension or reference table to ensure that it has not been changed…
tSQLt is a great T-SQL based unit testing framework for SQL Server. In addition to using it for unit testing, I’ve recently been (mis)using it…
The following tSQLt test checks that the basic schema of a table (or view) to ensure that it has not been changed unexpectedly as part…
Some time ago I learned that the clustered index (CI) key is implicitly included in all non-clustered indexes (NCIs). This means that if I am creating…
I recently found out that when tuning stored procedures (e.g. for parameter sniffing), you shouldn’t try to tune the queries separately using local variables, e.g.…
Aim: To script multiple database objects using the Object Explorer Details window in SQL Server Management Studio (SSMS). It’s not possible to script multiple objects…