#SQLServer – Where does my index live?

Today, I got asked by one of my DBA’s about a recently deployed database that seemed to have a lot of filegroups with only a few tables.  He wanted to verify that one of the tables was correctly partition-aligned, as well as learn where all of the indexes for these tables were stored.  After a […]

August 14, 2014 · stuart · No Comments
Tags: , , , ,  · Posted in: Code, SQL, SQL Server, SQLServerPedia Syndication, XML

SQL Server XQuery: MORE deleting nodes using .modify()

So after my last post, my developer friend came back to me and noted that I hadn’t really demonstrated the situation we had discussed; our work was a little more challenging than the sample script I had provided.  In contrast to what I previously posted, the challenge was to delete nodes where a sub-node contained […]

March 13, 2014 · stuart · No Comments
Tags: , ,  · Posted in: SQL Server, SQLServerPedia Syndication, XML

SQL Server XQuery: deleting nodes using .modify()

Quick blog post; got asked today by a developer friend of mine about how to delete nodes in an XML fragment using the .modify() method.  After some head-scratching and some fumbling around (its been a few months since I’ve done any work with XML), we came up with a version of the following script: DECLARE […]

March 10, 2014 · stuart · No Comments
Tags: , ,  · Posted in: SQL, SQL Server, SQLServerPedia Syndication, XML

PASS 2013 Summit Evals are out!

And I didn’t do too bad; wish I had done better.  I said that when I was done, I felt like it was a “B” level presentation, and it was; I got a 4 out of 5 on my evals.  If I had been a less experienced speaker, I would be thrilled with that; as […]

November 7, 2013 · stuart · No Comments
Tags: , , ,  · Posted in: PASS, Professional Development, SQL Server, SQLServerPedia Syndication

quick blog from #sqlpass #summit13

Been a busy couple of days; hell, the last few weeks have been just nuts. I’m pausing for a few seconds to type a quick post from sunny Charlotte, and just fill in a few thoughts. First, I think my XQuery session went reasonably well; I got bit by the demo gods, and shouldn’t have […]

October 17, 2013 · stuart · 4 Comments
Tags: , , ,  · Posted in: PASS, SQL Server, SQLServerPedia Syndication

SQL Server XQuery: Functions (sql:variable() & sql:column())

  Like most query languages, XQuery has several functions that can be used to manipulate and query data.  SQL Server’s implementation supports a limited subset of the XQuery specification, but there’s a lot of power in the functions provided.  I hope to cover some of those functions in more detail at a later date, but […]

October 4, 2013 · stuart · No Comments
Tags: , ,  · Posted in: SQL, SQL Server, SQLServerPedia Syndication, XML

SQL Server XQuery: .modify() method

Continuing with XQuery, today’s post addresses the .modify() method against the xml data type; this method is used to update XML documents by applying one of three XML DML statements (insert, delete, or replace) via the use of a SQL SET statement.  Again, the idea is hand off the work between the XML engine and […]

October 3, 2013 · stuart · No Comments
Tags: , ,  · Posted in: SQL, SQL Server, SQLServerPedia Syndication, XML

SQL Server XQuery: .nodes() method

Revisiting my XQuery discussion that I abandoned so long ago; with PASS Summit 2013 quickly approaching, I need to get back on the stick, and make some headway in this series.  The .nodes() method is different than the other xml methods in SQL Server in that it: returns tabular data, and so must be used […]

September 30, 2013 · stuart · No Comments
Tags: , ,  · Posted in: SQLServerPedia Syndication

SQL Server XQuery: .value() method

Back to XQuery; the third method I wanted to discuss in this series is the .value() method. Like the .query() method, .value() bridges the SQL Server database engines and XQuery engines by extracting information from an XML document.  The difference is that while .query() returns XML, .value() translates the specific information requested into a scalar […]

July 17, 2013 · stuart · One Comment
Tags: , ,  · Posted in: SQL, SQLServerPedia Syndication, XML

SQL Server XQuery: .query() method

Continuing in my discussion of XQuery in SQL Server, let me discuss another XML data type method: .query().  The .query() method is a great illustration of the bridging concept I discussed earlier.  Simply put, this method allows you to run an XQuery against the XML data type, and return the results of that query as […]

June 24, 2013 · stuart · One Comment
Tags: , ,  · Posted in: SQL Server, SQLServerPedia Syndication, XML