Friday, June 04, 2010

SQLIse – A PowerShell SQL Server Query Tool

I am doing some work at the moment building SQL PowerShell training for an upcoming PowerShell MasterClass. In my searching, I came across a small project being done by Chad Miller, called SQLIse. As Chad describes in his blog, SQLISE is an ISE add-on that provides  “a basic IDE for T-SQL that includes the ability to exit, execute, parse and format SQL code from within PowerShell ISE”.

SQLISE is a part of a larger SQL PowerShell project called SQL Extensions for PowerShell or SQLPSX. Having played a bit with both extensions, they are pretty cool and can certainly help IT Pros who have to deal with SQL. Chad has even created a short video to demostrate SQLISE – get this at YouTube: http://www.youtube.com/v/1KcNSHn7oTA&hl=en.

SQLISE has two pre-requisites. First, you need to have the PowerShell Pack installed and you need the SQLPX extensions loaded. You can get PowerShellPack from the MSDN Code Gallery.

One issue I faced was that the SQLIse installation process was not seamless or easy.  In order to get this running, I needed two uber-modules (SQLPSX and PowerShellPack) and these come from different places. Second, the installation process requires you to run programs, SQLPSX_Install and PowerShellPack.MSI.

I find this somewhat contrary to the spirit of Modules in PowerShell V2 in that modules should be deployable using only Xcopy. In my case, I did not want either uber-module to be loaded in the personal modules folder, but in the system modules folder. But the installer(s) gave me no option. More importantly, while the SQLPSX installation program seemed to run, but left the module folder empty. A bit of hacking (and running streams.exe across the expanded file set!)  enabled me to get the module installed. But sadly the hacking did not work well – and some of the features do  not work. More hacking I suspect is needed.

In summary, a great feature let down by the complex installation process.

2 comments:

cmille19 said...

Thomas -- Thanks for the feedback. The SQLPSX installer is something that we didn't get right the first time.

We've tried to address this in release 2.2 release which redistributes both the WPK and IceCreamBasic modules -- no need to run separate installations.

If you're looking to do something more than what the installer offers, I would suggest not using the installer and instead grabbing the the SQLPSX_2.2.2.zip file which is also included in the download section. You then can then unblock, unzip and xcopy deploy manually.

Although we've had some improvements, clearly more work is needed on the installer--look for an update soon.

--Chad Miller
SQLPSX Coodinator

cmille19 said...

Thomas -- I've published a new 2.3 release which addresses both the installer and preference storage issues. Thanks again for you feedback

--Chad Miller