Dynamic Data Masking(DDM) in SQL Server 2016

Dynamic Data Masking(DDM)

You can use DDM in many scenarios involving sensitive data.For example in a production database there are some strict regulations from sharing the sensitive data to the developers when they are working on live data.DDM helps solve this problem because admininstrators can now give developers access to production data with all sensitive data masked from view.There is no additional development effort or coding required for this. You just define your masks.

Here I am going to create a new table with few masked columns

 

partial function – queries only show the first two characters and the last two characters and replaces everything in between with three dots

default function – completely hide the value

email function – only show the first character of the email address followed by a hardcoded mask  formatted to look like a email address

You can use the below query to select the masked columns

I have already added two records in the UserAccount table. I am going to select and check the mask is applied to the records

When you look at the records, can see that masking is not applied to the records.It’s because masking is applied only to the users that don’t have the UNMASK permission.the current connect have that permission that’s why nothing is masked.

I am going to create a new user for demo purpose and giving the user to select permission only

I am going to select the records as DemoUser

Now You can see all the records have mask applied.If you want to give UNMASK permission you can grant permission

GRANT UNMASK TO DemoUser

You can download the source code from here

 

 

Your First Task using Gulp in ASP.NET MVC Project

Introduction to Gulp

I am going to create the first Gulp task in an ASP.NET MVC project. Go to Node.Js Command Prompt

Install Gulp as a global package

1

Create a package.json file on your project

3

Also Install Gulp locally after  navigate in to the project directory

2

Create a gulpfile.js on your project
In this file, you can load your packages and plugins for the tasks

Open your gulpfile.js and create your first task

4

Run your Gulp task

5

Introduction to Gulp.js

Gulp is a Javascript Task runner. When we are creating Javascript, Html and CSS there’s a lot of little things that we have to do to basically prepare our code either running in a development environment or in production environment.For example minifying and concatenating , adding vendor prefixes, Less to CSS Compilation, Injecting Files Into HTML, Angular Template Cache, Code Analysis and more to our code.

Main API’s In Gulp

  1. gulp.task
  2. gulp.src
  3. gulp.dest
  4. gulp.watch

Installing Gulp

Gulp is created by using Node.js. So you have to install Node.js first , after that we can install gulp and gulp packages using NPM

You can download Node.js from here

In order to get start with Gulp , You have to install it Globally and then install dependent packages and then code your task.

gulp

Create your first Gulp Task

Typescript Error : duplicate string index signature angular 2

I got this error after installing the jQuery typings .The error is because of you have installed the definition files into multiple locations in your project. Both globally and locally. For get rid of this error you have to remove either of this definition files from your prooject.

npm remove @types/jquery –save-dev

Hope this helps