February 7, 2023 at 12:21 pm
Hi experts,
Seeking your help.
I am using a bcp command in a tool called IBM Datastage for Windows with SQL Server 2008 R2 which is working fine many years.
bcp [DBO].[VW_EDW_7777_1] out filepath_7777_1.txt -S server,1534 -U username -P *** -d db_name -c -t , -b 10000
The same command is giving error in when I use it in IBM Datastage 11x for Redhad Linux with SQL Server 2017 in AWS and the file path is Fsx.
Starting copy...
SQL State = 1000 Native error =0 SQL Server
Error=[Microsoft][ODBC Driver 17 for SQL Server]Warning:BCP import with a format file will convert empty string in delimited columns to NULL
When I remove the comma from the "-t" the command is working fine. Need to specify the comma in a quote or any other form?
Seeking your help and advice.
Thanks in advance.
Sura
February 7, 2023 at 1:21 pm
tried with -t ',' as well, but same error
February 7, 2023 at 2:16 pm
did you also try using double quotes ? "," ( it's command line, not tsql)
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
February 7, 2023 at 2:57 pm
does SQL server account has access to the path, where the file reside?
February 7, 2023 at 4:49 pm
Of much larger concern, why on this good Green Earth would you even consider writing a command, any command, that has a user name and password in clear text? You seriously need to learn about how to properly use "Trusted Connections".
--Jeff Moden
Change is inevitable... Change for the better is not.
February 7, 2023 at 11:18 pm
Thanks for your reply. Yes, tried both ',' as well as ",". Getting same error.
February 7, 2023 at 11:20 pm
Thanks for the reply. Yes, the same command works well without comma.
February 7, 2023 at 11:21 pm
Thanks, Jeff, for your reply. The value will pass as a parameter, but the password will register as a **** in the log.
February 7, 2023 at 11:48 pm
Thanks, Jeff, for your reply. The value will pass as a parameter, but the password will register as a **** in the log.
You don't understand that it's not the log I'm worried about. Why not do it right so that there's no chance of someone sniffing your wire to get it and so you don't read about yourself or the company your doing this for on the latest "who got hacked" lists?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 8, 2023 at 4:00 am
Thanks, Jeff, for your reply and I am happy that you are paying more attention in security matters. Yes, this command is being embedded in a toll, contains security measures. I any case I will advise my security team to look into this.
Thanks
February 8, 2023 at 4:06 am
Thanks, Jeff, for your reply and I am happy that you are paying more attention in security matters. Yes, this command is being embedded in a toll, contains security measures. I any case I will advise my security team to look into this.
Thanks
Thanks for the feedback. And, yeah... it's pretty easy to avoid doing this with a "Service Login" from Active Directory and then using the "Trusted Connection" feature of BCP.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 8, 2023 at 4:43 am
Thanks all.
one more interesting findings. If I take out the value for the switch -t it’s working fine. If I give any value to -t getting the error
February 8, 2023 at 4:49 am
One more question. Do we need to consider any patching hence the BCP is running in the Red hat Linux ?
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply