Solution: How to register SQL2014 in Defrag if it does not support this version?

by Jul 30, 2014

I have registered SQL 2008, SQL2012 in my Defrag to monitor them.
Then I tried to register SQL Server 2014 instance too.
Defrag cannot register it because it does not support SQL2014 at all.

What to do?
1. Exit Defrag application
2. Run SSMS, connect to Defrag repository server and SQLDefragRepository database.
3. Go to table SDTI.
4. Execute query:

select * from SQLDefragRepository where sqlid<0 order by ID

You see the sql servers records.
Get the ID of registered sql server latest version, in my case this is sql2012 and id= -1999993638
Ok.

5. Add new server manually, i.e. execute
insert into [dbo].[SDTI]
([ID]
,[ServerID]
,[DatabaseID]
,[TableID]
,[IndexID]
,[SqlID]
,[ServerVersion]
,[Name]
,[SchemaName]
,[IsSystem]
,[IsClustered]
,[IsAutomated]
,[AnalysisState]
,[AuthenticationType]
,[LoginName]
,[Password]
,[EngineEdition]
,[PartitionID])
SELECT -1999993639 — next negative value(!)
,-1999993639 — the same
,[DatabaseID]
,[TableID]
,[IndexID]
,[SqlID]
,[ServerVersion]
,’MYSQL2014_INSTANCE_NAME’ — my new sql server name
,[SchemaName]
,[IsSystem]
,[IsClustered]
,[IsAutomated]
,[AnalysisState]
,[AuthenticationType]
,[LoginName]
,[Password]
,[EngineEdition]
,[PartitionID]
FROM [dbo].[SDTI] where id=-1999993638;

6. Run Defrag and what I see? Yes, sql 2014 registered successfully and Defrag works with it.

😉
With best regards,
Oleg.