Archives

Archives / 2012 / August
  • Suppressing namespace attributes in nested select statements when using FOR XML workaround

    Tags: Flwor, XQuery, Xml, Namespaces

    I was helping out on the forums the other day with a user who had stumbled across the quirk of SQL putting in an excessive amount of namespace declarations when using nested select statements as part of a FOR XML statement. There is a connect item already open for this, but at the end of the day, the output from SQL is correct, it just bloats the xml. Attached to the connect item is a link to a workaround but it doesn’t work for me as it only solves the problem if none of the xml nodes or … more

  • Script to find orphaned/unreachable job steps within your SQL jobs

    Tags: Script, Admin, SQL Jobs

    SQL jobs are great as the SQL agent job engine allows for very granular control over jobs that are created by allowing great flexibility with the scheduling, execution, flow actions and notifications. Invariably, when jobs are setup, they just run and run without many problems, but the other day I was called in to look at a problem where a SQL job seemingly wasn’t doing everything that it should be doing, namely the job steps.

    After a bit of digging around, I discovered that the flow … more