![]() ![]() Read the whole thing, as Rob has some detailed code examples. 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. Summary: Everyday, Get a data from SQL Server, and Post the data to Microsoft Teams. 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 , rowsattime) sqlGetResults (channel, as.is FALSE, errors FALSE, max 0, buffsize 1000, nullstring NAcharacter, na. Usage sqlQuery (channel, query, errors TRUE. ![]() Using dbatools we can create a simple script to gather the results of Agent Jobs form a list of instances. Description Submit an SQL query to an ODBC database, and retrieve the results. First up, sending SQL Agent results to a Teams channel: sql file Bash: mysql -u root -p xtreamiptvpro < filename. Rob Sewell is waiting for a message and it comes in two parts. Download with WinSCP the Backup File from /root Folder to your local PC Importing the DB Dump in to the new DB As. ![]()
0 Comments
Leave a Reply. |