Need to replication a table with 380 columns

  • Hi All,

    I need to replication a table with 380 columns.  I run into error of

    "This article cannot be created on table '[dbo][table1] because

    it has more than 255 columns"  sql error 20068.

    I setup transactional replication.  Anyone know the work around?

    Thank you for your help.

    TJ

  • Sounds like MS has a byte data type in the system and apparently you're overflowing it.  380 columns?!  Wow.  I'd hate to work with that!  I've had tables approach 100 columns, but I avoid that like the plague, just too hard to work with.

    It's definitely a bug as MS BOL for SQL2K says that you're limited to 1024 fields per table (So does BOL 2K5, see Remarks under Create Table).  It has to have been encountered before, I'd first check service packs and the MS web site to see if there's a hot fix.  But there's definitely a disconnect if BOL says 1024 and replication barfs at 255.  One or the other is wrong.

    -----
    [font="Arial"]Knowledge is of two kinds. We know a subject ourselves or we know where we can find information upon it. --Samuel Johnson[/font]

  • The Microsoft indicated that a table has more than 254 columns can not be replicated in transactional replication. 

    http://support.microsoft.com/kb/310631

    Thank you.

    Edwin

  • If you have some flexibility you could split the table into two, each with < 255 columns of your choosing from the original table.  Link them via a small key (int identity perhaps?) so you have a guaranteed one-to-one relationship.  set a view on top joining both so you can access the table via a single reference.  replicate each table separately.  Lots of work but could allow you to achieve your goal.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 4 posts - 1 through 3 (of 3 total)

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