Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8981155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:15:47+00:00 2026-06-15T20:15:47+00:00

I have a SSIS package that is truncating and then inserting a whole table

  • 0

I have a SSIS package that is truncating and then inserting a whole table from serverA to serverB, however I am trying to view the progress of the job by performing a select with a NOLOCK hint on serverB but it gets lock by the “BULK INSERT” performed by the SSIS package.

I have review the “sys.dm_tran_locks” and found that the “BULK INSERT” is holding a “Sch-M” lock on the table, and I don’t understand why.

Please can you help me with this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:15:48+00:00Added an answer on June 15, 2026 at 8:15 pm

    Truncate requires SCH-M for deallocating the table allocation units. Among other, this lock serves the very purpose of protecting against concurrent dirty reads. Had the truncate succeed in deallocating the table while dirty reads scanner are in it those scanner would all of a sudden find themselves reading pages that belong to no one (or worse, were reallocated to some other AU). As with any write lock, the 2PL protocol requires to be held until end of transaction. Subsequent dirty scanners will block behind it, as they should.

    If you do not have the TRUNCATE/BULK INSERT wrapped in a transaction then there are other scenarios that could cause BULK INSERT itself to go SCH-M instead of X (I think table lock hint on bulk insert on an empty table (no AU root page) will cause this).

    Too peek at the progress of the BULK INSERT check how many pages are allocated to your target in sys.allocation_units. This will give you a rough estimate of percent complete.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an SSIS package that queries data from a view using an SQL
I am trying to create an SSIS package that queries data from a table,
I have an SSIS package that takes a table and looks up a whole
I have an SSIS package that exports data from a table on a SQL
I have an ssis package that imports a view from one database into different
I have written an SSIS package that essentially takes data from multiple sources and
I have an SSIS (2005) package that transforms some XML data and then imports
I have several variables in an SSIS package that I would like inserting into
I have an SSIS Package that is copying data from a column that is
I have a SSIS 2005 package that needs to read from an XML file,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.