Command BCP fails when launched via Dollar Universe Uproc - Login failed
search cancel

Command BCP fails when launched via Dollar Universe Uproc - Login failed


Article ID: 226357


Updated On:


CA Automic Dollar Universe


When trying to automate some SQL Server Database commands, such as a BCP command to execute a .SQL file and SQL statements within a Uproc in Dollar Universe, we are getting an error:

C:\Universe\bin>BCP dbo.ONE_LINE_TASK IN "C:\AIOD\Uproc\All_Task.txt" -S XXX -U USERNAME -P PASSWORD -d UNIVERSE  -T -c  -t "\r\n" 
SQLState = 28000, NativeError = 18452
Error = [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.

Launching the same command in the command line window directly from the Server works fine, what could be the reason?


Release : 6.x


OS: Windows:

Third-party: MS SQL Server


Parameter -T should not be used when using the parameters -U  and -P, as Dollar Universe launches the script in batch mode with the user defined in the Submission Account that, by default, will be mapped to LocalSystem and not a Domain User.

Check the extract from the Microsoft doc here

Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user, login_id, and password are not required. If -T is not specified, you need to specify -U and -P to successfully log in.


To fix the issue, it was required to remove the parameter -T from the BCP Uproc Script to allow to launch the command via a Dollar Universe Uproc.

Example of working script:

C:\Universe\bin>BCP dbo.ONE_LINE_TASK IN "C:\AIOD\Uproc\All_Task.txt" -S xxx -U xxx -P xxx ! -d UNIVERSE  -c -t "\r\n"

Starting copy...

224 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total     : 62     Average : (3612.90 rows per sec.)