Author: way0utwest

  • Dare to Disagree

    This talk on disagreement and openness is very thought provoking. I tend to agree with it, but at what point does disagreement become disharmony? How do you teach the skills to argue and disagree passionately, but do so rationally and still come to a resolution on how to move forward?

    As an example, it seems in politics we have no problem with argument and disagreement. What we lack (in my opinion) is the critical thinking and civil debate we seem to lack.

    Update: I intended the political comment to be an example of where we disagree quite openly and vocally, but don’t discuss facts. It wasn’t intended as a political statement.

    Dare to Disagree

  • Shadow IT

    shadow
    Do you have shadow IT in your organization?

    When I started working as a system administrator over 20 years ago, I worked for a central IT department at a remote facility for our company. Four of us managed a network of 1,000 nodes, with multiple servers under a boss that decreed we needed to respond quickly and effectively to requests made by clients. They came to us often, expecting results, and we delivered. I assumed all IT groups worked like this. Almost a year later I worked at another facility and was quite surprised to find a different situation.

    In the other location there were also four people and 1,000 nodes, but the IT group only managed around three quarters of those nodes. Different groups had their own servers and applications they managed. There were machines under desks in one department, where the desk’s owner was tasked with working half his time on department work, and half his time on technology issues. I only found out about this when one of them asked me how to solve a few problems; I then realized he was managing his own IT services for his group.

    Shadow IT is still around, and in some cases it’s growing. That can be a problem, not only for IT staffs who have less demand for services, and thus staff, but also for the security and data integrity of an organization. Someone managing IT operations part time may not understand the security or data issues they create, face, or just may not have time to deal with. They also won’t necessarily have the experience to work efficiently and effectively on administrative needs, though I know a central IT staff will necessarily do a better job.

    As a data professional I get concerned about Shadow IT groups, which might hoard their data, or even keep around data that’s gotten stale. I worry they’ll lose systems and then come to me for a solution to recover the data, often without having managed backups. Most importantly, I worry they’ll make a mistake, cause a business problem, and not only will I need to clean up the mess, I’ll share in the blame for not helping them build something they needed in the first place.

    Shadow IT is usually the result of a non-responsive central group. I’ve always made it a point to try and help people get the tools they need to work. Sometimes blanket policies prevent this from happening, but by making friends I can usually get Shadow IT people to consult with me and listen to suggestions and ideas. It isn’t perfect, but if I can get them to make regular backups, it’s a win.

    Steve Jones


    The Voice of the DBA Podcasts

    We publish three versions of the podcast each day for you to enjoy.

  • 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.