After 5 months of hard work, dbatools 2.0 is finally here!
THIS RELEASE INCLUDES BREAKING CHANGES.
Most notably, we updated the SQL Server libraries, which brings more power, bug fixes and breaking changes of its own. The one that will cause the most headaches is the change to encryption. Now, Trust Certificate is set to false and Encrypt is set to true. We wrote a few posts about this:
- New Encryption and Certificate Defaults in Microsoft's SQL Server Connection Provider
- Configuring network encryption for SQL Server
- New Certificate and Encryption Defaults in dbatools 2.0
Our library files (the DLLs) are also now included in their own module, dbatools.library. This means that dbatools will ultimately be smaller in size and take up less disk space for those who update often. It also means that the way you install dbatools in offline environments has changed.
Highlighted changes
A couple months ago, I wrote a post that detailed more of our changes, which you can find here:
Here are some other highlights people may appreciate
- Support for SQL Server 2022
- The import process should now be much faster, as it now uses compression which requires less reading from disk
- SSIS commands have been added back for the Windows platform
- functions/internal is now public/private (for devs)
- devcontainer now works better (for devs)
- geometry/geography/hierarchyid types now work for people who need them
- Autocomplete has been fixed, so after connecting at least once, hit tab to auto complete SqlInstance, Database, Job and more
- Install-DbaMultiTool now installs sp_help_revlogin
- Network certificate-related commands work better
- Sync-DbaAvailabilityGroup now shows details when -WhatIf is used
- Whatif output has been standardized in all Copy (and Start-DbaMigration) commands
- Test-DbaLastBackup now works even better for more scenarios like copying backups with multiple files
- Ola Hallengren's Maintenance Solution is now included which helps those with offline networks
Don't have time to mess with a new release today, consider it's a Friday? You can install the latest 1.x release by running the following command:
Install-Module dbatools -RequiredVersion 1.1.146
Azure DevOps and Automation changes
When I created an Azure Automation test, I had to install dbatools.library
first. You may have to do that for Azure DevOps as well, so be sure to update your pipelines 🚀
Everything that's changed
I'll likely update this README a few times as I discover a few things that I'd like to highlight. I also plan to fix dbatools.io so that I can publish blog posts there again, so keep an eye out for a new fresh Hugo site.
Until then, here is an exhaustive list of the changes that have been made since October.
- Update PR template with updated final pruning date (today -- repo is now 85MB) by @potatoqualitee in #8637
- Bug Fix 8626 Export-DbaUser by @potatoqualitee in #8641
- Add Certificate and CertificateName aliases for EncryptorName by @potatoqualitee in #8653
- Fix Copy-DbaSysDbUserObject to include indexes by @sqlslinger in #8668
- Add 2022 support by @potatoqualitee in #8682
- Add force on encryption commands to auto create cert with specified encryptor name by @potatoqualitee in #8683
- Install-DbaInstance - drive path helper by @potatoqualitee in #8684
- Address SQL Server 2022 issue with Test-DbaDbCompatibility by @wsmelton in #8706
- Create Azure Automation Test and execute it from GitHub Actions by @potatoqualitee in #8709
- Add try/catch for containers without the hostname command by @potatoqualitee in #8710
- Enable Set-DbaDbCompatibility to support SQL Server 2022 by @sanderstad in #8717
- Find-DbaInstance - Correct SqlConnect check, update test to not be Appveyor specific by @wsmelton in #8725
- Update dbatools.library and dbatools.core.library dependency versions by @potatoqualitee in #8734
- Reenable Azure Automation Test by @potatoqualitee in #8736
- Set-DbaDbCompatability - breaking change, code cleanup, add integration testing by @wsmelton in #8724
- Install-DbaInstance - Support SQL Server 2022 by @andreasjordan in #8735
- Rename directories to align with better practices by @potatoqualitee in #8737
- Fix DAC alerts and errors by @potatoqualitee in #8738
- Remove install.ps1 by @potatoqualitee in #8740
- Remove dbatools.core.library dependency, use only dbatools.library by @potatoqualitee in #8741
- Register-DbatoolsConfig - Add example that shows -PassThru by @jpomfret in #8758
- Update dbatools-buildref-index.json - multiple security updates + CUs for SQL 2019/2022 by @MikeyBronowski in #8760
- Test-DbaSpn - Remove the version lookup by @wsmelton in #8779
- Invoke-DbaBalanceDataFiles: fix for VLDBs by @lancasteradam in #8776
- Update Add-DbaExtendedProperty.ps1 - removed examples from Get* function as they are not valid here by @MikeyBronowski in #8786
- Get-DbaDbSchema: returning standard properties on the return object by @lancasteradam in #8775
- Get-DbaDbDbccOpenTran: Add DatabaseId to the return object by @lancasteradam in #8781
- Get-DbaDbCompression: Add DatabaseId to the return object by @lancasteradam in #8769
- Add new function - Invoke-DbaDbAzSqlTips by @jpomfret in #8755
- Add ARM64 Self-Hosted Runner by @potatoqualitee in #8788
- Add support for geometry/geography/hierarchyid types by @potatoqualitee in #8789
- New-DbaConnectionString - Support older compatibility by @potatoqualitee in #8791
- Allow disabling logging, TEPP, and maintenance by @wsmelton in #8792
- Export credential by @ACALVETT in #8794
- BugFix for Install-DbaInstance.ps1 NoPendingRenameCheck by @kerneldba in #8802
- Install-DbaMultiTool: add sp_help_revlogin to script list by @lowlydba in #8804
- docs: fix template typo by @lowlydba in #8806
- Install-DbaInstance: Fix for using default Feature parameter with SQL Server 2022 by @andreasjordan in #8812
- Update dbatools-buildref-index.json - SQL 2022 CU2 by @MikeyBronowski in #8813
- Updates to devcontainer configuration by @wsmelton in #8823
- New-DbaDbSnapshot - Support special characters in database name by @niphlod in #8830
- Implementing Test-DbaPath for Testing Copy Folder for Log Shipping Secondary by @sqldeployhelmet in #8826
- Set-DbaNetworkCertificate: Try to determine key algorithm and use appropriate extension class by @rose-a in #8818
- New-DbaDbUser: Refactor and added contained user creation by @sqlarticles in #8827
- Contributing guide update by @wsmelton in #8822
- Fix: Copy-DbaDatabase: prevent dropping of destination databases if destination is the source by @potatoqualitee in #8831
- Find-DbaOrphanedFile - Fix path in non-Windows by @potatoqualitee in #8835
- Skip Setting Default Log Shipping Monitor by @sqldeployhelmet in #8832
- Attempt to resolve default shell issue in devcontainers by @potatoqualitee in #8837
- Write-HostColor - Fix issue in Linux by @potatoqualitee in #8839
- Added Filter functionality to Get-DbaDbUserDefinedTableType by @sqlarticles in #8834
- Add back SSIS commands for non-core PS by @potatoqualitee in #8843
- Sync-DbaAvailabilityGroup - Show details for objects being synced when using -WhatIf by @potatoqualitee in #8844
- Get-DbaLastGoodCheckDb - Support Azure by @potatoqualitee in #8836
- New command - Set-DbatoolsInsecureConnection by @potatoqualitee in #8849
- Restore-DbaDatabase - Enable summing TotalSize if input is from CliXml exported file by @potatoqualitee in #8848
- Standardize Whatif Output by @potatoqualitee in #8846
- Update to new version by @potatoqualitee in #8852
- Fix TEPP/autocomplete by @potatoqualitee in #8854
- Get-DbaPermission - Fix missing bracket in SQL statement by @ft3411 in #8856
- Update sp_configure properties for 2022 by @potatoqualitee in #8858
- Update dbatools-buildref-index.json - SQL 2022 CU3 / SQL 2019 CU20 by @MikeyBronowski in #8859
- Temptables can be used on NonPooledConnections by @InDey in #8764
- Fix/8860 by @niphlod in #8861
- Updated Version and changed import routine a lil bit by @potatoqualitee in #8869
- Invoke-ManagedComputerCommand - Add explicit SQLWMI import by @potatoqualitee in #8862
- Invoke-DbaBalanceDataFiles - Skip disk check on non-Windows servers by @potatoqualitee in #8866
- Test-DbaLastBackup - Enable CopyOnly for backups with multiple files by @potatoqualitee in #8868
- Start-DbaMigration - Remove KeepCDC and KeepReplication parameters from detach method by @ben-thul in #8871
- Fix New-DbaComputerCertificate to support PS 7.3 by @andreasjordan in #8875
- New commands: New-DbaAgentAlert and Install-DbaAgentAdminAlert by @potatoqualitee in #8876
- Set-DbatoolsInsecureConnection - Persist by default by @potatoqualitee in #8877
- Add Maintenance Solution to module by @potatoqualitee in #8878
- Test-DbaLastBackup -VerifyOnly report failure when backup file is corrupted by @potatoqualitee in #8880
- Library Update by @potatoqualitee in #8881
New Contributors
- @sqlslinger made their first contribution in #8668
- @kerneldba made their first contribution in #8802
- @rose-a made their first contribution in #8818
- @sqlarticles made their first contribution in #8827
- @ft3411 made their first contribution in #8856
- @InDey made their first contribution in #8764
Full Changelog: v1.1.142...v2.0.0