

Move down the AdvWorks_20120821_07-19-43 project tree and open up the Human Resources schema, then the Employee table in both projects.

Once you click start, your new project will have an exact copy of your project at the time the snapshot was created.
Sql data tools for visual studio 2012 full#
One of the properties is “FullPath”, it will hold the full path / file name of the snapshot.) (Hint, to find out where it’s at, before you start the import right click on the snapshot file, and pick properties. Now navigate to the snapshot dacpac file you created and import it. then pick “Data-tier Application (*.dacpac). Now right click on the project, and pick Import. I’m going to name mine after the snapshot. Now pick a new SSDT project and give it a name. Right click on the solution, and pick Add, New Project. If you happened to notice in the earlier post on creating an SSDT project, in addition to importing from an existing database, we also have the option to import from a dacpac file. So looking at differences is nice, but what if you want to dig in and see the entire snapshot? If you’ll notice, the snapshot is created as a dacpac file. You will now see the differences between your snapshot and your current project. Over on the right, use the pick target to pick the current project, then click compare. When the schema compare window appears the snapshot will be in the source side. Right click on the snapshot and pick Schema Compare (for more info see my previous post). The same tools we used for schema compare can also be used with a snapshot. With the file saved, let’s now decide we want to compare our current database project to what we’ve done in the past, namely our snapshot. I’m going to open the Employee table in the HumanResources schema and safe refactor the JobTitle column to become JobName.

I’m going to use the safe refactor (see my blog post on this). First, let’s make a change of some type to the database. So now that you have a snapshot, how do you use it? Well let’s start with a database comparison. You’ll be given the chance to rename it, but for this demo I’ll just take the default name. Once you do, you’ll see a new file appear in the solution. Using the same project we’ve been using over the last few posts, right click on the project name, and pick “Snapshot Project” on the menu. Once you have a snapshot there are several useful things you can do with them. A snapshot captures a copy of your database project as it exists at the time you take the snapshot. A new feature of SSDT, one not found in VS Database Projects, is the ability to do snapshots.
