Does uploading a 1MB file into SQL 2005 locks the table?

Posted on 2007-08-11
Last Modified: 2013-11-05
Does uploading a 1MB file into SQL 2005 locks the table and block others from uploading to the same table? Does it block queries against that table?
Question by:mattphung
    LVL 32

    Expert Comment

    by:Daniel Wilson
    It should not block other inserts.  Now if your upload is more complicated & does some comparison to what's already there, the could block.

    Depending on the criteria your SELECT uses, it could block while you insert the data.

    Author Comment

    So for example, if I'm uploading an email attachment and another user logs into the email system and trys to download an attachment from the same table by using this statement:

    Select * from Attachment (nolock) where AttachmentId = @Id

    Does the statement above execute without waiting for the upload to complete? Thanks
    LVL 32

    Accepted Solution

    Someone may correct me on this, but I believe you are fine with that WHERE clause UNLESS @ID is the ID of the new record.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
    When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now