September has been an incredibly busy month for dbatools. We’ve created a new organization on GitHub called the SQL Server Community Collaborative and as the name suggests, we welcome you to join. Rob Sewell, creator of dbareports and Warren Frame, creator of Invoke-SqlCmd2, have also migrated their modules to this new GitHub Organization.
Being part of a GitHub organization gives us access to more features on GitHub. It also helps formalize our process. Speaking of, this month will be the first time we have a formal release! fireworks
Ever read a really great article about how to do something properly but then kinda forgot and you have to revisit each time? Well, we’ve codified some of those practices for you, making them easy to both follow and remember.
Now, when you want to review your SQL Server’s restore history, you can just perform a Get-Command *restore*history* and boom, Get-DbaRestoreHistory will appear. Get-Help Get-DbaRestoreHistory and you’re set; no more searching the internet for SQL queries or table names.
Returns restore history details (database, username, restore type, date, from & to files) for all or only some databases on a SQL Server. You can even specify -Since if you’d like to filter by date. Thanks to Kenneth Fisher for the idea!
This command returns the TCP port used by the specified SQL Server. By default, only the TCP port used by the specified SQL Server is returned. If -Detailed is specified, server name, IPAddress (ipv4 and ipv6), port number and if the port assignment is static.
This command compares database compatibility level to server compatibility. Older compatibility levels can have a negative impact on performance and query plans.
This command compares database collation to server collation. Collation differences can result in unexpected query results.
This command returns the transport protocol and authentication scheme of the connection. This is useful to determine if your connection is using Kerberos. By default, the ConnectName, ServerName, Transport and AuthScheme of the current connection will be returned.
When a SQL Server’s host OS is renamed, the SQL Server should be as well. This helps with Availability Groups, Kerberos and other SQL Server components.
Test-DbaServerName helps determine if your OS and SQL Server names match and if a rename is required. It then checks conditions that would prevent a rename like database mirroring and replication.
This command renames @@SERVERNAME to match with the Windows name. The new name is automatically determined based on the OS network name. Works for default and named instances. Renaming clusters is not supported by this command, as doing so is not supported by Microsoft.
If the automatically determined new name matches the old name, the command will not run.
This command kills all spids associated with a spid, login, host, program or database. If you are attempting to kill your own login sessions, the process performing the kills will be skipped.
October is going to be another busy month. Some of us are working on new commands, and some of us are doing code maintenance and bug fixing.
This is already a pull request in the development repository! Just a bit more testing is needed.
We wanted to ensure this command is as fail-proof and useful as possible. It’s been tough getting progress bars to work, but we’re finally confident it will be released in October.
A perfect compliment to Stop-DbaProcess.
T-SQL based maintenance plans can’t safely access Windows file system to determine if a file has been properly archived. PowerShell makes it easy. This command will make it easier to clean up old, archived (and unarchived) backups.
Tons of best practice Tests including Test-DbaLockPagesInMemory, Test-DbaInstantFileInitialization, and Test-DbaDatabaseBestPractice
Want to see more or work on a command yourself? We have approved command ideas on the dbatools Trello board. This board shows you what we’re working on and what we’re talking about. We’d love if you’d join us.
Some of these commands are in their infancy. Want to help make them better? Come join the coding party! We’re all hanging out on the SQL Server Community Slack in the #dbatools channel.