THE SQL Server Blog Spot on the Web

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

Browse by Tags

All Tags » Database Testing   (RSS)
  • Stress testing UPSERTs

    Suppose that you need to implement the following logic: IF(row exists)   Update the row ELSE  Insert a new row. If you already are on 2008, you should use MERGE command, and you don’t need to read this post. Prior to 2008 this logic has to be implemented using UPDATE and INSERT commands. I will stress test several ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on December 14, 2008

    <Denis Gobo’s mode on> Suppose you have an empty table:   SELECT COUNT(*) FROM SampleTable --- 0   What would be the result of the following query:   DBCC CHECKIDENT('SampleTable', RESEED, 1) INSERT SampleTable(j) SELECT 1 SELECT SCOPE_IDENTITY()   <Denis Gobo’s mode ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on June 26, 2008
  • Database Unit Testing: Impersonation

     When you run NUnit/C# unit tests against your local instance, you are a dbo. As such, you are not getting any errors caused by missing permissions. However, you can impersonate another user, and run your unit tests in the context of that other user. The following test harness demonstrates the ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on June 18, 2008
  • Unit Testing Tips: Reproduce a Lock Timeout

    Well, I have just finished a series of articles about unit testing on, and some techniques were not included, just to keep the articles short. Still problems such as reproducing a lock timeout and unit testing the retry after it (lock timeout) are interesting, at least to me, so I am continuing. You will need the ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on May 30, 2008
  • Database Testing on CSTechCast

    In late February I recorded an interview on Database Testing with the cool guys at CSTechCast! :{> Andy
    Posted to Andy Leonard (Weblog) by andyleonard on March 31, 2008
Privacy Statement