Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Automate SQL Query File

Avatar of serg2626
serg2626 asked on
Microsoft SQL Server 2005
3 Comments1 Solution249 ViewsLast Modified:
I have an SQL 2005 Server and have a query which truncates my log files that I run manually whenever they get large in size. I would like to be able to save that query to a .sql file and have task scheduler run it every month or week on its own. How can I configure it so that I can use task scheduler to point to the .sql file and automatically run the query at a given date and time? I'm not sure how to get it to authenticate using a specific username and password etc. Please provide step by step instructions on doing this.

Thank you!