Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

cannot bulk load Expand / Collapse
Author
Message
Posted Monday, February 17, 2014 3:08 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 2:53 AM
Points: 26, Visits: 24
Am using bulk insert to load csv file to table. But am failing getting the error
the file does not exist. Anyone can help urgently
Post #1542013
Posted Monday, February 17, 2014 3:10 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 25, 2014 1:01 AM
Points: 1,539, Visits: 8,133
Show us the command you're using so we have something to work with.

BrainDonor
Linkedin
Blog Site
Post #1542014
Posted Monday, February 17, 2014 3:12 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 2:53 AM
Points: 26, Visits: 24
Thanks for replying

bulk insert sample1
from 'D:\BEM_Source\Sample'
with
(
rowterminator = '',
fieldterminator= ','
)
Post #1542015
Posted Monday, February 17, 2014 3:20 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:46 PM
Points: 42,462, Visits: 35,525
Does a file named "Sample" (with no extensions) exist in the folder "D:\BEM_Source\"?
Does the SQL Server service account have permission to that folder?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1542018
Posted Monday, February 17, 2014 3:21 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 25, 2014 1:01 AM
Points: 1,539, Visits: 8,133
mandir.jain (2/17/2014)
Thanks for replying

bulk insert sample1
from 'D:\BEM_Source\Sample'
with
(
rowterminator = '',
fieldterminator= ','
)


So, the obvious thing is - does 'D:\BEM_Source\Sample' exist in that folder and on the server that the command is being run from? If I run a Bulk Insert from my PC but connected to server 'Fred1', the file has to be on 'Fred1'.

If it is in the correct location, can you open the file with a text editor? Just to make sure it isn't corrupt or has attributes/permissions set that make it impossible to open for some strange reason.


BrainDonor
Linkedin
Blog Site
Post #1542019
Posted Monday, February 17, 2014 3:31 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 2:53 AM
Points: 26, Visits: 24
the file is there. I tried with extensions also like sample.csv and all but no luck. I don know whether sa login used is having the permission to read or not, if it doesnot hav ,please explain how to give
Post #1542021
Posted Monday, February 17, 2014 3:32 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 2:53 AM
Points: 26, Visits: 24
the file is there. I tried with extensions also like sample.csv and all but no luck. I don know whether sa login used is having the permission to read or not, if it doesnot hav ,please explain how to give
Post #1542022
Posted Monday, February 17, 2014 3:48 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:46 PM
Points: 42,462, Visits: 35,525
Not asking about the login you are using to SQL Server. Asking about the account that SQL Server runs under.

The file name you're specifying has no extension. Go to that folder on the server and make sure that the file there also has no extension (remember windows hides extensions by default). Don't guess, access that folder on the server and check exactly what the name is.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1542024
Posted Monday, February 17, 2014 4:06 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 2:53 AM
Points: 26, Visits: 24
The sql service is running under Network Service. I tried with extensions also
Post #1542029
Posted Monday, February 17, 2014 4:07 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:46 PM
Points: 42,462, Visits: 35,525
That could be part of the problem.

First, have you logged on to the server and checked exactly what that file's name and extension is?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1542031
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse