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»»»

BCP error -Unable to open BCP host data-file Expand / Collapse
Author
Message
Posted Tuesday, November 15, 2005 9:19 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, March 20, 2007 12:08 PM
Points: 146, Visits: 1

SQLState = S1000, NativeError = 0

Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file

NULL

 

I am getitng the above error when i am executinf BCP. The file location is not on the local machine. it is a network drive. Please help !

Post #237238
Posted Tuesday, November 15, 2005 11:06 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, October 2, 2013 9:26 AM
Points: 265, Visits: 185
You can map the network drive first and then use that mapped drive to do it.
Post #237286
Posted Wednesday, November 16, 2005 6:12 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, January 9, 2014 3:33 AM
Points: 1,559, Visits: 672

Whenever I get this message, it's because of one of three things:

1) The path/filename is incorrect (check your typing / spelling)

2) The file does not exist. (make sure the file is where you expect it to be)

3) The file is already open by some other app. (close the other app to release the file)

For 1) and 2) - remember that paths are relative to where bcp is executing. Make sure that bcp.exe can access the file/path from it's context.

/Kenneth




Post #237493
Posted Wednesday, November 16, 2005 1:00 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 1:33 PM
Points: 3,156, Visits: 2,234
Also, if there are spaces in the name don't forget the double quotes ... like "C:\Program Files" ... If you're executing from xp_cmdshell you might try a DIR command in xp_cmdshel to check things out security-wise. I'd also stay away from mapped drives since SQL Server is only made aware of them each time the service is started - UNCs are the way to go.



Regards
Rudy Komacsar
Senior Database Administrator

"Ave Caesar! - Morituri te salutamus."
Post #237634
Posted Wednesday, November 16, 2005 1:06 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, March 20, 2007 12:08 PM
Points: 146, Visits: 1
Thanks All for you reply. This issue was resloved. i was trying to BCP out on a logical drive which  was mapped correctly. but then my network admin told me that sql server could not access the network drive due to some permission issues.
Post #237636
Posted Friday, April 27, 2007 8:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, August 2, 2007 6:55 AM
Points: 1, Visits: 1

i got this error while running a bcp command from the xp_cmdshell

 

if i run the bcp separately on the dos prompt, it runs fine

 

Anyone knows the info to correct this problem?  Thanks

Post #361556
Posted Friday, April 27, 2007 9:14 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 1:33 PM
Points: 3,156, Visits: 2,234
the actual error never made it into the post.



Regards
Rudy Komacsar
Senior Database Administrator

"Ave Caesar! - Morituri te salutamus."
Post #361581
Posted Friday, April 27, 2007 5:01 PM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: 2 days ago @ 12:22 AM
Points: 4,570, Visits: 8,332
Check permissions for the account running SQL Server Agent.
It could be not the same as for SQL Server.
Post #361724
Posted Tuesday, May 8, 2007 11:26 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 10, 2009 6:08 AM
Points: 6, Visits: 6

Hi,

I am getting the same problem in the following scenario

I have created one table "T1" using filegroup "A" contains only data file "A_1.ndf" with size 100M and disaled autogrowth. This file group size reaches 100M means its 100% full. Now I am trying to archive this "T1" table data using bcp command as follows:

bcp T1 out D:\Archive -S <Server_Name> -U <username> -P <pwd> -b 10000 -c -t |;

it throws the below error:

"SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file"

While executing bcp command, does it requires some space in filegroup "A"?

Can any body help how to resolve this?

--Thanks Sankar

 

 

 

Post #364272
Posted Tuesday, May 8, 2007 11:48 PM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: 2 days ago @ 12:22 AM
Points: 4,570, Visits: 8,332
Run

exec master..xp_fixeddrives

What is the result?
Post #364277
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse