Thor Logo dbatools

Table

ConvertTo-DbaDataTable

Chrissy LeMaire (@cl), netnerds.net

ConvertTo-DbaDataTable View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Copy-DbaDbTableData

Simone Bizzotto (@niphlod)

Copy-DbaDbTableData View Source Simone Bizzotto (@niphlod) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Copy-DbaDbViewData

Stephen Swan (@jaxnoth)

Copy-DbaDbViewData View Source Stephen Swan (@jaxnoth) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Find-DbaSimilarTable

Jana Sattainathan (@SQLJana), sqljana.wordpress.com

Find-DbaSimilarTable View Source Jana Sattainathan (@SQLJana), sqljana.wordpress.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaDbCompression

Jess Pomfret (@jpomfret), jesspomfret.com

Get-DbaDbCompression View Source Jess Pomfret (@jpomfret), jesspomfret.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaDbForeignKey

Claudio Silva (@ClaudioESSilva), claudioessilva.eu

Get-DbaDbForeignKey View Source Claudio Silva (@ClaudioESSilva), claudioessilva.eu Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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).

Read more

Get-DbaDbSequence

Adam Lancaster, github.com/lancasteradam

Get-DbaDbSequence View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaModule

Brandon Abshire, netnerds.net

Get-DbaModule View Source Brandon Abshire, netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

New-DbaDbSequence

Adam Lancaster, github.com/lancasteradam

New-DbaDbSequence View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

New-DbaDbTable

Chrissy LeMaire (@cl)

New-DbaDbTable View Source Chrissy LeMaire (@cl) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more
← Previous
1 2
Next →
Page 1 of 2