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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 bcp error

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 database

in 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 Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

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
Go to Top of Page

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.
Go to Top of Page

putane.sanjay
Yak Posting Veteran

77 Posts

Posted - 2007-01-04 : 05:28:04
thorugh the command prompt & successfully fetched the data

Thank u
Go to Top of Page

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.
Go to Top of Page
   

- Advertisement -