Saturday, February 19, 2011

Check Change Tracking status using T-SQL

In case you need to check if a database has SQL Server change tracking activated, you can use the sys view change_tracking_databases.

As it does only include the database_id, use this SQL statement to retrieve the status for a given database.

select * from sys.change_tracking_databases where database_id=(select database_id from sys.databases WHERE name = 'MyDatabase')

The result contains all information you can also configure using SQL Server Management Studio.

image

If you want to retrieve the state for a given table, use sys.change_tracking_tables.

More information on these two views can be found in Configuring and Managing Change Tracking.

Saturday, February 12, 2011

Ignoring the manager

A server is doing the same as I (sometimes) at the office, but for different reasons…

image

Wednesday, February 9, 2011

Displaying checksums and hashes within Windows Explorer

In case you want to have a quick way to check if two files are really identical, you will most likely use a hash tool and view the SHA-1 or MD5 hash.

The best I have found so far is HashCheck Shell Extension by Kai Liu which will simply add a tab on the file properties dialog of the Windows Explorer. Easy, fast and works with Windows 7 (x32 or x64).

image