Issue:
We would like to know the scripts that are used when a SQL Job runs. Where can we see this information?
Resolution:
You can view the contents of the SQL Job under SQL Server Agent.
1. Open SQL Server Management Studio.
2. Log into the SQL Server.
3. Expand the SQL Server Agent.
4. Click on Jobs.

5. Right click on the Job from the list and select Properties or double click the Job.

6. Click on Steps.
7. Select the Step that shows the type as Transact-SQL script. Click the edit button at the bottom.

8. You can then see the script being used. You can copy the script into a new query window to edit if needed. It is best to copy the script to a query window and save a backup of the script in case there is a problem with the changes.

9. Once the changes have been made save the changed file as a new file name so there is a backup copy of both scripts.
10. You can now copy and paste the script back into the Step and save the Job.