In this segment, we're going to talk about SQL Server. So there's a lot of ways to recover SQL from a whole perspective. In this segment, what we're going to cover is a more granular approach to SQL. So we have the ability to use the local mount utility to attach volumes from the core to any machine. So I'm going to use that on the actual SQL Server.
So we're going to go over to the SQL machine. And here I have the SQL Studio running in the background, where I have all of my databases that are loaded for my SharePoint site. And let's just say that somewhere in the database, maybe the content database, somebody had gone in and deleted a bunch of data.
Now, the problem here is I could easily restore the entire database, but that would eliminate any of the transactions that have happened between the last backup when this data existed and the current. And this might be a highly transactional site where I don't want to take this offline even for a minute. So how do I restore? With AppAssure, it's a little different because using the local mount utility, what I can do is I can go into a snapshot.
In this case, I'll go back in time let's say to this one. And you'll notice I have all the volumes here for my server. F and G are the most relevant because these are the ones that contain the databases and the log files. What I'm going to do is I'm just going to start at the very top, and I'm going to mount it, but I'm also going to mount it as writeable.
The reason I want writeable is because in order for me to attach a database, I have to really satisfy two requirements from SQL's perspective. It has to be on a writeable disk, and it has to be a local disk. And that's where this mount utility really shines is in that we're using Windows volume mount points to actually present it to the operating system.
Let's just confirm that we have this set up properly. And we're going to change the default path to C colon backslash mounts so we can easily find it. And then we're going to right click, and we're going to say mount writeable. Now, in the background, it's going to go to the core. It's going to identify the snapshot. And then it's going to go through the process of creating the set of virtual mounts.
We can actually see it as it progresses through the different volumes. There's our snapshot. We'll just leave this open. And it looks like actually it finished already, and it popped open a second copy of Windows Explorer. If I go in here, this is the entire volume as it looked at that point in time. It is a snapshot.
But I have access to all of that data. Within SQL, I'll click on Databases, right click and say Attach. And now we'll just simply say Add. What we'll do next is we'll go to the C colon backslash mounts, go to the snapshot, go to the F volume, and then there is our content database.
Now, with SQL, you can't have two of the same. So we're going to go ahead and give this one a different name. And the other thing is it's looking for the log file. And as you can see, it's pointing to the original log file. So we're going to go ahead and change that as well. And that's going to be on C colon backslash mounts snapshot name and then the G volume.
And there is our content log. And at that point, all we have to do is say OK. In the background, SQL will now attach these databases. So as you can see now, simultaneously I have my content database, and then I have my backup copy of my content database loaded and operational.
The next thing I will do is using some Transact SQL statements, things like select into, I could also use the bulk copy process, BCP, any third party utility that can do a compare of the tables and allow you to synchronize. I mean, there's a bunch of ways to do this.
And that's it. I didn't have to actually restore the data. I didn't have to do anything other than make that mount point occur and attach the database. When I'm done, all I have to do is right click, go into Tasks, go to Detach, say OK, go back to my mount utility, go to Active Mounts, hit Dismount All, say Yes. And that's all she wrote.