Tag: syndicated

  • Monday Night Networking Dinner Tonight

    If you are attending the  PASS Summit, or even in the Seattle area, we have a SQL Server pro networking dinner tonight. This is at The Yardhouse on 4th Avenue. This is a buy your own event, but you’ll have the chance to meet with and network with other professionals.

    We’ve split the dinner up into four times to lessen the load on the restaurant, and we’d like you to sign up so we can plan better.

    The times are:

    5:30 – Sign up

    6:30 – Sign up

    7:30 – Sign up

    8:30 – Sign up

    I’ll be there for awhile, along with Andy Warren and a few volunteers. Hope to see you there.

  • Meet and Greet Data Pros at #sqlsummit

    Next Monday night is the networking dinner that Andy Warren and I have put together for the last 6 years. Once again, we’ve arranged for everyone in Seattle to come join in.

    If you don’t have plans for Monday night, pick a time, and join us at the Yardhouse. We’ve got free tickets that are just being used for planning purposes. There’s no charge, other than the food or drink that you want to order.

    Or buy for someone you meet.

    This is a great networking event, so please pass the word and attend if you can.

  • #RedgateRocks at the PASS Summit

    If you are attending the PASS Summit next week in Seattle, and want to attend a fun party on Thursday night, come by the Redgate Software booth in the expo hall for your #RedgateRocks bracelet. This is your ticket to admission Thursday night.

    Walk down to 1927 3rd Ave between 7:30-10:30 Thursday night and come in. We’ll buy the first drink and have some nibbles, as the Brits say.

    Grant and I will be down there for at least part of the night along with plenty of Redgaters enjoying the night. We might not look quite the same, but we’ll be having some fun.

    Steve-and-Grant

    There’s plenty of other Redgate contests and fun for the week, so come see us at the Summit.

  • Creating a Logon Trigger–#SQLNewBlogger

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    Suppose you want to audit logins for your SQL Server instance. There are multiple ways to do this, but Logon Triggers have a few advantages. First, they get data into a table that most of us are familiar with, SQL Server. Second, they guarantee that the event is captured on the instance if the trigger is enabled.

    There are plenty of other uses for these triggers, but beware that you can cause problems if your code doesn’t execute flawlessly.

    I’ll show you how to create a basic logon trigger here. Note, these are server level items, and you’ll need to be able to create the trigger in the master database.

    The structure of this code is similar to other triggers. We’ll use the CREATE TRIGGER DDL. Where this differs from DML triggers is that we use the ON ALL SERVER command. For auditing, I tend to set this as an EXECUTE AS ‘sa’, but you may choose a different type of account.

    Here’s my basic code:

    CREATE TRIGGER LogonTrigger
    --ALTER TRIGGER LogonTrigger
    ON ALL SERVER
    WITH EXECUTE AS 'sa'
    FOR LOGON
    AS
    BEGIN
        INSERT DBAAdmin.dbo.LoginAuditing
        SELECT SYSDATETIMEOFFSET(),
            ORIGINAL_LOGIN(),
            HOST_NAME(),
            APP_NAME();
    END;
    GO
    Note in this code  I’m specifying a specific table to store data in. This has to exist.

    I also use the FOR LOGON event. You can scope triggers for other events, at the server or database levels, and read more about DDL triggers in BOL.

    Once a user attempts to logon, the trigger fires and a simple insert takes place. If there are errors in inserting this data, the user may not be able to logon.

    There is a lot to write about logon triggers, but for this short piece, I’m just showing hot to get started. Please, please, please, be careful with these and read the documentation carefully. Be sure you understand how they work and how to disable them. If you implement one, test it extensively.

    SQLNewBlogger

    I had a small issue building a logon trigger, and thought I’d get a few posts written on the topic. This was 5 minutes work since I had the code and just wanted to describe things, but I’ve got a few more posts sketched on this topics  as I’ve learned more.

    Learning something, solving a problem, writing about it. This is a good way to show someone you are learning about a topic and developing some skill.