Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation 1

Status
Not open for further replies.

gsavitha

MIS
Jan 28, 2011
14
0
0
GB
Hi all


I have a set of query and i need to automatate that in regular intervals to avoid manual work.I need to do the below tasks.Any help would be highly appreciated.


1.Need to run automatically and store the query result in particular folder?

2.Need to send an email if there is an error in completing the script.How to Set this mail process in a query?
 
You can use a scheduled job that executes a stored procedure which has a try/catch. The email can then be sent if the query fails.

I see this is your first post. Welcome.

Do you wish to do this all in T-SQL or could you use a front end such as .NET?

What SQL Server version are you using?



djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
 
Thanks for ur greeting and for ur reply Djj.

Yes, i want to do this in T-SQL.I am using SQL Server 2008 R2.

and i want to store the result in particular folder.So how to set 'dynamic generate file name' for the result.Thanks in advance..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top