THE SQL Server Blog Spot on the Web

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

Damian Widera

  • Memories about Tadeusz Golonka

    Today at 10:55 AM, Tadeusz Golonka - my greatest  Mentor and Teacher  passed away. I had te opportunity to met Tadek in person several times last years. It was always a great experience to see how he shared his energy and passion. I was always impressed and had a lot of new ideas after such meeting or lecture.

    I can remember the meeting  in early 2009 and his briliant speech he did for us, the MVP community in Poland. We spent two days together and he talked to us all the time. He gave us examples how to share IT passion to other people and how to be better person for others. He was the greates Mentor I have ever met - I realized this during that meeting. My greates dream was and still is to be "like Tadek". Many Times I just went to events to see / hear him on stage ("in action"). I always wanted to have his energy, empathy and passion. Now I have to live without his good words and advices....

    Let me put here the words that Adam Cogan wrote on Tadek's profile on Facebook. I just can't write about that fatal accident. 

    "The circumstances of Tadeusz Golonka death are too tragic. Tad stood up to offer his seat to an elderly lady, he lost his balance and then he slipped and hit the tram door hard. He then fell out of the tram and hit the metal barriers that separate the tram rails from the street. It was a severe accident....

    .. So horrible.  At first it was a miracle is that he survived... he fought for several days.  My thoughts are with his lovely family. The family have asked for blood donations as a symbolic gift. Tad received a lot of blood.  Thank you Tad, you were a wonderful person. I will remember you as a kind man, a gentleman. "

    RIP Tadeusz- You will never ever be forgotten. You are with us all the time

     


     

  • Annual SQL Server conference in Poland - SQLDay 2014

    We had a great 3-days conference this year in Poland. The SQLDay (7th edition) is an annual community conference. We started in 2008 as a part of C2C (community to communities) conference and after that, from 2009 the SQLDay is the independent event dedicated to the SQL Server specialists. 

    This year we had almost 300 people and speakers like Bob Ward, Klaus Aschenbrenner and Alberto Ferrari. Of course there were also many local Polish leaders (MVP's and an MCM :) )

    If you are curious how we played in Wroclaw this year - just visit the link http://goo.gl/cgNzDl (or try that one https://plus.google.com/photos/100738200012412193487/albums/6010410545898180113?authkey=CITqmqmkrKK8Tw)

     

    Visit the conference site: http://conference.plssug.org.pl/ 

  • In-Memory OLTP Sample for SQL Server 2014 RTM

    I have just found a very good resource about Hekaton (In-memory OLTP feature in the SQL Server 2014).

    On the Codeplex site you can find the newest Hekaton samples - https://msftdbprodsamples.codeplex.com/releases/view/114491.

    The latest samples we have were related to the CTP2 version but the newest will work with the RTM version.

    There are some issues fixed you might find if you tried to run the previous samples on the RTM version:

    Update (Apr 28, 2014): Fixed an issue where the isolation level for sample stored procedures demonstrating integrity checks was too low. The transaction isolation level for the following stored procedures was updated: Sales.uspInsertSpecialOfferProductinmem, Sales.uspDeleteSpecialOfferinmem, Production.uspInsertProductinmem, and Production.uspDeleteProductinmem.

     

  • SQL Server 2014 has come into the light - the RTM will be available on 1st April

  • Strange behaviour on CHECK constraint

    Last Friday I asked myself: imagine I have a CHECK constraint enabled on a column in a table. What would happen if I try to enable it again? 

    My question is not about "expecting some error" - I expect that the engine will check if the constraint is enabled and if it is - nothing will be made.

    If the constraint was off and the on - the SQL Server would have to load all data from a particular table just to check if the constraint is not violated.

    If the constraint is turned on and I issue the commend "turn it on" - I expect that no data is loaded to the memory

     

    Let’s start from  the beginning. I created a new database for the testing purpose. It will be easier to navigate on various DMV later :)

    CREATE DATABASE CheckTEST

    go

    USE CheckTEST

    GO

     

    Now  it's time to create a table - let's call it Months. The table has only one column called MonthNo and one CHECK constraint that will assure us that we have valid month number which is from 1 to 12. 

    CREATE TABLE dbo.Months (MonthNo TINYINT)

    GO

    ALTER TABLE dbo.Months ADD CONSTRAINT [Months_ValidMonth] CHECK(MonthNo BETWEEN 1 AND 12)

    GO

     

    Let's add some data 

    INSERT INTO dbo.Months( MonthNo )

    VALUES  ( RAND() *12 )

    GO 2000

     

    I know the INSERT will cause error when a 0 is generated – but that’s ok.

     

    Next step would be to check how my constraint looks like:

    SELECT * FROM sys.check_constraints

    WHERE name = 'Months_ValidMonth'

    GO

     

    I can see that values in the column is_disabled is set to 0 (ok – constraint is active) , so I am sure that no value is going to be entered to the table that violate the constraint. For sure I could insert NULL.

     

    Suppose I turned off the constraint:

    ALTER TABLE dbo.Months WITH CHECK NOCHECK CONSTRAINT [Months_ValidMonth] ;

    GO

     

    And turned it back again:

    ALTER TABLE dbo.Months WITH CHECK CHECK CONSTRAINT [Months_ValidMonth] ;

    GO

     

    Nothing has happened, data is ok. Now I  clear all buffers:

    DBCC FREEPROCCACHE

    DBCC DROPCLEANBUFFERS

    GO

     

    For this database I should not see any results through the dm_os_buffer_descriptors DMV (or at least I do not want to see any DATA pages that store the actual data of the table)

    SELECT * FROM sys.dm_os_buffer_descriptors

    WHERE database_id = DB_ID()

     

     

    What will happen if I issue the code once again – but only this part of code:

    ALTER TABLE dbo.Months WITH CHECK CHECK CONSTRAINT [Months_ValidMonth] ;

    GO

     

    I expect that NO DATA pages is going to be loaded to the buffers. The constraint is already enabled so why to load data ?

    The conclusion of this blog post: I was surprised but the DATA pages were loaded. What is the reason to do it?

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement