Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
putane.sanjay
Yak Posting Veteran
77 Posts |
Posted - 2007-01-03 : 02:44:50
|
iam fetching data from the input data file to the table to the databasein command prompt error is: microsoft odbc sql server driver is unable to open bcp host data file |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-03 : 02:52:39
|
Where is the data file located? on server machine or network path? If it is on network drive, have you mapped network drive? Does SQL Server have appropriate permissions to access the file?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
putane.sanjay
Yak Posting Veteran
77 Posts |
Posted - 2007-01-03 : 03:04:45
|
yes. it is ihe network & i can acess & it is mapped |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-01-03 : 03:33:43
|
The error is that the fie cannot be opened.How are you running the bcp? From sql server or from a command prompt?Try a dir command on the file.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
putane.sanjay
Yak Posting Veteran
77 Posts |
Posted - 2007-01-04 : 05:28:04
|
thorugh the command prompt & successfully fetched the dataThank u |
 |
|
miranwar
Posting Yak Master
125 Posts |
Posted - 2007-01-04 : 09:42:45
|
THE BCP will run under the context of the SQL SERVER service startup account. To chcek if this is a permissions problem from Query Analyzer run something like this exec master..xpcmdshell "Dir c:\" . obviously you should do the serch on the path where the host file resides. Xp_Cmdshell also runs under the context of the SQL service startup account. So if it is a permissions issue you should get a message Access denied. |
 |
|
|
|
|