We’ve been busy the past few days and have huge updates to share.
New Docs Site First, our new beta docs site is now up at dbatools.io/commands! Please check it out and let us know what you think.
This new docs site is auto-generated by our command help! Auto-generated docs were required because we’re adding so many new commands and updating so often, keeping our website up-to-date was just too time-consuming.
Marching onward to dbatools 1.0, a ton of commands have been renamed to align with our now mature naming scheme. These changes were made in today’s release, version 0.9.410 aka regularlegs, now available on GitHub and the PowerShell Gallery.
Here’s the general idea:
DbaDatabase has mostly been renamed to DbaDb with a couple exceptions DbaSql has been changed to just Dba, no exceptions. Considering Microsoft reserved the Sql prefix and we can’t use it, think of Dba as “Sql”.
Last night’s #PSPowerHour made me realize I should highlight a few awesome projects I’ve come across recently.
PSDatabaseClone PSDatabaseClone was created by Sander Stad.
PSDatabaseClone is a PowerShell module for creating SQL Server database images and clones. It enables administrator to supply environments with database copies that are a fraction of the original size.
It is well-documented and open-source.
dbops dbops was created by Kirill Kravtsov.
dbops is a Powershell module that provides Continuous Integration/Continuous Deployment capabilities for SQL database deployments.
Hey all! Kirill Kravtsov, here. I’m a SQL Server DBA that is passionate about automation and PowerShell. I’m also a major contributor to dbatools and creator of the dbops module, which provides continuous database deployments at any scale.
This week, I wrote an article on my blog and Chrissy asked me to mirror it on dbatools, so here we go.
Introduction Many SQL Server DBAs know that there is a very convenient way of delivering a full copy of the database structure to a different SQL Server: it’s called dacpac, or a Data-tier Application package.
Last night was the premiere of #PSPowerHour! It featured great speakers and a lot of dbatools content.
What is PSPowerHour? Created by Michael T Lombardi and Warren F, PSPowerHour is “like a virtual User Group, with a lightning-demo format, and room for non-PowerShell-specific content. Eight community members will give a demo each PowerHour.”
Sessions are proposed and organized on GitHub, which is really cool. Both new and seasoned speakers are invited to propose topics 🙌
Hey all, my name is Marcin and this is my first post and my first contribution to the dbatools. I hope you find it useful.
Introduction Part of a successful administration and management of any database is to know what happens over a period of time, when scheduled jobs and backups run and whether they are successful or not.
The common difficulty is getting this information out of SQL Server and then - the most difficult part - understanding what it means.
When connecting to a SQL Server instance with alternative credentials, it can be tedious to repeat the SQL credential over and over.
The great news is that this repetition is not required, as it can be handled instead by $PSDefaultParameterValues
Intro to $PSDefaultParameterValues $PSDefaultParameterValues is a hashtable available in PowerShell that can set defaults for any command that you run. In it’s simplest form, setting a default parameter value can look like this:
SQL Server’s Central Management Server (CMS), first introduced in SQL Server 2008, “stores a list of instances of SQL Server that is organized into one or more central management server groups”.
It’s a super useful feature that not all DBAs know about. Since CMS data is stored in msdb and accessible via SMO, you can access it from SQL Server Management Studio or PowerShell modules like dbatools.
Central Management Server’s essential functionality includes:
I remember the first time I saw database snapshots, I was so excited. Then I right-clicked in SSMS and..
No way to easily create a snapshot. So then I researched how to create one using T-SQL and I had to know the exact path. UGH.
CREATE DATABASE db1_snapshot_preupgrade ON (NAME = N'db1_snapshot_preupgrade_datafile', FILENAME = N'M:\MSSQL14.MSSQLSERVER\MSSQL\DATA\db1_snapshot_preupgrade.ss') AS SNAPSHOT OF db1 Intro to Snapshots Basically, database snapshots are similar to VM snapshots but for databases.
For those of you still using PowerShell ISE, I know the news about Microsoft no longer actively developing the ISE was sad. The good news is that it’s been replaced by something WAY cooler: VS Code.
VS Code is free, open-source and a joy to use. If you’d like to make the move, or if you just want to see how PowerShell Pros use VS Code, Rob Sewell will be presenting an hour long web session today for 24 Hours of PASS Summit Preview at June 12, 2018 at 20:00 GMT.