breakfast availability in Japan? We then grant it any permissions any needs to network resources by going to this machines and granting the permission.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my I noticed the files were piling up and BCP wasn't picking them up so I tested in Management Studio using the following: DECLARE @sql VARCHAR(MAX) DECLARE @path VARCHAR(512) = 'C:\BCPFiles\' --Use Does the above example work in your environment. –CRAFTY DBA Sep 4 '13 at 19:51 Couple more suggestionss: 1 - change the name of the file. http://stackoverflow.com/questions/18619061/unable-to-open-bcp-host-data-file
Conditional permutation of combining multiple lists What difficulty would the Roman Empire have besieging a fantasy kingdom's 49m wall? So this is why you are experiencing issues with one way and not the other.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog Topic Reply Texas, USA speed ticket as a European citizen, already left the country How to create Picture Library on office365 sharepoint using powershell? You cannot edit other posts.
I run my server with a domain login for the service account,to which appropiate network rights are granted.Check and see if that is your problem.RLF Marked as answer by Nai-dong Jin The BCP statement is all on one line and the SQL Server Agent is running as Local System. Either change the PATH variable of hard code it. Unable To Open Bcp Host Data File Network Share I must be careful here because I don't know what I am doing with these accounts.
The file is already opened by something else. (In addition to the data file, if you are using a format file it could cause the problem if opened by another program.)RLF You cannot delete your own topics. The other server that this is running on successfully automatically cascades permissions to files in the folder. http://dba.stackexchange.com/questions/128855/unable-to-open-bcp-host-data-file-using-xp-cmdshell-from-ssms-but-command-line I exported the table data to a file as .dat but when I try to import the file to a new table, I am getting the below error.
it is a network drive. Unable To Open Bcp Host Data-file Import Meaning of '2> >(command)' Redirection in Bash Do only black holes emit gravitational waves? Al least this worked for me. Right now I can go into SSMS and connect to any of them including localhost and the others.
Also, make sure the account has the ability to execute the xp_cmdshell stored procedure. check my blog You cannot delete other topics. Browse other questions tagged sql sql-server bcp or ask your own question. Can you connect to it with other sql tools? Bcp Error File Example
Come on over! Worked, and saved me a lot of research time. It is either a permission or command issue. this content Write back with your progress ...
A proxy account used by SQL Agent?Likely problems:1. Bcp Enter The File Storage Type If the co-signer on my car loan dies, can the family take the car from me like they're threatening to? Join them; it only takes a minute: Sign up Unable to open BCP host data-file up vote 9 down vote favorite 3 Below is an example of the BCP Statement.
You cannot post EmotIcons. You cannot vote within polls. You cannot send private messages. Error = [microsoft][sql Server Native Client 11.0]unable To Resolve Column Level Collations Should I check that one?
So I guess the problem occurred due to file name exceeding. Submited by Meiki67 on, 2013-11-12 15:57:46 Thanks mate - you gave me the solution : bcp accpts for input only extension DAT ! In my case it was access permissions to the folder containing the dat files that was failing. have a peek at these guys Not the answer you're looking for?
I ran exec master..xp_fixeddrives C,45589 E,423686 I've tried output to C and E with the same result EXEC xp_cmdshell 'bcp "Select FILENAME, POLICYNUMBER, INSURED_DRAWER_100, POLICY_INFORMATION, DOCUMENTTYPE, DOCUMENTDATE, POLICYYEAR FROM data.dbo.max" queryout You cannot edit your own events. My localhost version (SQLEXPRESS), I installed myself and as said, it has been working already, except for this problem in my OP. As far as I know, I am not logging in as SA - I just log into my workstation with Windows.
thus the file was not found. Submited by Jon on, 2012-03-22 00:46:53 adding a folder off of the root worked for me. sorry if something is not clear, but I am Brazilian and I'm not very good on english Submited by Jay on, 2012-12-03 16:59:24 thanks Submited by Sadiq on, 2012-07-19 12:02:35 Gr8 This gives me access to the network and several SQL Servers to which I have created linked servers from my Localhost SQL Server. (That is another issue altogether) These linked servers