THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » sql server » T-SQL   (RSS)
Showing page 5 of 5 (48 total posts)
  • sys.dm_db_partition_stats

    For the current database, gives you space oriented statistics for each partition of indexes (even if you only have one partion), like row count, page counts, etc. Resembles the sysindexes in previous versions of SQL Server, with more information. Type: view Data: accumulating, refreshed at server restart Scope: Reset on server restart (or ...
    Posted to Louis Davidson (Weblog) by drsql on July 11, 2007
  • Blogging the DMV's

    Well, I am working on a project that is going to be a book on dynamic management views (and functions, but DMF is an interesting acronym, and objects, as in DMO, has a well known other meaning.  What I will post will be one object in the following format: Name of object Type: Function or View Parameters: If it is a function Scope: Really ...
    Posted to Louis Davidson (Weblog) by drsql on July 10, 2007
  • Getting the difference between two sets of like data

    A question came up on the forums the other day that a person wanted to compare two tables of data.  Doing this is pretty easy using several techniques:   Using EXCEPT Using NOT EXISTS Using a FULL OUTER JOIN First two sample tables which represent two sets of data that you would get from a statement, from clause, etc.  ...
    Posted to Louis Davidson (Weblog) by drsql on February 8, 2007
  • Does XLOCK always prevent reads by others?

    I was going back through my files of draft blogs for the past 6 months (particularly looking for things that are wrong in my book,) and I found this one that covers something that I found really fascinating.)  In this thread, a person was attempting to create a pessimistic lock by applying an XLOCK in a hint.  Seemed reasonable to me, ...
    Posted to Louis Davidson (Weblog) by drsql on December 13, 2006
  • The joys of a calendar table (ytd, month, and quarter summations)

    There was a question on the forums the other day that asked how to get a total for the current month, the current quarter, and year to date.  It is actually a pretty easy task when using a calendar table.  I have one you can use here (I fixed an error in it that I just found too!): ...
    Posted to Louis Davidson (Weblog) by drsql on December 9, 2006
  • There is still stuff I hadn't noticed (OBJECT_ID has a parameter for type of object)

    I was building a script to build a table I had built in my dev environment including inserts so I did a bit of hunting around and came upon Vyas's script (http://vyaskn.tripod.com/) that is used to generate inserts from a table (script here: http://vyaskn.tripod.com/code/generate_inserts_2005.txt).  Very cool stuff and worked nicely (all I ...
    Posted to Louis Davidson (Weblog) by drsql on December 3, 2006
  • Another reason to hate quoted identifiers...

    I was working with the Redgate compare tool today (something I am a big fan of I might add,) using it to take a snapshot of my database so I could drop all code and do a collation change to a database (an article I updated because I discovered a new wrinkle with computed columns needing to be modified.) When I got to that point in the process ...
    Posted to Louis Davidson (Weblog) by drsql on October 1, 2006
  • Easier access to metadata coming soon to a SQL Server near you

    This is not a scoop or anything, but it is quite newsworthy.  It is also a good way to kick off my sqlblog er...blog: Kalen Delaney - Metadata PowerSimon Sabin - object_name() to be extended in SP2 A very common request is to have some of the system functions to work in any database.  Kalen posted a piece of feedback on ...
    Posted to Louis Davidson (Weblog) by drsql on September 25, 2006
Privacy Statement