Tuesday, 22 May 2012

Code Library - an introdution

In my progression from novice programmer to seasoned DBA, I have had cause to touch just about every part of the SQL Server arsenal. 
I haven't generally worked for large multi-national corporations with IT budgets to match, so I've had to meet most database challenges with the out-of-the-box SQL Server tools provided by Microsoft.  This has often meant getting down and dirty in the system tables to find creative(and free) ways of meeting business and IT requirements.
I've had a lot of help from 'the community' along the way, and it's good to know that some of the DB (and infrastructure)  systems I've helped build are still operational 10 years later.

I owe part of my ongoing success to the early realisation that I have a personal characteristic that is both a strength and a weakness - I hate doing things twice.  This leads me to ask a large number of detailed questions when presented with a challenge (this is where the weakness part comes in - sometimes I can ask too many questions) so that I can produce a solution that not only delivers what is required, but which is both scalable and modular enough to deliver to next weeks and next months revised requirements.

This characteristic, combined with a DBAs natural reluctance to throw anything away, has led me to keep an extensive library of code samples.  Some are self-contained and generic enough to use as-is, but some may require some re-engineering to be of use, or may just serve as an indicator of what can be achieved.

Up to this point, this code library has been usable only by those with whom I have direct contact.  I've now decided it is long past time to publish for the use of everyone.

As stated in my initial blog post 'Hello World', my diligence in recording the source of each idea has not always been good, but then when I started the collection, blogs didn't exist, and personal web sites were few and far between.  Therefore, most of the code included has no author attribution (aside from those parts that originated with me).  Apologies to the original authors - no plagiarism was intended.

While the Google Blogger offering is excellent, I'm sure there are limits to how many additional pages of information I can add, and the page layout functions are more limited than I would like too (although initially the content will be fairly straightforward).  I have therefore invested in a more mainstream web site, again hosted by Google.  The Code Library tab will contain the master list of all code samples, but the links all redirect to the web site.  Alternatively, you can go direct to www.chilledsql.com

Have fun.


  1. Hí,

    thanks a 1000 for all the interesting scripts.

    Just a question (of pure laziness) do you have a "Super-Zip" file containing all the scripts at once or at least a super-zip for each section ? That would be most helpful. The one supersite, you mention, just gives a 404 ...

    http://www.chilledsql.com/welcome/tip_category_reportsandssrs/tip_detail_ssrs_getreportdatasources containes a bug, the download there belongs to a different (the previous one) script.

    kindly regards Klaus

  2. Klaus

    Thanks for reporting the bugs. I have now corrected the link and the file download.

    At the moment, I'm still working through my library of code and publishing it, although I've not been able to devote much time to it in the past few months.
    I currently don't have a super-zip, as it would be fairly challenging to ensure it had the most recent content. I'm not a real pro with source control software, although I really should be.
    In mitigation, I would say that the search facility on the site is powered by Google and all the pages are indexed. I use the search all the time to easily retrieve code. I've tried to use very descriptive keywords in the page body to ensure that indexing is effective.


  3. Hi,



    I think, the following maybe is better: instead of "Name" use "[Path]" as I've seen cases, where the same RDL-NAME is used within different Subdirectories with different reports. I HATE it, but ...
    PS: Maybe email is simpler ?

  4. Klaus

    I'd be happy to converse directly by email. However, I'm hesitant to publish my email address on an open forum. We can initiate a conversation using the email at my website and I will respond from there chillydba@chilledsql.com


    1. Hi,

      still fighting with SSRS ... A customer wants to have Metadata for / about his Preports - Your SPs are really helpful here.

      As "the better" is the enemy of "the good" (as we in Germany say) I still have wishes: A) Your Dataset Procedure is super, but also here i'm missing the [Path] (Folder) info ...

      Maybe a good enhancement for your SPs would be the drillthru reports, so that you have a summary of all things which belong to one report ...

      Just my 2 centrs as usual ...
      mfg Klaus