Blog Post

A Quick Test Data Manager Eval with My Database Backup

,

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.

2025-01_0167

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.

2025-01_0168

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.

2025-01_0169

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.

2025-01_0170

This runs and in a few minutes, I see that the databases have been created and we are ready to subset.

2025-01_0171

Checking SSMS with a refresh, I see the databases.

2025-01_0172

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.

2025-01_0173

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.

2025-01_0174

Now let’s continue to press “y” and get the classification, mapping, and masking done. Two tables were found with PII (names) and masked.

2025-01_0177

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.

2025-01_0175

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:

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating