20192019. 7. 1. 15:08

Azure SQL Database로부터 스케줄된 작업을 수행하는 방법으로 Logic Apps 의 SQL Server connector 를 사용하는 방법을 소개합니다.

정해진 시간 특정 Stored procedue 를 실행하고 수행 결과를 메일로 혹은 첨부 파일 포함하여 받도록 구성할 수 있습니다. 이 작업이 사용되는 단계는 아래와 같습니다.

Recurrence - Execute Stored Procedure - Create CSV table - Send an email

Recurrence : 반복 작업을 수행할 주기/시점 설정
Execute Stored Procedure : 저장 프로시저 명시
Create CSV table : 저장 프로시저 결과셋을 테이블로 반환
Send an email : 결과셋을 메일 본문 혹은 첨부 파일로 전송 (attachment 파일 옵션 선택)


위 캡쳐는 매주 평일 6, 12, 18시 하루 3회 Azure SQL DB 의 usp_perf 프로시저를 실행하고 그 결과를 Outlook 커넥터를 통해 이메일로 전달하는 로직을 구현한 캡쳐의 일부입니다. 자세한 사항은 아래 참고자료가 도움이 될 것입니다.


[참고자료]

Azure: Daily Reports using Logic Apps
https://social.technet.microsoft.com/wiki/contents/articles/52031.azure-daily-reports-using-logic-apps.aspx

Connect to SQL Server or Azure SQL Database from Azure Logic Apps
https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-sqlazure


작성자: Lai Go / 작성일자: 2019.07.01

Posted by Lai Go