Move-DbaDbFile
Claudio Silva (@claudioessilva), claudioeesilva.eu
Move-DbaDbFile View Source Claudio Silva (@claudioessilva), claudioeesilva.eu Windows, Linux, macOS Synopsis Relocates database files to different drives or folders while maintaining database integrity. Description Relocates database data and log files to new locations on the same SQL Server instance. The function takes the database offline, copies files to the new location, updates the database metadata with ALTER DATABASE commands, and brings the database back online. This is typically used when you need to move databases to faster storage, free up disk space, or reorganize your file layout without restoring from backup.
Read more
dbatools