Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: DB2 UDB or Oracle (who has better support)

Re: DB2 UDB or Oracle (who has better support)

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: 3 Mar 2005 20:19:32 -0800
Message-ID: <1109909972.400117.48340@f14g2000cwb.googlegroups.com>


Serge Rielau wrote:
>
> Not sure about how SQL plus works. But DB2's CLP allows you to exit
the
> program without terminating your connection. So DBA's use shell
> scripting extensively submitting single CLP commands using its'
> parameter mode.

Absolutely no need whatsoever to "exit" the program in a command line window in Windows or *nix. If you have to run something "on the side", you just pull up another window and run it there: a command line window in either *nix or Windoze is so light weight there is absolutely NO NEED whatsoever for this rigmarole.

However, if you WISH to run it as a subprocess, then CLP should simply spawn a command shell subprocess: the call is available in both Windoze and *nix, has EXACTLY the same syntax and works PRECISELY the same way. That is what SQL*Plus does if someone needs to jump to command line, do something and then return to the original session. Works precisely the same way in *nix and Windoze.

But anyways, the whole CLP "cookie" thing is just a leftover from the complexity of running multiple interactive command-line sessions in mainframe block mode terminals. Not needed in Windoze or *nix, makes no sense whatsoever nowadays. Yet the thing persists because no one at IBM knew how to do an exec() properly...

> This is the sole reason why DB2 needs the extra hop on Windows:
> Maintaining a cookie to associate the connection with that shell
window.

No. The sole reason is the architecture of CLP is deranged and simply out of date. All it needs is to spawn a subprocess executing the command line shell. Done ad-nauseum in countless other *nix and Windoze command-line programs.

*nix even has a convention for those: simply prefix a command with "!" and it will execute in a sub-shell. Try it inside "vi", for example. Exactly the same happens with SQL*Plus. Better: type "!", hit return and you get the shell prompt, do as many shell commands as you want - including other SQL*Plus sessions! - exit all of them and bingo: you are back at the original SQL*Plus session. No cookies anywhere: not needed, NEVER needed! Windoze or *nix? Irrelevant.

> Am I correct that you are either in a SQL Plus session or you are
not?

Err,..... read the above sentences.

> In that case SQL plus wouldn't have the problem (but not the same
> capability either)

Yes it has. It's simply done the right way, which has been available to EVERY *nix and Windoze command line program since the year dot. WIthout the slightest need for "cookies".

> If typing db2cmd to get a DOS shell is so evil then too bad.
> I've heard people have made buying decisions on less ;-)

Much less! :)
And I insist: it's not DB2. It's CLP that is deranged. The two are not one. Received on Thu Mar 03 2005 - 22:19:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US