Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Exporting results of query from SQL server

$
0
0

I am trying to find a way to automatize SQL query. I tested the query and it works fine so I want now to set it up as a job on SQL server. What is the best way to email result of query via automatic process from SQL server. I can set up query as stored procedure and than set up a job on schedule but how would I email the result of query to someone? I was able to find this stored  procedure sp_send_dbmail but from online reading I found that opening this ability is opening SQL server to security attacks.

Can anyone suggest other options or what would common practice be in functionality that I need to implement which is export result of query once a day to email recipient.

Thanks


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>