How to Automate SQL Query

Posted on 2012-09-06
Last Modified: 2012-09-08
Need help with setting up a scheduled SQL query to run automatically several times a day.
Microsoft SQL Server Management Studio      10.50.1617.0
Microsoft Data Access Components (MDAC)      6.1.7601.17514
Microsoft MSXML      3.0 6.0
Microsoft Internet Explorer 9.0.8112.16421
Microsoft .NET Framework 2.0.50727.5456
Operating System 6.1.7601
SQL Server R2, Running on Windows Server 2008 Foundation
i created the queary and can run it manually from the management studio interface
need to know if and how to setup this up automatically
all help is greatly appreciated
Question by:David Elebute
    LVL 92

    Accepted Solution

    You have two options:

    1) Set it up to run as a relatively simple scheduled SQL Server Agent job; or

    2) If your needs are a little more ambitious, create an SSIS package to run the query and produce properly formatted output, and then use SQL Server Agent to schedule that SSIS package
    LVL 75

    Assisted Solution

    by:Aneesh Retnakaran

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    The problems with reply email signatures

    Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

    Suggested Solutions

    In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
    This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now