Hi
I know it may be a lame question but I'm new to PS and I would appreciate if you guys with big experience could advice me if I should even process the following scenario using PS or something completely different
Scenario :
• SQL server 2008 R2 - direct access
• about 20 small databases on every SQL server
• developers quite often provide sql script to be executed on a group of dbs
so far I just connect to server via Management Studio and run manually provided script against every single db
I thought that it could be improved if I:
- create a file list_of_databases.txt to be included
- save developer.sqlscript everytime a new is provided
- create and run PSscript which will use developer.sql content and run it against every database listed in list_of_databases.txt and create a log.file with a positive result or any errors
Is this a good way to do it or I should avoid it for some reason ?
I would appreciate if anyone has some URLs where I should look for examples as I'm totally beginner in scripting.
Thank you
Pete
↧
should I use PS for that task ?
↧