Sample Header Ad - 728x90

Unable to open BCP host data-file with AzureDB

0 votes
0 answers
654 views
I'm trying to load a simple file with a single column from my local machine into my database which is located on Azure. Both file and folder are set with read/write permissions to EVERYONE but it still fails. Im running the following command: bcp dbo.table in "C:\test_file.txt" -U"User" -P"Password" -S"tcp:AzureDB.database.windows.net" -d"database_db" -e"error.log" Which results in the following error: SQLState = S1000, NativeError = 0 Error = [Microsoft][ODBC Driver 11 for SQL Server]Unable to open BCP host data-file Since this service is running on a external network, I'm unable to give Azure permissions on this folder. Is there anything else I can do? EDIT: Following @Tibor Karaszi tips, I ran the DIR command and turns out AzureDB was reading "test_file.txt" as "test_file.txt.txt". I tried a different file format and it worked out just fine.
Asked by Wesley Costa (1 rep)
Sep 30, 2021, 08:43 PM
Last activity: Oct 8, 2021, 06:19 PM