T-SQL How to retrieve metadata from SQL proc containing temp tables
1
vote
4
answers
2052
views
I've a T-SQL stored proc running in a Microsoft SQL Server 2019 environment. The proc contains temp tables, dynamic SQL and is 2000+ lines. The proc's output has been verified and tested for completeness and accuracy; re-writing the proc is not an option.
Attempts using sp_describe_first_result_set and OPENROWSET to retrieve metadata have failed due to the use of temp tables and dynamic SQL.
Research links used: and this.
Are there any other approaches to retrieve metadata?
Thoughts?
Asked by TPV
(11 rep)
Mar 26, 2023, 01:24 PM
Last activity: Jun 29, 2025, 04:06 PM
Last activity: Jun 29, 2025, 04:06 PM