ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

SQLCMD not working when launched in DUAS

book

Article ID: 103777

calendar_today

Updated On:

Products

CA Automic Dollar Universe

Issue/Introduction

When trying to execute a SQLCMD command line via Dollar Universe from an internal script (CL_INT) it doesn't generate a log file.

Examples:
SQLCMD.EXE -S <server-name> -E -o <log_file> -d master -h -1 -Q "<sql_query>" 
SQLCMD.EXE -S <server-name> -E -d master -h -1 -Q "<sql_query>" > -o <log_file>

The queries do generate a log when executed from the Windows command line

Environment

Windows

Resolution

The solution is to add the SQL login credentials, options -U <user> and -P <password>