[Last Call] Learn how to a build a cloud-first strategyRegister Now


Save and Send xml file automatically from stored procedure

Posted on 2009-02-23
Medium Priority
Last Modified: 2012-05-06

I have a stored procedure which returns xml using FOR XML AUTO, ELEMENTS.
What I need to do now is:
1. schedule a task once a day that will run the stored procedure and save the xml results to an xml file .
2. send the file by email.
How do I do this?

Question by:ggilal
  • 2
LVL 37

Expert Comment

ID: 23709938
you can write a c# stored procedure that perform the above actions
then you can schedule that procedure using a sql server job to run on a daily basis

Author Comment

ID: 23710598
I need more details please.
Any code would be very helpful. Thanks!
LVL 37

Accepted Solution

momi_sabag earned 2000 total points
ID: 23710805

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question