Thor Logo dbatools

Detach

Dismount-DbaDatabase

Chrissy LeMaire (@cl), netnerds.net

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.

Read more

Get-DbaDbDetachedFileInfo

Chrissy LeMaire (@cl), netnerds.net

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.

Read more