Wednesday, October 7, 2009

Finding Linked Servers with Open Mappings to SA

Recently I've been working on implementing PBM (Policy Based Management) in our environment. In addition to using the predefined conditions & facets I've been creating custom Policies using executesql().

As part of this effort we wanted a policy to alert us to Linked Servers with an open mapping to SA. Since this isn't something that was really obvious it seemed worthy of a quick post. There are 2 versions of the code, one for SQL2000 & one for SQL2005. The code is written with PBM in mind so parses as one string, you can take this code out & it will still work just fine. The code is here.

Don't forget SQLSaturday #21 in Orlando is less than 2 weeks away.

2 comments:

  1. Would love to see the code sample, but there doesn't seem to be public access to the code document?

    ReplyDelete
  2. My apologies, for some reason Google has flagged the document as inappropriate. I have requested a review, in the meantime I've emailed you a copy.

    Thanks for reading & sorry for the inconvenience - John

    ReplyDelete