Can't Perform Bulk Copy, MSSQL 2008.

已答复 Can't Perform Bulk Copy, MSSQL 2008.

  • Thursday, February 21, 2013 1:54 PM
     
     

    I TRIED TO PERFORM A BULK COPY BUT HAVING SOME PROBLEMS

    ERROR: Cannot bulk load because the file "\\SRV-NAME\FOLDER1\FOLDER2\FOLDER3\EX20130221123251.txt" could not be opened. Operating system error code 5(Access is denied.).

    PERFORMING THE SAME BULK COPY WHEN I MOVE THE FILE TO 'c:\\EX20130221123251.txt' DIRECTORY IT WORKS FINE.

    NB: FOLDER1 IS A SHARE FOLDER FROM THE SERVER THAT I TRY TO ACCESS FROM MY SQLSERVER INSTALL ON MY PC.

    HELP..


All Replies

  • Thursday, February 21, 2013 5:31 PM
     
     Proposed Answer
    As error message says,do you have access to the share path?

    Thanks, Sohail ~Please mark answered if your question is completely answered; vote it as helpful to help others find a solution quicker. This posting is provided AS IS with no warranties.

  • Friday, February 22, 2013 8:25 AM
     
     Answered

    First try to understand how security flow in sql server works

    Though this is meant for how security flows in SQL Server agent, when TSQL scripts are running directly from SSMS, the same rules apply.

    http://sqlblog.com/blogs/tibor_karaszi/archive/2009/09/19/sql-server-agent-jobs-and-user-contexts.aspx

  • Sunday, February 24, 2013 1:44 AM
    Moderator
     
     Answered

    When you say BULK COPY, do you mean the T-SQL BULK INSERT statement?  In that case, ensure the SQL Server service account has permissions to both the share and underlying folders/files.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com