I have an installation of TFS 2012 bound to a SQL Server 2012 instance. They were both trial versions that I registered today. TFS went down and refused to work for a very good reason: the TFS databases were down on the SQL Server machine. SQL was stating that
Database 'Tfs_Configuration' cannot be started in this edition of SQL Server because part or all of object 'tbl_SecurityAccessControlEntry' is enabled with data compression or vardecimal storage format. Data compression and vardecimal storage format are only supported on SQL Server Enterprise Edition.
What happened is that when I entered the license key of SQL Server 2012, it has been “downgraded” from trial (which is implicitly Enterprise) to Standard. Standard doesn’t allow data compression, however at the time of TFS installation the feature was enabled and TFS used it. It was impossible to do anything with the “compression enabled DB” using SQL Server 2012 Standard.
I had to install another trial of SQL Server 2012, attach the databases, disable compression, and attach back the “compression disabled databases” to SQL Server 2012 Standard. I ran DBCC checks to ensure the DB were consistent. No errors were found.
To disable compression, I used the following script:
USE Tfs_Configuration
SELECT DISTINCT 'ALTER INDEX ALL ON ' + OBJECT_NAME(sys.objects.object_id) + ' REBUILD WITH (DATA_COMPRESSION = None);' FROM sys.partitions INNER JOIN sys.objects ON sys.partitions.object_id = sys.objects.object_id WHERE data_compression > 0 AND SCHEMA_NAME(sys.objects.schema_id) <> 'SYS'