When I run
SELECT OBJECT_DEFINITION(m."object_id")
FROM sys.sql_modules m
and output results to text, the definition is truncated for long definitions > 8192 characters. I have maximum characters displayed maxed out at 8192.This function is nearly useless if it cannot output a definition that runs past a small arbitrary limit of 8192 characters, so Microsoft probably thought of a workaround.
What is the (T-SQL, not GUI) workaround to show the entire object definition?