Collection of Powershell tools for SQL Server management.
TCDbTools is published to the Powershell Gallery and can be installed as follows:
Install-Module tcdbtools- Invoke-DBSafeShrink : Can be used to shrink an mdf file and rebuild all indexes at the same time. Typically faster then a normal shrink. This function does NOT make use of DBCC SHRINKDATABASE or DBCC SHRINKFILE.
- Invoke-DBMoveIndexes : Moves all indexes from one file group to another, including heaps.
- Invoke-DBCompareServerSettings : Compares the server settings between two or more servers.
- Invoke-DBExtractCLRDLL : Extracts all user defined CLR dlls from a SQL server.
- Invoke-DBScriptObjects : Scripts all objects from a database to individual files per object.
- Invoke-DBRenameConstraints : Will rename all indexes and constraints to match naming conventions.
- New-DBScripterObject : Creates a database scripting object that can be modified and used by Invoke-DBScriptObjects.
- New-DBSqlConnection : Creates a SqlConnection.
- New-DBSqlObjects : Creates two objects that can be used for connectivity.