After reading in an excel-sheet (to transferTable), I want to add that data to a new table (destinationTable) using SqlBulkCopy, but I\'m getting the error:
I had the same issue stating
tablename-object not found or insufficient privileges.
It worked fine on my account but not on the end users account, where it gave this error. It turned out that if you run bulkcopy with SqlBulkCopyOptions.KeepIdentity
as option, the connection user needs the Grant Alter right, if he doesn't, you will get this not very helpful error message.
options one has:
(this is an extension of Fosna's answer but given the time it took me to identify the root cause I thought it might be worth to make this solution a bit more explicit).