store sql handle from xml to table for later use
Objects pointed to by handles are temporary.  Do not store them, however if you do store them, use a varbinary(64) datatype and realize the object they refer to may not exist in memory later on.

Instead of storing the handle, it's likely much better to pull the actual sql text or plan text, and store that.

From Microsoft Docs:


  The lifetime of sql_handles used to retrieve the SQL text [...] outlives the cached plan used to execute the query. If the query text is not available in the cache, the data cannot be retrieved using the information provided in the function result.