You need to install the 32 bit sql client utilities on scheduler machine.
Autosys can only use a 32-bit client. If you have the 64-bit client you need to uninstall it and then install the 32-bit client.
Information regarding the 32-bit client install can be found at: https://support.ca.com/cadocs/7/CA%20Workload%20Automation%20AE%20Release%2011%203%206%20-%20Customer%20Access%20Only-ENU/Bookshelf_Files/PDF/WA_AE_Impl_WIN_ENU.pdf
Need prereq - For Microsoft SQL Server, you must install the Microsoft SQL Server client utilities on
each scheduler and application server computer. Then, you must make sure that there is
database connectivity between the event server, scheduler, and application server
computers. When you install CA Workload Automation AE, you must indicate the
appropriate event server information, including the event server name (Microsoft SQL
Server name) and database name.
In addition, you must meet Microsoft SQL Server security requirements for CA Workload
Automation AE database users.
Note: For CA Workload Automation AE to support Microsoft SQL Server, mixed mode
authentication must be enabled.
Make sure the MSSQL bin path is in System PATH so that osql can be found.
Can you confirm the location of the file osql.exe on the scheduler
Is this location in your path?
Computer > Properties > Advanced > Environment Variables. Double click on the PATH system variable in the bottom window.
Have tried to restart your machine, possible a simple restart may fix it.
Can run regedit and search for osql.exe and confirm its pointing to the correct location?
Its possible that the actual file path to osql.exe may have changed, its incorrect former location is still recorded in the Windows registry. When Windows tries looking up these incorrect file references (file locations on your PC), OSQL.EXE errors can occur. These invalid EXE registry entries need to be repaired to fix the root of the problem.