automatic stored procedure?

Posted on 2006-04-04
Last Modified: 2008-01-09
I am writing a SP that is being executed daily or weekly. Just want to get some starting points. If you have any suggestions or samples, please let me know.
Question by:khinklenj
    LVL 6

    Assisted Solution

    use a sql Agent job to schedule the execution of your SP
    LVL 34

    Accepted Solution

    Sounds great...what are you asking?  How to schedule it to run on a recurring basis?

    Management -> SQL Server Agent -> Jobs
    Create a new job either placing the stored procedure code in a new step or just execute the stored procedure, set the schedule, you're done.

    Author Comment

    I have sql server 200- developer edition. Do you think i can do this from my sql server client?
    LVL 34

    Expert Comment

    by:Brian Crowe
    you can do it from enterprise manager.
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    One more option :

    create a DOS batch file say 'schedule.bat' containing the following Query

    osql -E  -H-1 -Q "select *exec urSpName urArgs"

    You can shcedule this batch file to run using Windows Task Scheduler

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    734 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

    25 Experts available now in Live!

    Get 1:1 Help Now