Posts for: #SQL Server

Data masking with dbatools

Recently I developed a few PowerShell commands to make it possible to enable data masking for databases.

The commands were originally written for the module PSDatabaseClone to enable users to automatically mask the data for a database image.

The reason the commands were created was that the cloning process would otherwise expose production data to other users which is not preferable.

The commands were released and picked up by Chrissy LeMaire who implemented them in dbatools and even improved them.

Read more →

TSQL-Tuesday #108: A Journey Into CI/CD

This month’s TSQL Tuesday is hosted by Malathi Mahadevan (w | t) and she asks us to write about one thing you want to learn that is not SQL Server.

As a database administrator in SQL Server you might think it’s easy to think we only deal with that technology. But the role of the database administrator has been changing for a while now and we need to know more about other technologies besides SQL Server.

Read more →

Decrypting SQL Server Objects with dbatools

There are lots of great articles that describe how the command for decrypting SQL Server objects when they’re saved with encryption like Encrypting and Decrypting SQL Server Stored Procedures, Views, and User-Defined Functions Simple Way to Decrypt SQL Server Stored Procedure

Most of them rely on T-SQL and SSMS but I wanted to do the same thing with PowerShell. This way I can execute it for several objects at a time and maybe even in multiple databases and instances.

Read more →

Log Shipping With dbatools – Part 3: Get Log Shipping Errors

In the second part of the series we discussed the way to test the log shipping status using the command “Test-DbaLogShippingStatus”.

This blog will be about how to get log shipping errors to analyze why your log shipping isn’t working.

Out-of-the-box solutions

There are several options to get the log shipping errors right out of the box. One of them is using queries and the other one is the event viewer.

Read more →

Log Shipping With dbatools - Part 2: Test Log Shipping Status

In the first part of the series I described the command Invoke-DbaLogShipping.

This makes it possible to set up log shipping. This blog post will be about the command to test log shipping status. Before I describe the command, I want to discuss the options that are available in the SQL Server Management Studio (SSMS) and SQL Server.

Out-of-the-box monitoring

Microsoft has made it possible to check the log shipping using SSMS. This can be done using queries or by using the “Transaction Log Shipping Status” report.

Read more →