Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I can't use sql server agent to create jobs.
i am using SSMS 2008R2 and visual studio 2010.
kindly suggest some ways to implement my query. Can i achieve it using windows services
Posted
Updated 8-Jul-15 20:52pm
v2

You could use Windows Service. A different approach would be by using PowerShell scripts. These scripts can be executed periodically very easily by firing up scheduled jobs for windows (maintenance tasks).
You're able to connect to the database, execute the sproc, retrieve the result. Convert it via script. Use Excel Interop Assemblies probably to convert it directly to XLS (or use pipe out to generate proper CSV files).

Use another script to grab the new output files (check or keep log if file already has been handled in the past) which is started by Windows scheduled job (execute .ps script) and send mail via intranets SMTP (or use SqlMail).

Nice task indeed.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900