Hi @Joao ,
>I think that the question is around the most_recent_sql_handle but I'm not sure
It seems not. sys.dm_exec_sql_text returns the text of the SQL batch that is identified by the specified sql_handle. The sql_handle obtained from sys.dm_exec_connections is most_recent_sql_handle column.
This is the result of query from my environment.
It only shown one user database node2. It seems query result only show one user database. You need to modify the query.
Best regards,
Cathy
If the response is helpful, please click "Accept Answer" and upvote it.