title: SqlBulkInsert - How to set Fire Triggers, Check Constraints?
body: <p>I'm performing a bulk insert with an ADO.NET 2.0 SqlBulkCopy object from a C# method into a MS SQL 2005 database, using a database user with limited permissions.  When I try to run the operation, I get the error message:</p>
  
  <blockquote>
    <p>Bulk copy failed. User does not have
    ALTER TABLE permission on table
    'theTable'. ALTER
    TABLE permission is required on the
    target table of a bulk copy operation
    if the table has triggers or  check
    constraints, but <code>'FIRE_TRIGGERS'</code> or
    <code>'CHECK_CONSTRAINTS'</code> bulk hints are not
    specified as options to the  bulk copy
    command.</p>
  </blockquote>
  
  <p>I read some documentation and created the bulk copy object with the constructor that lets me specify such things:</p>
  
  <pre><code>    SqlBulkCopy bc = new SqlBulkCopy(
          System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"],
          SqlBulkCopyOptions.FireTriggers &amp; SqlBulkCopyOptions.CheckConstraints);
  </code></pre>
  
  <p>But this doesn't change anything - I get the same error message as before.  I tried fiddling with some of the other SqlBulkCopyOptions values but no luck.  I really thought this would fix the problem, am I missing something?</p>
  
  <p>I tested the procedure after granting ALTER on the table to my user, and the operation succeeded.  However this is not an option for my situation.</p>