troubleshooting Question

Cannot bulk load because the file could not be opened

Avatar of trojan_uk
trojan_uk asked on
VB ScriptMicrosoft SQL Server 2005
8 Comments1 Solution2501 ViewsLast Modified:
Hi,

I have two SQL2005 servers, one for delevopment the other live, when I try to bulk upload using the development server with the following code, it works fine:

DECLARE @sql VARCHAR(8000)
SET @sql =
'BULK
INSERT CONTACTTEMP
        FROM ''\\hugo\wwwroot\damovo_demo\contacts\2100\contacts.csv''
            WITH  (FORMATFILE = ''C:\contacts.fmt'')'
EXEC (@sql)

However when I try to run the same code on the live server I get

Cannot bulk load because the file "\\hugo\wwwroot\damovo_demo\contacts\2100\contacts.csv" could not be opened. Operating system error code 1326(error not found)

I looked up this error and it suggests a login problem, but what I don't understand is that both servers access the remote machine and file in the same way, why does the live server have an issue?

Thanks for any help in advance

edit: sorry noticed I added to wrong section (VBscript)
ASKER CERTIFIED SOLUTION
JestersGrind

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros