when running the perl RefreashAEDB script it fails with error slqcmd can not be found
search cancel

when running the perl RefreashAEDB script it fails with error slqcmd can not be found

book

Article ID: 383822

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

when trying to update the schema for the Autosys database and using the Perl RefreashAEDB.pl script the following error is being seen.

The file is on the system and in the system path

Environment

Windows 2019
Autosys 12.x

Cause

The sqlcmd that was installed is the new GO version that is not supported.

Resolution

The RefreshAEDB.pl script run the below command
sqlcmd -?

The script is looking for the following type output.

Microsoft (R) SQL Server Command Line Tool
Version 16.0.1000.6 NT
Copyright (C) 2022 Microsoft Corporation. All rights reserved.

usage: Sqlcmd            [-U login id]          [-P password]
  [-S server]            [-H hostname]          [-E trusted connection]
  [-N Encrypt Connection][-C Trust Server Certificate]
  [-d use database name] [-l login timeout]     [-t query timeout]
  [-h headers]           [-s colseparator]      [-w screen width]
  [-a packetsize]        [-e echo input]        [-I Enable Quoted Identifiers]
  [-c cmdend]            [-L[c] list servers[clean output]]
  [-q "cmdline query"]   [-Q "cmdline query" and exit]
  [-m errorlevel]        [-V severitylevel]     [-W remove trailing spaces]
  [-u unicode output]    [-r[0|1] msgs to stderr]
  [-i inputfile]         [-o outputfile]        [-z new password]
  [-f <codepage> | i:<codepage>[,o:<codepage>]] [-Z new password and exit]
  [-k[1|2] remove[replace] control characters]
  [-y variable length type display width]
  [-Y fixed length type display width]
  [-p[1] print statistics[colon format]]
  [-R use client regional setting]
  [-K application intent]
  [-M multisubnet failover]
  [-b On error batch abort]
  [-v var = "value"...]  [-A dedicated admin connection]
  [-X[1] disable commands, startup script, environment variables [and exit]]
  [-x disable variable substitution]
  [-j Print raw error messages]
  [-g enable column encryption]
  [-G use Azure Active Directory for authentication]
  [-? show syntax summary]

The sqlcmd GO version as the following output when running the same command.

This causes the RefreshAEDB to fail and generate the error.

To correct this install the sqlcmd that comes with the SSMS tools
The location for the sqlcmd should be something such as C:\Program Files\Microsoft SQL Server\<version>\Tools\Binn

The below download has the correct type.
https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16