Is there a tool to automate running a process on every database every day

SQL_DudeSQL_Dude Posts: 11 Bronze 1
edited June 13, 2023 1:15PM in SQL Multi Script
We have tried to set up a job that uses sp_MSForeachDB to run the same stored procedure on every database in our system but we run into issues with permissions or SQL statement being truncated.  When we run the same job using MultiScript it works perfectly but do not want to have to manually execute that process every day.  Is there a RedGate tool that can be used to automate a job like that?
Tagged:

Answers

  • Hi, 

    Thanks for your post. 

    The problem is that SQL Multi-script does not have an API or Command Line interface and we don't currently have another tool that could make this possible.
     
    A SQL Monitor custom metric maybe a better solution for you. If you'd like to investigate other options then raise a support ticket with support@red-gate.com 
     
    You might be able to rig up something to meet your needs using the windows scheduler and the sqlcmd command line utility See, http://msdn.microsoft.com/en-us/library/ms170207.aspx. But this isn't something that we could support you with. 
     
    Kind regards

    Robyn Edwards | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.