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.
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?