I have a requirement to upgrade a SQL Server from SQL 2008R2 to 2019. Microsoft provides the data migration assistant (DMA) to help with analysing SQL code for compatibility issues. Running a static analysis on the databases is fine, but in order to capture running code, e.g. from applications with embedded SQL, we need to set up an extended events session. The Microsoft Learn page provides the code to do this, but the chosen Extended Event (sql_batch_completed) does not exist in 2008R2. However, there is a similar event = sql_statement_completed.

MS Learn: https://learn.microsoft.com/en-us/sql/dma/dma-assesssqlonprem?view=sql-server-ver16

I viewed available events using this TSQL:

select pkg.name as PackageName, obj.name as EventName
from sys.dm_xe_packages pkg
inner join sys.dm_xe_objects obj on pkg.guid = obj.package_guid
where obj.object_type = 'event'
  and pkg.name = 'sqlserver'
order by 1, 2

So my question is, will the DMA successfully parse and analyse an extended events file using this event? If not, is there another event or solution to capture running SQL that can be used with the DMA that is compatible with 2008R2?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.