ConvertTo-DbaDataTable View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Converts PowerShell objects into .NET DataTable objects for bulk SQL Server operations
Description Converts PowerShell objects into .NET DataTable objects with proper column types and database-compatible data formatting. This is essential for bulk operations like importing data into SQL Server tables using Write-DbaDataTable or other bulk insert methods.
The function automatically detects and converts data types to SQL Server-compatible formats, handling special dbatools types like DbaSize (file sizes) and DbaTimeSpan objects.
Copy-DbaDbTableData View Source Simone Bizzotto (@niphlod) Windows, Linux, macOS Synopsis Streams table data between SQL Server instances using high-performance bulk copy operations.
Description Copies data between SQL Server tables using SQL Bulk Copy for maximum performance and minimal memory usage.
Unlike Invoke-DbaQuery and Write-DbaDbTableData which buffer entire table contents in memory, this function streams data directly from source to destination.
This approach prevents memory exhaustion when copying large tables and provides the fastest data transfer method available.
Copy-DbaDbViewData View Source Stephen Swan (@jaxnoth) Windows, Linux, macOS Synopsis Copies data from SQL Server views to destination tables using high-performance bulk copy operations.
Description Extracts data from SQL Server views and bulk copies it to destination tables, either on the same instance or across different servers.
Uses SqlBulkCopy for optimal performance when migrating view data, materializing view results, or creating data snapshots from complex views.
Supports custom queries against views, identity preservation, constraint checking, and automatic destination table creation.
Jana Sattainathan (@SQLJana), sqljana.wordpress.com
Find-DbaSimilarTable View Source Jana Sattainathan (@SQLJana), sqljana.wordpress.com Windows, Linux, macOS Synopsis Finds tables and views with similar structures by comparing column names across databases
Description Analyzes table and view structures across databases by comparing column names using INFORMATION_SCHEMA views. Returns a match percentage showing how similar structures are based on shared column names.
Perfect for finding archive tables that mirror production structures, identifying tables that might serve similar purposes across databases, or discovering where specific table patterns are used throughout your SQL Server environment.
Get-DbaDbCompression View Source Jess Pomfret (@jpomfret), jesspomfret.com Windows, Linux, macOS Synopsis Retrieves compression settings, sizes, and row counts for tables and indexes across SQL Server databases.
Description This function analyzes data compression usage across your SQL Server databases by examining tables, indexes, and their physical partitions. It returns detailed information including current compression type (None, Row, Page, Columnstore), space usage, and row counts for each object. This is essential for compression optimization analysis, identifying candidates for compression to save storage space, and generating compliance reports on compression usage across your database environment.
Get-DbaDbForeignKey View Source Claudio Silva (@ClaudioESSilva), claudioessilva.eu Windows, Linux, macOS Synopsis Retrieves foreign key constraints from SQL Server database tables
Description Retrieves all foreign key constraint definitions from tables across one or more SQL Server databases.
Essential for documenting referential integrity relationships, analyzing table dependencies before migrations, and troubleshooting cascade operations.
Returns detailed foreign key properties including referenced tables, schema information, and constraint status (enabled/disabled, checked/unchecked).
Supports filtering by database and excluding system tables to focus on user-defined constraints.
Get-DbaDbSequence View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Retrieves SQL Server sequence objects and their configuration details from specified databases.
Description Retrieves sequence objects from SQL Server databases, returning detailed information about each sequence including data type, start value, increment value, and schema location. Sequences provide a flexible alternative to IDENTITY columns for generating sequential numeric values, allowing values to be shared across multiple tables and offering more control over numbering behavior.
Get-DbaModule View Source Brandon Abshire, netnerds.net Windows, Linux, macOS Synopsis Retrieves database modules (stored procedures, functions, views, triggers) modified after a specified date
Description Queries sys.sql_modules and sys.objects to find database modules that have been modified within a specified timeframe, helping DBAs track recent code changes for troubleshooting, auditing, or deployment verification.
Essential for identifying which stored procedures, functions, views, or triggers were altered during maintenance windows or after application deployments.
New-DbaDbSequence View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Creates a new sequence object in SQL Server databases with configurable properties and data types.
Description Creates a new sequence object in one or more SQL Server databases, providing an alternative to IDENTITY columns for generating sequential numbers. This function allows you to configure all sequence properties including data type (system or user-defined), starting value, increment, min/max bounds, cycling behavior, and cache settings.
New-DbaDbTable View Source Chrissy LeMaire (@cl) Windows, Linux, macOS Synopsis Creates database tables with columns and constraints using PowerShell hashtables or SMO objects
Description Creates new tables in SQL Server databases with specified columns, data types, constraints, and properties. You can define table structure using simple PowerShell hashtables for columns or pass in pre-built SMO column objects for advanced scenarios. The function handles all common column properties including data types, nullability, default values, identity columns, and decimal precision/scale.