Dismount-DbaDatabase View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Detaches one or more databases from a SQL Server instance with built-in safety checks and validation.
Description Safely detaches databases from SQL Server instances while performing comprehensive validation checks before detachment. This function automatically validates that databases aren’t system databases, replicated, or have active snapshots, preventing common detachment failures.
Stephen Bennett, sqlnotesfromtheunderground.wordpress.com
Find-DbaDatabase View Source Stephen Bennett, sqlnotesfromtheunderground.wordpress.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Searches multiple SQL Server instances for databases matching name, owner, or Service Broker GUID patterns
Description Performs database discovery and inventory across multiple SQL Server instances by searching for databases that match specific criteria. You can search by database name (using regex patterns), database owner, or Service Broker GUID to locate databases across environments.
Find-DbaDbGrowthEvent View Source Aaron Nelson Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves database auto-growth and auto-shrink events from the SQL Server Default Trace
Description Queries the SQL Server Default Trace to identify when database files have automatically grown or shrunk, providing detailed timing and size change information essential for performance troubleshooting and capacity planning. This function helps DBAs investigate unexpected performance slowdowns caused by auto-growth events, analyze storage growth patterns to optimize initial file sizing, and track which applications or processes are triggering unplanned database expansions.
Find-DbaOrphanedFile View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Identifies database files on disk that are not attached to any SQL Server database instance
Description Scans filesystem directories for database files (.mdf, .ldf, .ndf) that exist on disk but are not currently attached to the SQL Server instance. This is essential for cleanup operations after database drops, detaches, or failed restores that leave behind orphaned files consuming disk space.
Get-DbaDatabase View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com , Klaas Vandenberghe (@PowerDbaKlaas) , Simone Bizzotto (@niphlod) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves database objects and metadata from SQL Server instances with advanced filtering and usage analytics.
Description Retrieves detailed database information from one or more SQL Server instances, returning rich database objects instead of basic metadata queries.
Get-DbaDbAssembly View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves CLR assemblies registered in SQL Server databases for security auditing and inventory management.
Description Retrieves detailed information about Common Language Runtime (CLR) assemblies that have been registered in SQL Server databases. This function helps DBAs audit custom .NET assemblies for security compliance, track assembly versions, and identify potentially unsafe or unauthorized code deployed to their SQL Server instances.
Get-DbaDbCompatibility View Source Garry Bargsley, blog.garrybargsley.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves database compatibility levels from SQL Server instances for upgrade planning and compliance auditing.
Description Returns the current compatibility level setting for each database, which determines what SQL Server language features and behaviors are available to that database. This is essential when planning SQL Server upgrades, as databases often retain older compatibility levels even after the instance is upgraded.
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.
Get-DbaDbDetachedFileInfo View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Reads detached SQL Server database files to extract metadata and file structure without attaching them.
Description Analyzes detached MDF files to retrieve essential database metadata including name, SQL Server version, collation, and complete file structure. This lets you examine database files sitting in storage or archives without the risk of attaching them to a live instance.