I have a stored procedure which runs as a scheduled job on SQL Server 2008, and I am trying to migrate this to SQL Server 2014.
The procedure generates html and populates the html with values from a local db. The scheduled job runs this proc and saves the html file.
osql -U sa -P mypassword -Q "report.dbo.sp_mysp" -o c:\temp\web\myfile.html
The stored procedure runs fine on SQL Server 2014 in SSMS, and I see a print with html markup and values from the db.
My problem is that when I schedule the job using the OSQL command as above, the html file is generated and saved OK, but is missing the values from the db.
Is anyone aware of any changes in osql that could be the issue, or new restrictions on the sa user?