Could not bulk insert...Operating system error code 53

Beethoven
12-01-2004, 06:19 AM
Hello to everyone,

Please help me with this problem. I am trying to get some experience with the BULK INSERT of SQL Server, but I am facing this problem.
I write this line

bulk insert dbtemp.dbo.tblTest FROM 'c:\ForTest\Test2.txt'

and I am getting the following error message

Server: Msg 4861, Level 16, State 1, Line 1
Could not bulk insert because file 'c:\ForTest\Test2.txt' could not be opened. Operating system error code 53(error not found).



If anyone knows please inform me.
Thank you in advance,

Beethoven.

00100b
12-01-2004, 06:26 AM
Is the file that you are trying to import located on the same box that SQL Server is running on?

Error 53 (ERROR_BAD_NETPATH) "The network path was not found"

Beethoven
12-01-2004, 06:40 AM
Is the file that you are trying to import located on the same box that SQL Server is running on?

Error 53 (ERROR_BAD_NETPATH) "The network path was not found"
If you mean, the text file is located on the same computer, the answer is no. The SQL Server's computer is a different computer form mine. I am trying to insert a text file from my PC into the SQL Server.
I hope you understood me!
Thank you.

00100b
12-01-2004, 06:48 AM
That is the issue. The bulk insert is actually being executed on the computer running SQL Server and you are specifying a path and filename that does not exist on its C-drive.

The file will have to be placed in a network share (drive mapping) that the server has access to. Either set the location up on your computer as a share and give the server access to it, specifying the UNC path in the bulk insert statement or place them on a different network share that the server has access to, using either the UNC path for that location or actually mapping a drive on the server and specifying that path.

Beethoven
12-01-2004, 07:18 AM
That is the issue. The bulk insert is actually being executed on the computer running SQL Server and you are specifying a path and filename that does not exist on its C-drive.

The file will have to be placed in a network share (drive mapping) that the server has access to. Either set the location up on your computer as a share and give the server access to it, specifying the UNC path in the bulk insert statement or place them on a different network share that the server has access to, using either the UNC path for that location or actually mapping a drive on the server and specifying that path.

OK. I did all that you've told me but nothing happend. I am getting the same error.
Now, the line is like this

bulk insert dbTemp.dbo.tblTest from '\\pclan632\ForShare\Test2.txt'

00100b
12-01-2004, 08:08 AM
First, have you verified that the server can actually see and connect to the share?

Second, although I would expect a different error but... How is the file structured? What delimiter is used? You may need to include additional parameters within the WITH block of the BULK INSERT statement. Again though, I would expect a different error if this was the case.

Beethoven
12-01-2004, 08:38 AM
First, have you verified that the server can actually see and connect to the share?

Second, although I would expect a different error but... How is the file structured? What delimiter is used? You may need to include additional parameters within the WITH block of the BULK INSERT statement. Again though, I would expect a different error if this was the case.
Of course int hte second case you describe me, we have to expect a different error message. I'll check out if the Server can "see" my share directory....
thank's anyway!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum