SQL Server Performance

How to run multiple scripts as one job

Discussion in 'SQL Server 2008 General DBA Questions' started by MurraySobol, Jan 10, 2011.

  1. MurraySobol New Member

    I have a series of 100 scripts I need to run on a database.
    Is there a method that I can use to run all of these scripts as ONE massive script??
  2. satya Moderator

    Welcome to the forums.
    Yes you can create all those scripts into 100 stored procedurs and call each of them in a new job.
    But how are you going to restrict or handle the error issues with the script generation.
    BTW what kind of scripts you are running?
  3. MurraySobol New Member

    I'm not concerned with error handling; each of the scripts has been individually tested and runs without errors.
    The scripts are necessary to correct a series of Invoices that were incorrectly exported (via XML)to Microsoft Dynamics (aka Great Plains) software. An error in our application software caused this problem and has been corrected.
    Your suggestion to create 100 Stored Procedures doesn't seem to buy me anything; isn't runing 100 Stored Procedures the same as running 100 script files??
  4. satya Moderator

    Well the idea of selling stored procedure is nothing but the sequential execution of the process, if you are not concerned then you can based on the task you can simply include 10 statements in 1 Stored proc to execute and call 10 of them in a job. It is just for manageability of the process.
  5. Luis Martin Moderator

    Those scripts run sequentially?

Share This Page