Monthly Archives: March 2013

PowerShell Usage in DBA Work – Case Study 7/7

Reading/scanning SQL Server Logs is a required DBA work item in all my work environments. I know there are lots different ways, mostly are using undocumented xp_readerrorlog or sp_readerrorlog.   Even in PS way, this xp_readerrorlog is wrapped as a sql … Continue reading

Posted in Administration | Tagged | 1 Comment

PowerShell Usage in DBA Work – Case Study 6/7

SQL Server SMO is a great resource for DBAs, unfortunately, before PowerShell, it is a pretty deep learning curve to get familiar with SMO. The beautify of PS is its own discovery capacity. This is best described in the Keith … Continue reading

Posted in Administration | Tagged | Leave a comment

PowerShell Usage in DBA Work – Case Study 5/7

One challenge in a super-multiple server (say a few hundred servers) environment is to know what sql services (SSRS/SSAS/SSIS/Engine/Agent etc) are installed and what their versions and the startup accounts are. Case Scenario: (SQL Service Inventory) We are managing hundreds … Continue reading

Posted in Administration | Tagged | Leave a comment

PowerShell Usage in DBA Work — Case Study 4/7

One common surprise I have encountered in almost all my DBA environments is that a sql job that usually runs <x> minutes, sometimes can take <2x> minutes or even more time to finish. Case Scenario: (Monitor / alert long running … Continue reading

Posted in Administration | Tagged | Leave a comment

PowerShell Usage in DBA Work — Case Study 3/7

As a DBA, sometimes we may need to demonstrate to some stakeholders when a sql server instance was last rebooted, i.e, just to prove the sql instance weekly/monthly availability . I know there are quite a few blogs / posts … Continue reading

Posted in Administration, Uncategorized | Tagged | 1 Comment

PowerShell Usage in DBA Work — Case Study 2 / 7

  As a DBA in a complex environment, we frequently need to backup various environment information. One of the backups is to script out the configurations / objects, for example, scripting out replication,  jobs, policies and policy conditions etc. Almost … Continue reading

Posted in Administration | Tagged | 1 Comment

PowerShell Usage In DBA Work — Case Study 1 / 7

  I have been blogged non-technical topics for too long and it is time for me to return to my favourite technical topics now. I plan to write seven real-world cases where I feel PowerShell solution is much more efficient … Continue reading

Posted in Administration | Tagged | Leave a comment