Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2007

Tip: Looking for answers? Try searching our database.

update command options has no effect

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
4.spam@mail.ru - 31 Jan 2007 07:47 GMT
Hello.

WinXP, db2 v8.2.7

When I use
UPDATE COMMAND OPTION USING <any_switch> ON(or OFF)
it seems that this command has absolutely no effect on these switches
since command
LIST COMMAND OPTIONS
issued after that shows the same values as before issuing UPDATE
COMMAND OPTIONS.

Is it normal?

Sincerely,
Mark B.
Serge Rielau - 31 Jan 2007 12:56 GMT
> Hello.
>
[quoted text clipped - 9 lines]
>
> Is it normal?
Can you provide an example? I use options like C and Z all the time in
QA and they work just fine.
Do you see truly no semantic effect or "merely" no validation in the
LIST command?

Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

4.spam@mail.ru - 31 Jan 2007 13:23 GMT
>db2 list command options

    Command Line Processor Option Settings

Backend process wait time (seconds)        (DB2BQTIME) = 1
No. of retries to connect to backend        (DB2BQTRY) = 60
Request queue wait time (seconds)          (DB2RQTIME) = 5
Input queue wait time (seconds)            (DB2IQTIME) = 5
Command options                           (DB2OPTIONS) =

Option  Description                               Current Setting
------  ----------------------------------------  ---------------
  -a    Display SQLCA                             OFF
  -c    Auto-Commit                               ON
...
>db2 update command options using C OFF
DB20000I  The UPDATE COMMAND OPTIONS command completed successfully.

>db2 list command options

    Command Line Processor Option Settings

Backend process wait time (seconds)        (DB2BQTIME) = 1
No. of retries to connect to backend        (DB2BQTRY) = 60
Request queue wait time (seconds)          (DB2RQTIME) = 5
Input queue wait time (seconds)            (DB2IQTIME) = 5
Command options                           (DB2OPTIONS) =

Option  Description                               Current Setting
------  ----------------------------------------  ---------------
  -a    Display SQLCA                             OFF
  -c    Auto-Commit                               ON
...
4.spam@mail.ru - 31 Jan 2007 13:28 GMT
> Do you see truly no semantic effect or "merely" no validation in the
> LIST command?
[quoted text clipped - 5 lines]
> DB2 Solutions Development
> IBM Toronto Lab

And it seems that display of the LIST COMMAND OPTIONS is correct since
after issuing
UPDATE COMMAND OPTIONS USING C OFF:

>db2 declare global temporary table session.t (i int)
DB20000I  The SQL command completed successfully.

>db2 insert into session.t values 1
DB20000I  The SQL command completed successfully.

>db2 select * from session.t

I
-----------

 0 record(s) selected.
Artur - 31 Jan 2007 22:05 GMT
Hi,

UPDATE COMMAND OPTION works only for the duration of "db2" interpreter
foreground process's life. If you are in o/s shell and issue:

$ db2 UPDATE COMMAND OPTION C OFF
$

then "db2" interpreter foreground process ends its life immediately
after execution of the command. So, the change to command options
lasts only a fraction of a second and has no effect for next commands/
sql instructions issued in o/s shell.

But if issue:
$ db2
db2 => UPDATE COMMAND OPTION C OFF
db2 =>

then you can see the change, because foreground db2 command line
process is still alive.

Bottom line:
use UPDATE COMMAND OPTION >>>only<<< in scripts and in db2 interactive
prompt.

BTW:
You can also find this in documentation: "Sets one or more command
options during an interactive session, or from a batch input file.",
however I think it  in addition should warn, that the command has no
effect in o/s shell prompt.

-- Artur Wronski
4.spam@mail.ru - 01 Feb 2007 08:20 GMT
Thanks, Artur!
Serge Rielau - 01 Feb 2007 14:42 GMT
> UPDATE COMMAND OPTION works only for the duration of "db2" interpreter
> foreground process's life. If you are in o/s shell and issue:
Doh!!
Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Pierre Saint-Jacques - 31 Jan 2007 21:42 GMT
I think that when you issue this, the file holding the options has already
been read and the update affects the file.
Can you issue the command, then db2 terminate and then re-issue the list
command and see the changes.
HTH,  Pierre.

Signature

Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515

> Hello.
>
[quoted text clipped - 12 lines]
> Sincerely,
> Mark B.
Pierre Saint-Jacques - 31 Jan 2007 21:42 GMT
I think that when you issue this, the file holding the options has already
been read and the update affects the file.
Can you issue the command, then db2 terminate and then re-issue the list
command and see the changes.
HTH,  Pierre.

Signature

Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515

> Hello.
>
[quoted text clipped - 12 lines]
> Sincerely,
> Mark B.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.