Tag: syndicated

  • Enable Transparent Data Encryption

    This is one of the things in my Encryption Primer presentation that I don’t demo. It’s really easy to do, and it’s rather mechanical, so I just show the image that has the steps from MSDN and leave it at that.

    However there are a few things I wanted to change, and test, so I thought I’d show my procedure on a local database. I roughly follow the MSDN article, but a few slight items.

    First, use master and create your keys and certificates.

    CREATE DATABASE TDETest
    ;
    GO
    USE master
    ;
    GO
    CREATE MASTER KEY
     ENCRYPTION BY PASSWORD = 'AReallyStr0ngP@ssword'
    ;
    go
    CREATE CERTIFICATE SteveCert
     WITH SUBJECT = 'My DEK Certificate'
    ;
    go
    USE TDETest
    ;
    GO
    CREATE DATABASE ENCRYPTION KEY
     WITH ALGORITHM = AES_128
     ENCRYPTION BY SERVER CERTIFICATE SteveCert
    ;
    GO

    I created a test database here for another process, and this is roughly the setup. However before I enable the encryption, here’s what I recommend you do:

    USE master
    ;
    go
    BACKUP CERTIFICATE SteveCert
    TO FILE = 'c:\SQLBackup\SteveCert'
    WITH PRIVATE KEY 
    (
        FILE = 'c:\SQLBackup\SteveCertPrivateKeyFile',
        ENCRYPTION BY PASSWORD = 'R@ndomP3ssW0rd'
    );
    go

    Encryption is serious stuff. If you lose this certificate from a server crash, you are definitely not going to be able to open your database or recover your data. Gone is gone, and data loss means data loss here.

    Back up your certificate.

    Quick question: do you know where your backup of the certificate is?

    Once this is done, you can continue on:

    USE TDETest
    ;
    go
    ALTER DATABASE TDETest
    SET ENCRYPTION ON;
    GO
    

    The encryption is quick on this new, small database.

    Now let’s see if this worked. We’ll add data and make a backup.

    CREATE TABLE MyTable( LogData VARCHAR(MAX))
    ;
    INSERT MyTable SELECT 'This is an encrypted database'
    ;
    GO
    BACKUP DATABASE TDETest
     TO DISK='tdetest.bak'
    ;

    If I go to my backup location and look for this backup, I can open it in an editor.

    encrypt2

    It’s random gibberish. If I run a search for data in my table:

    encrypt1

    I get no results

    encrypt3

    Don’t think this is valid? Run this below and re-search this backup for the string. You’ll find it. This is one thing encryption protects you from.

    CREATE DATABASE NoTDE
    ;
    GO
    USE NoTDE
    ;
    GO
    CREATE TABLE MyTable( LogData VARCHAR(MAX))
    ;
    INSERT MyTable SELECT 'This is an encrypted database'
    ;
    GO
    BACKUP DATABASE NoTDE
     TO DISK='notde.bak'
    ;

    The database is encrypted, but anything I do with the database doesn’t require code changes, hence the “transparent” nomenclature.

    The value of this is debatable, but I think it’s not a bad feature to implement if you have Enterprise Edition and you need this protection for PCI, HIPAA, or some other regulation.

  • The Embarcadero – SQL in the City San Francisco

    I love San Francisco. It was one of the cities that I thought I might live in someday. My kids have all been there multiple times, exploring museums, crossing the amazing Golden Gate Bridge, visting Muir Woods and more. When I heard SQL in the City was coming to S.F, I had some decisions to make. Where to run and can I see the Giants? I can’t, and time is short, so I’ll do a city run, along the E side of the city on Tuesday evening.

    logoOn Oct 3, 2012, Red Gate brings the SQL in the City tour to San Francisco and I’ll be flying in Tuesday afternoon to get ready I’m getting in a little late, so time will be short. However I’ll run, eat a late dinner, and do a prep for my sessions on Wednesday.

    Grant Fritchey (b | t), Denny Cherry (b | t), Mitchel Sellers (b ), Ernest Hwang, and plenty of Red Gate software developers will be on hand to deliver a full day of training on SQL Server administration, development, and some tips and tricks for smoother developer with Red Gate tools.

    And it’s free. Register and come learn with us.

    sqlstarThe event is done The Red Gate Way, which is first class with a great venue, good food, and even some nice drinks at the end. There are even a few prizes to win.

    It’s the chance to learn about SQL Server, ask questions, debate solutions and meet other data professionals. Our aim is to help you get inspired, solve problems, and make your job easier. We have a variety of sessions on all different aspects of SQL Server, but we’re willing to chat about anything you want to know. Just stop one of us, introduce yourself, and ask away.

    This is a great event and I’m looking forward to meeting a few of you in San Francisco.

    Register today if you can come. I hope to shake your hand in the city by the bay.

    This is part of my SQL in the City series, covering a few thoughts on the US tour.

  • Amazing Margaritas in Austin – SQL in the City US Tour

    Photo Sep 17, 9 44 23 PMThe last time I was in Austin was last year, for a weekend trip with my wife to see Stevie Wonder and Kanye West (on separate days) at the Austin Music Festival. My wife and I have been trying to see Stevie Wonder for over ten years, and we finally got the chance and thoroughly enjoyed the experience. It’s something I’ll never forget, and I’d be tempted to go down there again for the ACL Festival weekend.

    On that weekend we stopped by Guero’s Taco Bar near the Festival and had some amazing margaritas. The food was great, and we enjoyed our time there. As I arrive in Austin on Sept 30 to get ready for SQL in the City 2012 – Austin, I’m hoping to get two things done.

    • Run along the Red River
    • Get some great Texas margaritas.

    I arrive in Austin around 1:00pm in the afternoon and I should be able to get both done before some prep for my sessions on Oct 1.

    If you’re in Austin on Oct 1, come join me, Grant Fritchey (b | t), Aaron Nelson (b | t), Tim Radney (b | t) and a number of developers from Red Gate software for a free day of training – The Red Gate Way.

    We had fantastic events last year in LA and London, and this year we’re touring the US. Austin is stop #2 after New York and I’m looking forward to it. Red Gate throws a first class one day event, with plenty of knowledge, discussion, debate, SQL Server tips, tricks, great food and drinks. It’s a great one day event, and it’s free, just register to come.

    We’ll be at the AT&T Executive Education Conference Center and we’d love to have you come and meet us. We’ll talk about things you do every day, or should be doing, in your environment. We’ll give you ideas about how you can improve the way you work.

    If you want to run with me, watch Twitter around the event. Once I get to the hotel on Sunday, probably around 1:30-2:00, I’ll post some details on where I’ll be running. Perhaps near Zilker Park around 2:30-3:00. Join me for a short 2 mi run if you’re so inclined.

    Register today and come shake my hand in Austin.

    This is part of my SQL in the City series, covering a few thoughts on the US tour.

  • Learning about Driving with Big Data

    This is nice, a year long safety pilot from the University of Michigan. Quite extensive, using 3,000 cars to gather data. I don’t know what they’ll get out of this, and if you read the comments, there’s all kinds of speculation, but it’s a good idea, in my opinion.

    Many of the commenters are trying to come up with results before the data in this case. Do we need better driver training? Better design? Driverless cars? Who knows? We should get the data and then decide how to proceed.

    This study is a good idea, because I think we realize there are some things about driving we don’t know enough about, but there are also a lot of things we don’t know we don’t know. The unknown unknowns are likely going to impact how we interpret this data later.

    I like to see more studies along these lines, but with really anonymous data. Do some work to try and disconnect people from the data, which will be hard and likely not work well. Perhaps we just need to map the coordinates of the cars and their interactions to a neutral space, maybe some coordinate system that doesn’t necessarily correspond to lat/longitudes.

    However there will be good data out of this that can help us understand how we might better change driving. I just wish this were with more than 3,000 cars. That seems like too few to me. I’d like to see more like 300,000 cars in a study.