1.1 Why Data Professionals can’t afford to ignore PowerShell
Data is now one of the most valuable assets in the world and Data Professionals need a broad set of skills and are expected to be able to accomplish a wide number of tasks. We can be required to:
- Build SQL Server hosts
- Develop extract, transform and load (ETL) solutions
- Ensure SQL instances are correctly configured
- Monitor and respond to alerts
- Troubleshoot performance and access issues
- Perform OS and SQL upgrades
- Deploy changes to schemas
- Evaluate index usage and settings
- And many more
In the process of performing our role, we will interact with a ton of technologies: SQL Server, virtualization (Hyper-V or VMware), operating systems (Windows or Linux), containers, clusters (including Kubernetes clusters), networking, storage, Active Directory, certificates and cloud to name a few.
In the majority of cases, we will be working with with more than one SQL instance. Sometimes 2, sometimes 10,000 or more.
While pretty much everything can be achieved via GUI consoles for any of those technologies, two problems come immediately to mind with this approach:
- The amount of time wasted
- The inconsistency of humans compared to machines
This is best explained with a story.
When Rob first became a SQL Server DBA, his first responsibility every morning was to check that Agent Jobs had run successfully across the SQL Server estate. This numbered a little over 100 instances.