I am hitting my head against the wall trying to solve this mystery.
I have a Windows 10 server that houses all my automated jobs. I need to ensure they all run when the server is not up. I have no problem with jobs created from any databases in the company (we have them all ;)) but MSSQL. And there is the problem. When I create an automated job with a simplest query "Select * from client" with file attached and email, I have no problem this job to be processed - file created, email with attachment sent.
then comes big HOWEVER. When I replace the script with more complicated one or create a new job - file create and email sent - I get an error message "object reference not set to an instance of an object ". The file is getting created. But it can't attach itself to the email.
I cannot understand why this is happening when I "drop" more complicated query in the same .tas as simple one that worked.
Any assistance is greatly appreciated. I have to make this work as this server is getting updates without my knowledge and I need to ensure that jobs run when it is not logged it.
thank you all! Stay safe!