PowerShell & SQL Server: Unmask All Masked Columns (Dynamic Data Masking) In Database

Necessity is the mother of new PowerShell code :-)! Today, I had to unmask all the columns I had helped mask using Dynamic Data Masking. This simple post assumes that you are a privileged user with the ability to drop "Column Masking"! Identify Masked Columns The SQL to identify all masked columns is pretty simple … Continue reading PowerShell & SQL Server: Unmask All Masked Columns (Dynamic Data Masking) In Database

Advertisement

SQL Server – Simple Tip On Altering SQL Server Tables With Data – Avoid “Saving changes not permitted”

This is a very simple yet handy tip that most SQL Server users are not aware of. Can't alter tables with data?! If you use SQL Server, you must have seen this dialog when you try to alter a table in SSMS (like adding a new column to an existing table containing data). What does … Continue reading SQL Server – Simple Tip On Altering SQL Server Tables With Data – Avoid “Saving changes not permitted”

SQL Server: Using Data From Another Instance To Drive Logic In Current Instance (Using Linked Server)

Data is in another DB/Instance - but logic needs to be in this DB/instance Your logic in the current database/instance sometimes is driven by data in a completely separate SQL Server instance. People do this using different methods Use LinkedServer to bring over and join data Use SSIS or another mechanism to copy the data … Continue reading SQL Server: Using Data From Another Instance To Drive Logic In Current Instance (Using Linked Server)

SQL Server – Looping through a table list to disable, renable constraints or add a new column

The Need: The basic need a lot of times is to loop through a list of something and do something else for the items in the list that qualify - like disabling/re-enabling constraints for a set of tables or adding/dropping a column etc. We will see three examples below that act on such a list … Continue reading SQL Server – Looping through a table list to disable, renable constraints or add a new column