Hi @Stephen Schleyer
Here is a query to check if Truncate or Delete are used in the definition of SP, views or functions.
SELECT o.name AS ObjectName,
o.type_desc AS ObjectType,
m.definition AS ObjectDefinition
FROM sys.sql_modules m INNER JOIN sys.objects o ON m.object_id = o.object_id
WHERE m.definition LIKE '%TRUNCATE%' OR m.definition LIKE '%DELETE%'
Best regards,
Cosmog Hong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".