- Oct 2, 2007
- 2,181
- 1
- 0
What's the best way to do this?
These are the requirements, there are 4 scripts that do database maintenance, I need a script that will run all 4 scripts on each database on the server, then after that is done on 1 DB, it moves along to the next database.. running the 4 scripts on each DB sequentially.
I've looked into built-in SQL maintenance schedules and I think what would be better is some sort of scheduled job I place on the SQL server, and it runs each script sequentially on each DB sequentially that's located on the server.
I need it to be portable, so if we setup a new SQL instance on a server, I can just place the batch file and SQL scripts on the server as a scheduled task, and it will do the work without further customization.
Any ideas or suggestions? Thank you in advance
These are the requirements, there are 4 scripts that do database maintenance, I need a script that will run all 4 scripts on each database on the server, then after that is done on 1 DB, it moves along to the next database.. running the 4 scripts on each DB sequentially.
I've looked into built-in SQL maintenance schedules and I think what would be better is some sort of scheduled job I place on the SQL server, and it runs each script sequentially on each DB sequentially that's located on the server.
I need it to be portable, so if we setup a new SQL instance on a server, I can just place the batch file and SQL scripts on the server as a scheduled task, and it will do the work without further customization.
Any ideas or suggestions? Thank you in advance
