anthonydresser / testissues

0 stars 0 forks source link

SQL Agent with single step set to go to the next step and wont change - Multiple issues #295

Open adsbot[bot] opened 5 years ago

adsbot[bot] commented 5 years ago

Version: 1.5.1-insider (user setup) Commit: 31614247cf341abc9194080d0ab7eb720257fb06 Date: 2019-03-13T21:24:09.603Z VS Code 1.30.1 Electron: 2.0.12 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 OS: Windows_NT x64 6.1.7601

There was several bugs found when trying to create a job ( didnt know if should have raised seperate tickets)

Steps to Reproduce:

  1. Create a new SQL Agent Job - Click + New Job image 2 Add new step add details and click OK image

[Note can't use the Run As box will not select anything] 3 Click ok image

4 I realised at this point I should have gone into and edited the job to step to complete. Filter the job and Edit job

5 I noticed recreating these steps another issue has occurred, going back into edit the job it shows as there are 0 steps

image

Management studio disagrees image

6 Click on Edit Job the job owner i set as SA is showing as my AD account (obfuscated to remove company details)

image

however as you can see management studio shows correctly

image

7 I delete the job through management studio, refresh and it is no longer there. I go back in Azure Data studio and hit refresh and it still shows the job. I redo the filter to "test job" and it still appears. I can click on it and it allows me to edit it, however it wont let me save it.

Microsoft.SqlServer.Management.Smo.FailedOperationException: Attempt to retrieve data for object failed for Server 'FCL-SQL-VC200A'. ---> Microsoft.SqlServer.Management.Smo.MissingObjectException: The Job 'Test Job' does not exist on the server. at Microsoft.SqlServer.Management.Smo.Server.GetSmoObjectRec(Urn urn) at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn) --- End of inner exception stack trace --- at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn) at Microsoft.SqlTools.ServiceLayer.Agent.JobData.get_Job() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Agent\Jobs\JobData.cs:line 688 at Microsoft.SqlTools.ServiceLayer.Agent.JobData.CheckAndLoadGeneralData() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Agent\Jobs\JobData.cs:line 762 at Microsoft.SqlTools.ServiceLayer.Agent.JobData..ctor(CDataContainer data, AgentJobInfo jobInfo, ConfigAction configAction) in D:\a\1\s\src\Microsoft.SqlTools.Service...

I try and recreate the job and the same thing occurs.

My original issue was I was unable to change the job step to quite the job reporting success as each time I did it did not save the change.

adstestbot[bot] commented 5 years ago

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: