I have a bunch of TSQL scripts that need to be executed on a daily basis. I know I can use Job Agent to execute them but that requires me to change the actual job.
What I would like to do is create a job that simply says:
execute all TSQL-scripts in <some folder>
A bonus would be if a filter could be used based on the filename of the script: So that one job would execute all the files whose name start with a 'd', another job would execute all those with a 'w' in the name.
Can this be done? How can this be done?
I read some things that spoke of using the Windows-scheduler to run the SQLCMD-utility. I'd rather have the SQL Server do the scheduling and executing. Is Powershell the way to go? If so, where and how to start? (Never had to use it so never gave it much attention :/)
Thanks for thinking with me!
Henro