Copy-DbaXESession View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Copies Extended Event sessions from one SQL Server instance to another, excluding system sessions.
Description Copies custom Extended Event sessions between SQL Server instances while preserving their configuration and running state. This function scripts out the session definitions from the source server and recreates them on the destination, making it essential for server migrations, standardizing monitoring across environments, or setting up disaster recovery instances.
Export-DbaBinaryFile View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Extracts binary data from SQL Server tables and writes it to physical files.
Description Retrieves binary data stored in SQL Server tables and writes it as files to the filesystem. This is useful for extracting documents, images, or other files that have been stored in database columns using binary, varbinary, or image datatypes.
The function automatically detects filename and binary data columns based on column names and datatypes, but you can specify custom columns if needed.
Export-DbaDbTableData View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Generates INSERT statements from table data for migration and deployment scripts
Description Creates executable INSERT statements from existing table data, making it easy to move data between SQL Server instances or environments. This is particularly useful for migrating reference tables, lookup data, or configuration tables where you need the actual data values rather than just the table structure. The generated scripts include proper USE database context and can be saved to files or piped to other commands for further processing.
Export-DbaScript View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Generates T-SQL CREATE scripts from SQL Server Management Objects for migration and deployment
Description Takes any SQL Server Management Object from dbatools commands and converts it into executable T-SQL CREATE scripts using SMO scripting. This lets you script out database objects like tables, jobs, logins, stored procedures, and more for migration between environments or backup purposes. The function handles proper formatting with batch separators and supports custom scripting options to control what gets included in the output.
Get-DbaBinaryFileTable View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Identifies tables containing binary columns and their associated filename columns for file extraction operations.
Description Scans database tables to find those containing binary data columns (binary, varbinary, image) and automatically identifies potential filename columns for file extraction workflows. This function is essential when you need to extract files that have been stored as BLOBs in SQL Server tables but aren’t sure which tables contain binary data or how the filenames are stored.
Get-DbaRgClassifierFunction View Source Alessandro Alpi (@suxstellino), alessandroalpi.blog Windows, Linux, macOS Synopsis Retrieves the Resource Governor classifier function configured for workload group assignment
Description Retrieves the custom classifier function that Resource Governor uses to determine which workload group incoming connections are assigned to. The classifier function contains the business logic that evaluates connection properties (like login name, application name, or host name) and returns the appropriate workload group name. This function is always stored in the master database and is essential for understanding how Resource Governor categorizes and manages SQL Server workloads.
Import-DbaBinaryFile View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Loads binary files from the filesystem into SQL Server database tables
Description Reads binary files from disk and stores them in SQL Server tables with binary, varbinary, or image columns. This is useful for storing documents, images, executables, or any file type directly in the database for archival, content management, or application integration scenarios.
The command automatically detects the appropriate columns for storing file data - it looks for binary-type columns (binary, varbinary, image) for the file contents and columns containing “name” for the filename.
Start-DbaMigration View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Migrates entire SQL Server instances including all databases, logins, server configuration, and server objects from source to destination servers.
Description Start-DbaMigration consolidates most of the migration tools in dbatools into one command for complete instance migrations. This function serves as an “easy button” when you need to move an entire SQL Server instance to new hardware, perform version upgrades, or consolidate servers.
Sync-DbaLoginPassword View Source Shawn Melton (@wsmelton), http://www.wsmelton.com Windows, Linux, macOS Synopsis Synchronizes SQL Server login passwords between instances using hashed password values.
Description Syncs SQL Server authentication login passwords from a source to destination instance(s) without requiring knowledge of the actual passwords. Uses the same technique as Microsoft’s sp_help_revlogin by extracting and applying hashed password values.
This is particularly useful for:
Maintaining consistent passwords across Availability Group replicas Migrating logins between instances when users cannot provide their passwords Disaster recovery scenarios where password synchronization is critical Keeping development/test environments synchronized with production passwords The function only works with SQL Server authentication logins.
Sync-DbaLoginPermission View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Synchronizes login permissions and role memberships between SQL Server instances.
Description Syncs comprehensive login security settings from a source to destination SQL Server instance, ensuring logins have consistent permissions across environments. This function only modifies permissions for existing logins - it will not create or drop logins themselves.
The sync process handles server roles (sysadmin, bulkadmin, etc.), server-level permissions (Connect SQL, View any database, etc.