By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,557 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,557 IT Pros & Developers. It's quick & easy.

update db cfg dbheap

P: n/a
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

Nov 12 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
"Issam" <is*****@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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

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.
Nov 12 '05 #2

P: n/a
Mark A wrote:
"Issam" <is*****@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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


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/infoce...n/r0012547.htm

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3

P: n/a
"Serge Rielau" <sr*****@ca.ibm.com> wrote in message
news:3i************@individual.net...
http://publib.boulder.ibm.com/infoce...n/r0012547.htm

Cheers
Serge


Another feature new to FP9 that is not documented in the What's New section.
Nov 12 '05 #4

P: n/a
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.

Nov 12 '05 #5

P: n/a
Issam wrote:
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.

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
Nov 12 '05 #6

P: n/a
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?

Nov 12 '05 #7

P: n/a

"Issam" <is*****@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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?


You don't need to prefix it with "db2" -- just run "db2updv8 -d sample" from
the command prompt.

--
Matt Emmerton
Nov 12 '05 #8

P: n/a
"Matt Emmerton" <me******@nospam.yahoo.com> wrote in message
news:3q********************@rogers.com...

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.
Nov 12 '05 #9

P: n/a

Serge Rielau wrote:
Hello all,

[quoted text clipped - 16 lines]
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/infoce...n/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....m-db2/200507/1
Nov 12 '05 #10

P: n/a
Juliane via DBMonster.com wrote:
Serge Rielau wrote:
http://publib.boulder.ibm.com/infoce...n/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
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..

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
Nov 12 '05 #11

P: n/a

Juliane wrote:
Hello all,

[quoted text clipped - 6 lines]
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


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
Nov 12 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.