How to use script in script Library

  • Could anyone please explain how I can use script in script Library.  Can I use Query Analyzer to run or need to write program?  

  • You can paste SQL scripts into QA and run them there.  Is that what you're asking ?

  • Thanks homebrew01, that's my asking.

    BTW, for script that's need to do scheduling.  How we can store script in Server and schedule it to execute.

  • You can create a SQL job to be scheduled, then either paste the script into a job step, or build a stored procedure from your script, and execute the stored procedure from your job step. To create a job, use Enterprise Manager -> Management -> SQL ServerAgent -> Jobs.

    Then add the step, and schedule it from the Schedules tab. You can also use netsend or EMail to notify you if it fails, or succeeds

  • Thanks. 

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply