in

SQL Server Blogs

Voices from the UK SQL Server Community
All Tags » T-SQL (RSS)

Browse by Tags

  • Running Massive Updates, Deletes, Inserts

    Firstly with large transactions comes large transaction logs, ensure you grow your log accordingly before running a huge transaction because autogrows can cause overhead during execution for example: why did the query run so quickly on test rather than live… the likelihood is you ran it repeatedly on...
    Posted to Atul Thakor (Weblog) by AtulThakor on Thu, Apr 28 2011
  • The most dangerous SQL Script in the world!

    In my last blog entry, I outlined how to automate SQL Server database builds from concatenated SQL Scripts . However, I did not mention how I ensure the database is clean before I rebuild it. Clearly a simple DROP/CREATE DATABASE command would suffice; but you may not have permission to execute such...
    Posted to Sparks from the Anvil (Weblog) by DrJohn on Tue, Feb 15 2011
  • SSIS: Building SQL databases on-the-fly using concatenated SQL scripts

    Over the years I have developed many techniques which help automate the whole SQL Server build process. In my current process, where I need to build entire OLAP data marts on-the-fly , I make regular use of a simple but very effective mechanism to concatenate all the SQL Scripts together from my SSMS...
    Posted to Sparks from the Anvil (Weblog) by DrJohn on Sun, Feb 13 2011
  • The underused OVER clause!

    Seeing the Steve Hindmarsh’s blog post on the OUTPUT clause got me thinking about what other underused clauses may benefit from greater exposure! You may already be familiar with the OVER clause because it is mandatory when using a ranking function i.e. ROW_NUMBER, RANK, DENSE_RANK and NTILE. The order...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Sun, Jan 23 2011
  • T-SQL Fundamentals Course

    SQLBits is known for it’s high quality SQL Server training. If you look at the courses available on the SQLBits Website one may stick out as being different to the other in-depth courses; that is T-SQL Fundamentals with Martin Bell . You may ask why I’m putting on an introductory course like this, and...
    Posted to Martin Bell UK SQL Server MVP (Weblog) by MartinBell on Fri, Jan 21 2011
  • T-SQL (SCD) Slowly Changing Dimension Type 2 using a merge statement

    Working on stored procedure recently which loads records into a data warehouse I found that the existing record was being expired using an update statement followed by an insert to add the new active record. Playing around with the merge statement you can actually expire the current record and insert...
    Posted to Atul Thakor (Weblog) by AtulThakor on Mon, Jan 10 2011
  • T-SQL bits - ROW_NUMBER

    About a month ago I found the SQLShare site which provides useful, clear tutorial videos of how to use some SQL functions, or how to fine tune a query. Their videos are roughly 3-5 minutes long and have proved to be very good for me with a strong BI background with less first-hand T-SQL experience. I...
    Posted to MartinIsti MS BI blog (Weblog) by MartinIsti on Thu, Jun 3 2010
  • Good practices - database programming, unit testing

    Jason Brimhall wrote today on his blog that new book, Defensive Database Programming , written by Alex Kuznetsov ( blog ) is coming to bookstores. Alex writes about various techniques that make your code safer to run. SQL injection is not the only one vulnerability the code may be exposed to. Some other...
    Posted to Piotr Rodak (Weblog) by Piotr Rodak on Mon, May 24 2010
  • The penultimate audit trigger framework

    So, it’s time to see what I came up with after some time of playing with COLUMNS_UPDATED() and bitmasks. The first part of this miniseries describes the mechanics of the encoding which columns are updated within DML operation. The task I was faced with was to prepare an audit framework that will be fairly...
    Posted to Piotr Rodak (Weblog) by Piotr Rodak on Tue, May 11 2010
  • COLUMNS_UPDATED() for audit triggers

    In SQL Server 2005, triggers are pretty much the only option if you want to audit changes to a table. There are many ways you can decide to store the change information. You may decide to store every changed row as a whole, either in a history table or as xml in audit table. The former case requires...
    Posted to Piotr Rodak (Weblog) by Piotr Rodak on Wed, Apr 28 2010
Page 1 of 10 (92 items) 1 2 3 4 5 Next > ... Last »
Powered by Community Server (Commercial Edition), by Telligent Systems