TechNet Webcast Series for the ITPro – Part 10 of 11 – errata

In the last few minutes of the webcast (part 10), I goofed up one line of code and didn’t realize it until today. As my very last demo (and there were at least 10 different scenarios/concepts/demos yesterday) in my webcast, I decided to show a Database Snapshot on a Mirror database. It was the second database snapshot that I had created so my first database snapshot demo was just fine. However, when I went to create the database snapshot on the mirror, I inadvertently left off the most important part “AS SNAPSHOT OF AdventureWorks”. The irony is that I tried to query some tables and just ended up (because we were right at the end of the webcast ;)) saying that I probably wasn’t getting the table names right. Ha – there were no tables… I hadn’t created a database snapshot, I had created just another database – so the only tables I was seeing were the catalog views.


Anyway, just for clarity, I corrected the “Demo Scripts” zip that’s associated with Part 10 BUT if you’ve already downloaded it then you’ll have the old (and incorrect) version of this script (SnapshotOnMirror.sql). And, for completeness, I’ll put the code that I executed during the webcast here:



USE AdventureWorks
go


USE master
go


CREATE DATABASE AdventureWorksSnap
ON
( NAME = N‘AdventureWorks_Data’,
FILENAME = N‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorksSnap_Data.mdfss’)
— , SIZE = 167872KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
go


and the code that I should have executed here:



USE AdventureWorks
go


USE master
go


CREATE DATABASE AdventureWorksSnap
ON
( NAME = N‘AdventureWorks_Data’,
FILENAME = N‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorksSnap_Data.mdfss’)
— , SIZE = 167872KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
AS SNAPSHOT OF AdventureWorks  <<<< ———-
go


USE AdventureWorksSnap
go


SELECT * FROM person.contact
go


So, quick demos right at the end of the webcast might not have been my best idea ;). But – I’m surprised none of you called me on it?! I’ll blame it on this for now.


Have a great weekend,
kt

Leave a Reply

Your email address will not be published. Required fields are marked *

Other articles

Wow! Wow! Wow! THANK YOU!

I announced my retirement from SQL/tech here and your comments on my blog, on LinkedIn, and on Facebook were overwhelming and humbling! I’m so touched

Explore

Imagine feeling confident enough to handle whatever your database throws at you.

With training and consulting from SQLskills, you’ll be able to solve big problems, elevate your team’s capacity, and take control of your data career.