Is there any script to execute all stored procedures in a database at a time?

Posted on 2011-10-18
Last Modified: 2013-11-11
Is there any script to execute all stored procedures in a database at a time?
Question by:himabindu_nvn
    LVL 76

    Accepted Solution

    No.  You need to write a script/procedure to execute them in the order you want and parameters you need.
    LVL 34

    Expert Comment


    And, even if this would be possible, what kind of business problem would this solve?
    LVL 73

    Expert Comment

    no,  how could there be?  what would be the parameters for them?  you'd need to generate them and in valid combinations.

    LVL 6

    Expert Comment

    What is the reason behind this requirment ?
    LVL 73

    Expert Comment

    when you say "all stored procedures"

    I'm going to guess you don't really mean "all",  
    but rather "a known set, possibly large, all contained within a single schema having no parameters or identical parameters"

    in this case, the answer is still "no",  but you could create a master procedure that invoked them.

    for instance, if you have an installation requiring many procedures to be run, they could all be invoked from one.

    or some batch process that invokes by a constant Date, or ID.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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

    Suggested Solutions

    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
    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.

    760 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

    9 Experts available now in Live!

    Get 1:1 Help Now