Tag Archives: sys.sql_modules

T-SQL – Scripting Stored Procedure to Create backup copy on same database

This post is one of the request from OP. Download SQL  Backup SP in the same database The probelm statement 1:- Create a backup copy of a group of stored procedures on the same database.  Using TSQL I need to … Continue reading

Posted in SQL, T-SQL | Tagged , , , | Leave a comment

SQL – Find encrypted objects using sql_modules or Powershell

sys.sql_modules catalog view which got introduced from SQL 2005 onwards. The sql_modules which includes the objects of type P, RF, V, TR, FN, IF, TF, and R have an associated SQL module.  SQL SELECT  sm.object_id,  OBJECT_NAME(sm.object_id) AS object_name,  o.type, o.type_desc,  sm.definition,  CAST(CASE WHEN sm.definition IS NULL THEN 1 ELSE 0 END AS bit) AS [IsEncrypted]  FROM sys.sql_modules AS sm  JOIN sys.objects AS o ON sm.object_id = o.object_id  ORDER BY o.type; sql_modules to list … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment