New-DbaDbFileGroup View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Creates new filegroups in SQL Server databases for custom data storage organization.
Description Creates a new filegroup for the specified database(s), supporting standard row data, FileStream, and memory-optimized storage types. This is useful when you need to separate table storage across different disk drives for performance optimization, implement compliance requirements, or organize data by department or function. The filegroup is created empty and requires adding data files with Add-DbaDbFile before it can store data.
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.
Remove-DbaDbData View Source Jess Pomfret (@jpomfret), jesspomfret.com Windows, Linux, macOS Synopsis Truncates all user tables in specified databases to remove all data while preserving table structure.
Description Removes all data from user tables by truncating each table in the specified databases. When foreign keys or views exist that would prevent truncation, the function automatically scripts them out, drops them temporarily, performs the truncation, then recreates the objects with their original definitions and permissions.
Remove-DbaDbFileGroup View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Removes empty filegroups from SQL Server databases.
Description Removes one or more filegroups from SQL Server databases after validating they contain no data files. This command is useful for cleaning up unused filegroups after moving data to different filegroups or during database reorganization projects. The function performs safety checks to ensure filegroups are empty before removal and provides detailed error messages if removal fails due to dependencies or constraints.
Remove-DbaDbSequence View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Removes database sequence objects from SQL Server instances.
Description Removes sequence objects from SQL Server databases, freeing up schema namespace and cleaning up unused database objects.
Sequences are commonly used for generating unique numeric values and may need removal during application changes or database cleanup.
When used without a pipeline, the function will first retrieve matching sequences using Get-DbaDbSequence with the provided parameters, then remove them.
Remove-DbaDbTableData View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Performs batch deletion of table data while controlling transaction log growth during large-scale data removal operations.
Description Safely removes large amounts of table data without causing transaction log file growth issues that typically occur with single large DELETE operations. This command implements Aaron Bertrand’s chunked deletion technique (https://sqlperformance.com/2013/03/io-subsystem/chunk-deletes) to break large deletions into manageable batches, preventing log file expansion and blocking issues.
Select-DbaDbSequenceNextValue View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Retrieves and increments the next value from a SQL Server sequence object.
Description Executes a SELECT NEXT VALUE FOR statement against the specified sequence, which increments the sequence counter and returns the next value in the series.
This is useful for testing sequence behavior, troubleshooting sequence issues, or retrieving sequence values for application logic.
Note that calling this function will permanently increment the sequence counter, so it’s not just a read operation.
Set-DbaDbFileGroup View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Modifies filegroup properties including default designation, read-only status, and auto-grow behavior.
Description Modifies key properties of database filegroups including setting the default filegroup for new objects, changing read-only status for data archival, and configuring auto-grow behavior across all files in the filegroup. Use this when you need to restructure database storage layout, implement data archival strategies, or optimize file growth patterns.
Set-DbaDbFileGrowth View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Modifies auto-growth settings for database data and log files to use fixed-size increments instead of percentage-based growth.
Description Configures database file auto-growth settings using ALTER DATABASE statements to replace default percentage-based growth with fixed-size increments. This prevents unpredictable growth patterns that can cause performance issues and storage fragmentation as databases grow larger. Defaults to 64MB growth increments, which provides better control over file expansion and reduces the risk of exponential growth that can quickly consume available disk space.
Set-DbaDbSequence View Source Adam Lancaster, github.com/lancasteradam Windows, Linux, macOS Synopsis Modifies properties of existing SQL Server sequence objects
Description Modifies existing SQL Server sequence objects by updating their properties such as increment value, restart point, minimum and maximum bounds, cycling behavior, and cache settings. This function is essential when you need to adjust sequence behavior after deployment, fix increment issues, or optimize performance without recreating the sequence and losing its current state.