Write a query that uses subqueries in the column projection list. You can query on any of the custom fields youve defined on the Channel. All the queries should be run when connected to the HR schema. Read the whole thing, as Rob has some detailed code examples. In this exercise, you will write code that demonstrates the places where subqueries can be used. This turned out especially useful as the job finished earlier than expected at 3am and the off-shore team could begin their work immediately. The use case was for some migration projects that had steps that were scheduled via SQL Agent Jobs and instead of the DBA having to estimate when they would finish and keep checking so that they could let the next team know that it was time for their part to start, they wanted it to notify a Teams channel. The following code shows how to create a channel listener and get an IInputChannel to receive data-changed messages from the adapter. Maybe it would be good to be able to get the job runs results every 12 hours so that at 6am in the morning the early-bird DBA can quickly identify if there are any failures that need immediate action and at 6pm, the team can check that everything was ok before they clock off.įollowing on from yesterdays post about creating an overview of SQL Agent Job Results and sending it to a Teams channel, I was given another challengeĬan you write a job step that I can add to SQL Agent jobs that can send the result of that job to a Teams Channel ![]() Using dbatools we can create a simple script to gather the results of Agent Jobs form a list of instances. First up, sending SQL Agent results to a Teams channel: ![]() Rob Sewell is waiting for a message and it comes in two parts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |