Code Place

DB2 LUW - (MS Windows) PowerShell Script for Generating and Executing Runstats 

Jan 14, 2015 10:17 AM

The script Drive_RunstatScript.cmd will control the execution of the ps1 members, the parameter labelled "ameddev" is my database name, so replace that with your database name. Also this script is the member scheduled in MS Windows Scheduler.

 

The script RunstatScriptbld.ps1 will generate the Runstat statements that in turn will be executed by the script RunstatScript.ps1 , also in RunstatScriptbld.ps1 , replace the DB2 hostname, userid, password with your system information.

The script RunstatScript.ps1 is the member that will execute the generated Runstat scripts.

 

The member labelled Drive_RunstatScript_(cmd).txt needs to be renamed to a member type of cmd, member labelled RunstatScript_(ps1).txt needs to be renamed to a member type of ps1, member labelled RunstatScriptBld_(ps1).txt needs to be renamed to a member type of ps1.

 

I hope more members will contribute their PowerShell scripts, there is very little information on the web and in documents/manuals for creating PowerShell scripts for DB2 running on Windows. I have a few more working scripts, and I will try and contribute more when a get a chance.

Attachment(s)
txt file
Drive_RunstatScript_(cmd).txt   153 B   1 version
Uploaded - Jun 05, 2020
txt file
RunstatScript_(ps1).txt   756 B   1 version
Uploaded - Jun 05, 2020
txt file
RunstatScriptbld_(ps1).txt   1 KB   1 version
Uploaded - Jun 05, 2020

Related Entries and Links

No Related Resource entered.