Tuesday, September 22, 2009

September OPASS Meeting Recap

OPASS met last Tuesday, September 14th, with a mini (15 minute) presentation by Todd Holmes on Backup Basics and Jorge Segarra (@SQLChicken) speaking on Policy Based Management in the main presentation.  We had  good crowd of about 20-25.

Meeting Introduction

We started the meeting with some announcements and discussion of who was going to the PASS SUMMIT.  I was officially presented as co-President of OPASS and took some time to discuss the upcoming SQLSaturday 21 – Orlando schedule as I was the one responsible for putting the schedule together.

We then had about 10 minutes of networking time.  I spent it talking with Mark, who had come to Orlando on a contract job that had been ended and was looking for work and guidance as to where to go to get solid SQL Server training.

Mini Presentation – Backup Basics

Todd did an okay job on his mini presentation on Backup Basics.  He is a first time speaker and you could tell he was a little nervous about being in front of a group.  He covered recovery models, backup types, and backup and restore command syntax.  I thought he did well to cover that much information in 15 minutes.  I don’t think I could have covered as much, especially with the number of questions that were asked.

Feature Presentation – Policy Based Management

Jorge did a good job presenting on PBM.  This was my first exposure to it and I was impressed by what you can do with it.  He went over the architecture and examples of how to use it.  I came away convinced that any DBA in a shop with more than a couple of SQL Servers should become familiar with it and use it.  We did learn one thing that is a little disturbing about having an active policy in place, like requiring stored procedure names to fit a standard.  If you have an existing procedure that does not meet the standard and you, for whatever reason, make changes to that procedure and choose to deploy those changes using a DROP and CREATE the policy will block the rollback the CREATE, but not the DROP.  Here’s an example:

/*
Existing Procedure
*/
CREATE PROCEDURE sp_getorder
(
@order_id INT
)

AS

SET NOCOUNT ON

SELECT
*
FROM
dbo.orders
WHERE
order_id = @order_id;

RETURN;

GO
/*
Now you create a policy that says that
stored procedures must begin with usp_%
*/

/*
You realize that SELECT * is a bad practice
so you want to change the procedure to only
return the required columns and you do a Drop
and Create
*/

IF OBJECT_ID(N'dbo.sp_getorder', N'P') IS NOT NULL
BEGIN
DROP PROCEDURE
dbo.sp_getorder ;
END

GO

CREATE PROCEDURE
sp_getorder
(
@order_id INT
)

AS

SET NOCOUNT ON

SELECT
order_no,
customer_id,
salesperson_id,
purchase_order_no
FROM
dbo.orders
WHERE
order_id = @order_id;

RETURN;

GO


The PBM violation will not allow the CREATE to take place, but will allow the DROP.  There may be ways to work around this, but Jorge didn’t know any off the top of his head.  This discussion was driven by a question from Kendal Van Dyke (@SQLDDBA).



Post Meeting Discussion


As usual we had a good post meeting discussion as Kendal, Jorge, Andy, and I stuck around for about an hour and others for about 30 minutes.  We talked about networking, PASS, PASS Summit, and keeping up.



As always some good value in the meeting and the post meeting discussion.

1 comment:

  1. Awesome, thanks for recap. I can't believe I forgot to mention that lesson we learned! Thanks for doing such a great job with everything and congrats again on becoming the co-president of OPASS!

    ReplyDelete

So what do you think I am?