Is there anyone else that thinks it would be useful for IBM to develop some PowerShel cmdlets for DB2 (and make them available for Express-C, unlike MQTs... <grumble />))?
Would anyone else see value in saying something like
[i]get-content c:\db_change_script.txt | change-database -dbname MyDB -host dbserver -port 50000 | format-table sqlcode, message[/i]
Wouldn't being able to do stuff like that be HUGE! You know the SQL Server team is going to be adding functionality like that eventually, wouldn't that be sweet if DB2 beat them to the punch AGAIN, like they did with CLR Sprocs?
DB2 has such a great reputation for being a market leading database, I sure hope that the community can gather a big enough voice to help them realize that PowerShell support would be enormously beneficial.
For anyone unfamiliar with PowerShell - every other scripting language pipes [u]text[/u] between commands, which means that every command has to parse the previous command's output before it can do anything useful. For example, in order to to run a bunch of changes against the database and then only show the errors I'd have to parse each line and figure out where the error number is, and then show that line. PowerShell pipes actual objects back and forth, so there's no need to parse for the error number, you just access the Error property. With PowerShell you'd be able to say:
[i]get-content c:\changes.txt | change-database -name mydb | select-object error -ne 0 | export-clixml errors.xml[/i]
(that gets al the results that have an error not equal to 0 and exports those errors to errors.xml)
Isn't that so much more useful? That's just the begnning, I'm sure if a coupe of smart IBM devs that "got" PowerShell were given a bit of time they could come up with all SORTS of really engaging, exciting ways to make DB2 that much better (for windows DBAs at least).
Have I just had too much of the PowerShell kool-aid or is there anyone else that also thinks DB2 could really benefit by adding PowerShell support?
This topic has been locked.
4 replies Latest Post - 2012-01-16T01:48:38Z by SystemAdmin
Pinned topic PowerShell support for DB2
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-01-16T01:48:38Z at 2012-01-16T01:48:38Z by SystemAdmin
rchase 0600005BBN364 PostsACCEPTED ANSWER
Re: PowerShell support for DB22007-06-12T22:37:27Z in response to MesanHi,
Thanks for your input ... to be honest, I'm not familiar with PowerShell, but I tend to do most of my scripting on Linux and I prefer scripts that use the basic OS scripting built-in function for max portability.
I've passed your suggestion onto our development group to see what they think.
DB2 Express Community team
DB2 Express-C home page: http://www.ibm.com/db2/express
Download DB2 Express-C for free: http://www.ibm.com/db2/express/download.html