title: How to dump data from MSSQL to XML with SQL Agent?
body: <p><strong>I need to export data with SQL procedure from MSSQL (2012) to XML and run the script periodically with SQL Server Agent.</strong></p>
  
  <p>I would like to do it directly from SQL Server, because now I am doing it with console application which is generating XML structure from raw data from SQL and it takes over 10 hours! An output XML now has 300M.</p>
  
  <p>Does somebody now how to do it? I already have stored procedure generating XML output.</p>