Author Archives: ph1lqu1nn

Setting up a big query service account.

I have several posts I am working on for the future that will require big query service account keys. So rather than repeating this in the posts this will give the posts a reference to what to do. First setup … Continue reading

Posted in Uncategorized | Leave a comment

Searching for underscores with LIKE

I got caught out by a Gotcha which has caught me out many times and hopefully wont again ( but it will). I was looking for a specific piece of text within a sql module in a Database, simple right! … Continue reading

Posted in SQL, XML | Leave a comment

SQL Server and sending messages to Slack. ( or how I stopped worrying about emails) Part 3

In Part 1 and 2 of this series I demonstrated how to create a Slack Integration and then use Azure Data Studio to Test the integration. These will need to be completed for the following SQL Server implementation to be … Continue reading

Posted in python, slack, SQL | Leave a comment

SQL Server and sending messages to Slack. ( or how I stopped worrying about emails) Part 2

This is part 2 of a set of articles Part 1 which details the setting up of the Slack Integration can be found SQL Server and sending messages to Slack. ( or how I stopped worrying about emails) Part 1 … Continue reading

Posted in python, slack, SQL | Leave a comment

Part 1 of a series of 3. Details how to create a Slack Bot. Later parts of the series explain how to use Azure Data Studio and SQL Server to send messages to this Slack integration Continue reading

Posted on by ph1lqu1nn | 1 Comment

Subqueries for XML blobs without self-referencing

One of the issues I see several times within SQL Server is people creating SQL Subqueries that reference the parent query so that an XML blob can be created. In this example The simple table query returns the table contents … Continue reading

Posted in Uncategorized | Leave a comment

Auditing Your Database Changes

SQL Server can capture Database level Trigger information using XML.  I personally use this on my home PC’s because I’m poor and can’t afford one of those amazing DB Source control products that are out there on the market. I’m … Continue reading

Posted in Uncategorized | Leave a comment

Recursive XML branches

One of the main features of XML is that it handles hierarchical data structures.  I agree that so does SQL either using the hierarchy variable or creating a Recursive CTE.  but nothing compares to the simplicity  of the XML format … Continue reading

Posted in Uncategorized, XML | Leave a comment

Enforcing XML Document Structure

by default the xml variable supports a content structure of xml this is very useful if you are constructing an xml blob.  It works for typed and untyped code, and it has it’s place. The following code shows an xml … Continue reading

Posted in XML, XML Schemas | Tagged , | Leave a comment

Schema visibility using xml_schema_namespace

One of the issues I’ve faced is the constant referencing and rereferencing of XML Schemas that are stored against a database.  the xml_schema_namespace dmv helps with this.  it takes 2 parameters.  the schema of the database object XML Schema and … Continue reading

Posted in SQL, XML, XML Schemas | Leave a comment