[SQL Server 2008] Bulk insert issue

Hi!

SQL Server settings issue? I don’t know.

I changed this setting (Server Roles), but without effect! :nonod:

EXEC master..sp_addsrvrolemember @loginame = N'user_dwh', @rolename = N'bulkadmin'
GO

My user has Server Roles: db_owner and bulkadmin.

Any idea? :crazy_face:

Gôm

Well … it seems to be a Data Services issue and not SQL Server.

My SQL Server settings look good: Microsoft Q&A | Microsoft Learn

Any idea about a Data Services issue? :hb:

Gôm

With “Maximum rejects” set to zero … Bulk works! :nopity:

Do you know why?

Gôm

Because you are probably trying to use too large a buffer. Lower the rows per commit from 8,000 (I think that’s what you’re using) to something like 1,000 to start out.


eganjp :us: (BOB member since 2007-09-12)

Thanks but no. We also thought it could be that and we tried 1000 rows and 2000.

But we only changed “Maximum rejects” to zero and it works.

Here is why 8000 rows seems to be the good value : http://wiki.sdn.sap.com/wiki/display/EIM/The+impact+of+the+CommitSize+(SQL+Server) ! :mrgreen:

Gôm

All our production code uses a maximum reject value of zero. We have it set this way simply because a single failed row requires us to fail all the rows. Based on what you posted it sounds like the value of zero also has a performance benefit (no caching).


eganjp :us: (BOB member since 2007-09-12)

“no caching” is a performance benefit?!

Gôm

That’s what it sounds like to me.


eganjp :us: (BOB member since 2007-09-12)