How can shell script be run?

Help
2010-04-29
2013-04-05
  • David Adler

    David Adler - 2010-04-29

    The Ad Hoc SQL Options have a radio button for "shell script" but it isn't obvious what can be executed.

    Assuming this is supported, is there a tag similar to <SQLFile>?

     
  • Matthew Vandenbussche

    Please make sure you understand the security implication of opening a ssh connection to you data-server from a web server before even thinking of using this. Do not use this without an ssl connection to the web server.

    You can install the SSH2 package and enable the SHELL script option within the config.php file to  enabled this option. It is hidden for a reason. It works but it can be finicky, especially to setup at first. It is not supported and only works on unix like system (linux, aix, etc…), that said I know it is used by some and can work well.

    You will basically be running a db2 script using 'db2 -v <Term Char> -f /dev/tty'. Yes you can use the SQLFile (assuming you are in the tutorial framework).

    Please when asking question give me some more reference.

    Regards,
    Matthew

     
  • David Adler

    David Adler - 2010-04-29

    My interest was in using the Spatial Extender CLP 'db2se' which can be used to import files of spatial data into a table.  But it may be better to call the stored procedure which does the same thing although not as "friendly".

     

Log in to post a comment.