I have a scenario where some inserts/updates are failing due to maximum row size of 8060 limitation. This is happening for a table having lots of varchar 250 to 500, numerics and datetime columns. I was trying to reproduce this same scenario in my test environment but unable to do so.
Do you guys have any idea how to reproduce it in Test environment? Any examples would be great for explanation.
My environment is SQL server 2005 Ent. Edition. My table has ~470 columns. I know its a bad design but its not in my control.
I tried below but it doesn't work:
create table test (col1 varchar(5000), col2 varchar(5000))
insert into test values (replicate('A', 5000), replicate('B', 5000))
Even though record length is greater than 8060, it inserts successfully.
CREATE TABLE
and add it to your question.