I wrote about getting the Redgate Test Data Manager set up in 10 minutes before, and it was a great post. In that one, the sample database Northwind was created and used. However, Alex Yates has modified the scripts to work with backup files, and I’ll show you how easy this is in just a few minutes.
This is part of a series of posts on TDM. Check out the tag for other posts.
The Setup
I’ve filtered my SSMS to only show databases with BB in the name. You can see I have none.
I also have a backup file of a baseball database on my d: drive. My local instance has access to this folder as I use for backups and restores in dev/test work.
While I can pass these parameters in, it’s easy to just change the values in the file after cloning the repo. This way it’s easy to see what’s going on.
That’s it, now let’s fire up PowerShell.
Running the Eval
When I run the file, I see it start up and report the various values. You can see that it’s set the base database name to “BB” and I should see the two databases with the suffixes created. I also see my backup path.
This runs and in a few minutes, I see that the databases have been created and we are ready to subset.
Checking SSMS with a refresh, I see the databases.
If I type “y”, the subsetter runs, and very quickly. This isn’t a massive database, but it is thousands of rows, which makes it easy to play with.
If I run counts, I see this. The left is the full restore, which has 16k records. The subset, on the right, has about 10% of that, with 1644 rows. Pretty cool. So far, this has taken less than a couple of minutes.
Now let’s continue to press “y” and get the classification, mapping, and masking done. Two tables were found with PII (names) and masked.
If I query the tables, I see the results below. Notice that not all values were moved, as the first ID in the subset is 11, but we can see IDs 11 and 22 were masked.
This was a very quick look at running an eval with my own database backup, not a sample db. We’ve had a few people ask to do this for their own testing, and we modified the scripts to work with backups.
Give TDM a try today from the repo and a trial, or contact one of our reps and get moving with help from our sales engineers.
Video Walkthrough
Check out a video of my demoing this below: