Permitted no of bytes per row

  • Comments posted to this topic are about the item Permitted no of bytes per row

  • Easy one. Thanks Anoo.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • Good question, almost got it wrong, but @ the last second noticed that it`s Varchar not Char in the 2nd table 🙂

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • nice question . thanks for share

  • When I ran the script I got the following:

    Msg 1701, Level 16, State 1, Line 1

    Creating or altering table '#cTab' failed because the minimum row size would be 16011, including 7 bytes of internal overhead. This exceeds the maximum allowable table row size of 8060 bytes.

    Did I miss something?

    @@Version: Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Web Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

  • timwell (3/18/2014)


    When I ran the script I got the following:

    Msg 1701, Level 16, State 1, Line 1

    Creating or altering table '#cTab' failed because the minimum row size would be 16011, including 7 bytes of internal overhead. This exceeds the maximum allowable table row size of 8060 bytes.

    Did I miss something?

    @@Version: Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Web Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

    You didn't miss anything. The second create succeeds. You don't get a message that tells you if things work. 😉

    [font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
    Connect to me on LinkedIn

  • nice and easy..

  • Thomas Abraham (3/18/2014)


    timwell (3/18/2014)


    When I ran the script I got the following:

    Msg 1701, Level 16, State 1, Line 1

    Creating or altering table '#cTab' failed because the minimum row size would be 16011, including 7 bytes of internal overhead. This exceeds the maximum allowable table row size of 8060 bytes.

    Did I miss something?

    @@Version: Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Web Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

    You didn't miss anything. The second create succeeds. You don't get a message that tells you if things work. 😉

    Then that's what I missed. Should have read the explanation more thoroughly... 🙂

  • as usual, i read the question too fast and made assumptions

  • Stewart "Arturius" Campbell (3/18/2014)


    crussell-931424 (3/18/2014)


    But what happens when you fill those varchar fields with data?

    the insert / update will fail...

    Actually, I am not seeing a failure when the varchar columns are filled

    insert into #vcTab

    select 1,

    REPLICATE('A',8000),

    REPLICATE('B',8000)

    ;

    select len(n1),

    len(vc1),

    len(vc2)

    from #vcTab

    ;

    select * from #vcTab

  • KWymore (3/18/2014)


    Stewart "Arturius" Campbell (3/18/2014)


    crussell-931424 (3/18/2014)


    But what happens when you fill those varchar fields with data?

    the insert / update will fail...

    Actually, I am not seeing a failure when the varchar columns are filled

    There's no reason why you should. The explanation makes it quite clear that any offending field will be moved into the overflow area; or maybe it doesn't - it appears to say that only the longest such field will be moved, which is certainly not true.

    A nice question, somewhat spoiled by a careless explanation.

    Tom

  • .........

    A nice question, somewhat spoiled by a careless explanation.

    You are setting a tough target Tom, Copied the explanation from BOL for un-ambiguity. Sad to see that it didn't work. Could you please ponder some ideas on a good explanation from SSC point of view.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic. Login to reply