Thor Logo dbatools

Udf

Get-DbaDbUdf

Klaas Vandenberghe (@PowerDbaKlaas)

Get-DbaDbUdf View Source Klaas Vandenberghe (@PowerDbaKlaas) Windows, Linux, macOS Synopsis Retrieves User Defined Functions from SQL Server databases with filtering and metadata Description Retrieves all User Defined Functions (UDFs) from one or more SQL Server databases, returning detailed metadata including schema, creation dates, and data types. This function helps DBAs inventory custom database logic, analyze code dependencies during migrations, and audit user-created functions for security or performance reviews. You can filter results by database, schema, or function name, and exclude system functions to focus on custom business logic.

Read more

Remove-DbaDbUdf

Mikey Bronowski (@MikeyBronowski), bronowski.it

Remove-DbaDbUdf View Source Mikey Bronowski (@MikeyBronowski), bronowski.it Windows, Linux, macOS Synopsis Removes user-defined functions from SQL Server databases. Description Removes user-defined functions from specified databases, providing a clean way to drop obsolete or unwanted UDFs without manual T-SQL scripting. This function is particularly useful during database cleanup operations, code refactoring projects, or when removing deprecated functions that are no longer needed. Supports filtering by schema and function name, and can exclude system UDFs to prevent accidental removal of built-in functions.

Read more