in

SQL Server Blogs

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

Browse by Tags

  • Windows File search is a pain in the XXX, so I PowerShell-ed it

    I have grown tired of finding a file on a Microsoft machine. In Windows 2012 server, it gets easier with their "Search everything" feature but sometimes you're not so lucky to be on a machine with a newer OS. Here is a little PowerShell script I use to find files. It is so much easier!...
    Posted to greenmtnsun (Weblog) by greenmtnsun on Wed, Dec 21 2016
  • insert into script

    My contribution to community http://www.sqlmag.com/article/sql-server/Transfer-small-amount-of-data-by-generating-the-INSERT-INTO-statement.aspx Enjoy!
    Posted to Tomaz.tsql (Weblog) by Tomaz.tsql on Tue, Jan 18 2011
  • SQL Nugget - script content of a table as INSERT statements

    I have wrestled a couple of times what was easy when I used TOAD but became painful with SQL Server. For example you have a control table that is manually edited most of the times in DEV. When you want to move it to TEST you can transfer the whole table but in terms of source control it's better...
    Posted to MartinIsti MS BI blog (Weblog) by MartinIsti on Wed, Oct 20 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
  • Coding standards

    This post will be about coding standards. There are countless articles and blog posts related to this topic, so I know this post will not be too revealing. Yet I would like to mention a few things I came across during my work with the T-SQL code. Naming convention - there are many of them obviously....
    Posted to Piotr Rodak (Weblog) by Piotr Rodak on Thu, Mar 11 2010
  • relative query cost not accurate when using set rowcount

    When tuning performance of a query, it is quite common to compare different variants of the query in the same batch and compare the execution plans to see if changes that you made actually work for better or not. Often you would compare just relative cost of execution plan of a query within the batch...
    Posted to Piotr Rodak (Weblog) by Piotr Rodak on Wed, Jan 27 2010
  • updating column with a random value

    I have been working recently on load testing of our ETL. One of the factors that determines amount of transfered data is a lookup table that is joined to the source. I populated this table with aproppriate values, and then realized that I also need some values in second column, and they were null. Let's...
    Posted to Piotr Rodak (Weblog) by Piotr Rodak on Wed, Jan 13 2010
  • Script out Procedures to seperate files

    In this post script-out-procedures-and-functions-part-2 , I showed how to script out the procedures in a single file Here is another way to do the same but different file for each procedure. The file name will be the name of the procedure. declare @sps table ( proc_name varchar ( 100 ), texts varchar...
    Posted to Madhivanan (Weblog) by Madhivanan on Mon, Oct 26 2009
Page 1 of 2 (19 items) 1 2 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems