Cannot bulk load because the file in "" could not be opened

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ixcrazee
    New Member
    • May 2010
    • 6

    #1

    Cannot bulk load because the file in "" could not be opened

    I have tried to search through the Knowledge Base and seems nothing same as what I am encountering.

    I have a web server which is having Windows 2003 and SQL 2000, while database server is having Windows 2008 and SQL 2005.

    My web application allows user to upload a *.csv file, and it calls a DLL file to write a *.bat file with a BCP statement to BCP this *.csv file into database server. But, we found out it failed at the step that DLL calling (Shell) the *.bat file and it logs the following error message:

    cannot bulk load because the file in "E:\wwwroot\app \vd\appro_BIGXG .cvs" could not be opened. Operating system error code 3(The system cannot find the path specified)

    Any of you have idea on how could this be resolved? What else I should check or what setting I should set? I am not a DBA, so I am not very familiar on SQL Server.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Can your server see the E drive?


    ~~ CK

    Comment

    • ixcrazee
      New Member
      • May 2010
      • 6

      #3
      Hi CK, yes the server can see the E drive. We have tried to paste the following into the Windows > Run, and it does able to bring up correct directory:

      E:\wwwroot\app\ vd

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        It might not be visible inside the SQL Server. Try checking it if you can see it from inside the server. The "E" might be visible on the OS side, but not on the SQL Server side.

        Good Luck!!!

        ~~ CK

        Comment

        • ixcrazee
          New Member
          • May 2010
          • 6

          #5
          Hi CK, do you mean we need to check from the SQL Server that is installed in the web server, and see if the E drive is visible form the SQL server?

          Comment

          • ixcrazee
            New Member
            • May 2010
            • 6

            #6
            I executed the following and it does show the free space of E drive:
            EXEC xp_fixeddrives

            Comment

            • ck9663
              Recognized Expert Specialist
              • Jun 2007
              • 2878

              #7
              Try running a dir on xp_cmdshell "dir E:\wwwroot\app\ vd\appro_BIGXG. cvs" and try to capture the result. See if the file will show up.

              Good Luck!!!

              ~~ CK

              Comment

              • ixcrazee
                New Member
                • May 2010
                • 6

                #8
                Hi CK, Thank You for the reply. Yes, I did try this in the SQL Server 2000 which is installed in the web server,it does able to be executed successfully.

                I have even given the directory Everyone right, it is still failed. Manually execute the *.bat file is able to work, I also tried to create a scheduler task to trigger the *.bat file by using the same right as the Component Services for the DLL, it works too.

                This is weird condition and have no idea what else to check.

                Comment

                Working...