Discussion:
update db cfg dbheap
(too old to reply)
Issam
2005-06-26 23:51:02 UTC
Permalink
Hello all,

I am trying to change a db2 configuration parameter from within my jdbc
code. When I use the following:
Statement stmt2 = con.createStatement();
stmt2.executeUpdate(
"update db cfg for sample using dbheap 800");
stmt2.close();

I get the following exception:
[IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "update db" was
found following "BEGIN-OF-STATEMENT". Expected tokens may include:
"<drop_transf>". SQLSTATE=42601



How can I change dbheap parameter from jdbc?

Thanks for your help
Mark A
2005-06-26 23:55:35 UTC
Permalink
Post by Issam
Hello all,
I am trying to change a db2 configuration parameter from within my jdbc
Statement stmt2 = con.createStatement();
stmt2.executeUpdate(
"update db cfg for sample using dbheap 800");
stmt2.close();
[IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "update db" was
"<drop_transf>". SQLSTATE=42601
How can I change dbheap parameter from jdbc?
Thanks for your help
That is a DB2 command, not an SQL statement. You need to issue that from a
OS command line (with "db2" prefacing the statement). I assume there is a
way to do that from Java, but I don't know how.
Serge Rielau
2005-06-27 01:59:05 UTC
Permalink
Post by Mark A
Post by Issam
Hello all,
I am trying to change a db2 configuration parameter from within my jdbc
Statement stmt2 = con.createStatement();
stmt2.executeUpdate(
"update db cfg for sample using dbheap 800");
stmt2.close();
[IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "update db" was
"<drop_transf>". SQLSTATE=42601
How can I change dbheap parameter from jdbc?
Thanks for your help
That is a DB2 command, not an SQL statement. You need to issue that from a
OS command line (with "db2" prefacing the statement). I assume there is a
way to do that from Java, but I don't know how.
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/r0012547.htm

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Mark A
2005-06-27 03:12:13 UTC
Permalink
Post by Serge Rielau
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/r0012547.htm
Cheers
Serge
Another feature new to FP9 that is not documented in the What's New section.
Issam
2005-07-14 19:28:12 UTC
Permalink
OK. When I try to use the CALL SYSPROC.ADMIN_CMD command from the
db2 command line, I get the following error:

SQL0440N No authorized routine named "SYSPROC.ADMIN_CMD" of type
"PROCEDURE" having compatible arguments was found. SQLSTATE=42884

It looks that this procedure does not exist.

I have db2 V8.1. What should I do?

Thanks.
Serge Rielau
2005-07-14 22:13:17 UTC
Permalink
Post by Issam
OK. When I try to use the CALL SYSPROC.ADMIN_CMD command from the
SQL0440N No authorized routine named "SYSPROC.ADMIN_CMD" of type
"PROCEDURE" having compatible arguments was found. SQLSTATE=42884
It looks that this procedure does not exist.
I have db2 V8.1. What should I do?
Thanks.
I suspect you need to run db2updv8 to register the proc for DBs which
were created prior to it's incarnation.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Issam
2005-07-14 23:26:40 UTC
Permalink
Thank you for your replies Serge. I have tried to run db2updv8, but it
seems the command is not recognized !

C:\Program Files\IBM\SQLLIB\BIN>db2 db2updv8 -d sample
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0104N An unexpected token "END-OF-STATEMENT" was found following
"db2updv8
-d sample". Expected tokens may include: "JOIN <joined_table>".
SQLSTATE=42601


Is there a mistake?
Matt Emmerton
2005-07-14 23:33:54 UTC
Permalink
Post by Issam
Thank you for your replies Serge. I have tried to run db2updv8, but it
seems the command is not recognized !
C:\Program Files\IBM\SQLLIB\BIN>db2 db2updv8 -d sample
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
SQL0104N An unexpected token "END-OF-STATEMENT" was found following
"db2updv8
-d sample". Expected tokens may include: "JOIN <joined_table>".
SQLSTATE=42601
Is there a mistake?
You don't need to prefix it with "db2" -- just run "db2updv8 -d sample" from
the command prompt.

--
Matt Emmerton
Mark A
2005-07-14 23:47:25 UTC
Permalink
Post by Matt Emmerton
You don't need to prefix it with "db2" -- just run "db2updv8 -d sample" from
the command prompt.
--
Matt Emmerton
System Commands in Chapter 1 of the Command Reference are executable
programs or scripts and do not need the "db2" prefix.

CLP Commands on Chapter 3 need the "db2" prefix.
Juliane via DBMonster.com
2005-07-15 12:25:08 UTC
Permalink
Post by Mark A
Post by Issam
Hello all,
[quoted text clipped - 16 lines]
Post by Mark A
OS command line (with "db2" prefacing the statement). I assume there is a
way to do that from Java, but I don't know how.
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/r0012547.htm
Cheers
Serge
Serge, perhaps this does not belong right here ...
still: I wanted to see the link you sent, but I can't getting the following
message:
The topic that you have requested is not available. The link may be wrong, or
you may not have the corresponding product feature installed. This online
help only includes documentation for features that are installed.

How come? I thought this is the Internet ?? And I do have ESE FP 9 installed,
so I sure dunno what to do about it..

Thank you,
Juliane
--
Message posted via DBMonster.com
http://www.dbmonster.com/Uwe/Forums.aspx/ibm-db2/200507/1
Serge Rielau
2005-07-15 18:57:37 UTC
Permalink
Post by Juliane via DBMonster.com
Post by Serge Rielau
http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/r0012547.htm
Serge, perhaps this does not belong right here ...
still: I wanted to see the link you sent, but I can't getting the following
The topic that you have requested is not available. The link may be wrong, or
you may not have the corresponding product feature installed. This online
help only includes documentation for features that are installed.
How come? I thought this is the Internet ?? And I do have ESE FP 9 installed,
so I sure dunno what to do about it..
I'm baffled... I just validated and the link works for me.
I don't think you need the product installed to read it. After all you
likely browse from your laptop which may be entirely differently set up
from what the server has installed.
Maybe a copy/paste error?

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Juliane via DBMonster.com
2005-07-15 14:36:03 UTC
Permalink
Post by Serge Rielau
Post by Issam
Hello all,
[quoted text clipped - 6 lines]
Post by Serge Rielau
Cheers
Serge
Serge, perhaps this does not belong right here ...
still: I wanted to see the link you sent, but I can't getting the following
The topic that you have requested is not available. The link may be wrong, or
you may not have the corresponding product feature installed. This online
help only includes documentation for features that are installed.
How come? I thought this is the Internet ?? And I do have ESE FP 9 installed,
so I sure dunno what to do about it..
Thank you,
Juliane
I guess its some kind of browser codepage problem or whatever, the link
itself does not work. After copying the text twice first to notepad then in a
browser works.
--
Message posted via http://www.dbmonster.com
Loading...