You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Paulo Jesus <pa...@mail.telepac.pt> on 2007/04/27 13:21:59 UTC

Question using SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY(..) on IJ

I´m trying to use  SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY funtion on ij
against a Network Server but i'm not getting any results(only some
garbage).

By the reference manual i´m using e.g.
 VALUES SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');

I´m trying to confirm manual settings made in derby.properties so i´m
trying to read values like
  derby.locks.deadlockTimeout
  derby.locks.waitTimeout
  derby.storage.pageCacheSize
  derby.language.logQueryPlan
  ...

Can i get this values using ij?


PJ


Re: Question using SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY(..) on IJ

Posted by Paulo Jesus <pa...@mail.telepac.pt>.
Ok, i can see now why i don´t see the values.
This way i can´t see the values that are in the server.
And this can be a problem to static properties that are not easy to
analyze on run. We can´t change them and than watch the changes in run mode.
We can see the properties file but i have seen derby not notifying on
wrong syntax in that file or at least ignoring one property ended on ';'.


Thank you for the help.
PJ








John Embretsen escreveu:
> Paulo Jesus wrote:
>> I wrote the command manually here...  the system warns when the command
>> it´s wrong. But the resul on correct property is the same than in a
>> random property.
>>
>> What's the output it should be?
>> I  have some blank lines, some dots, again blank lines and at the end '1
>> row selected'.
>> What should i do with this?
> 
> Here is the output I get from IJ using the current development version.
> I started the server with derby.locks.deadlockTimeout=10 in my
> derby.properties file:
> 
> ij> connect 'jdbc:derby://localhost/myDatabase;create=true';
> ij> VALUES
> SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');
> 1
> --------------------------------------------------------------------------------------------------------------------------------
> 
> NULL
> 
> 1 row selected
> 
> 
> So, it seems like I don't get the real value of the property. Perhaps
> the system function only works for properties that are stored in the
> database, i.e. database-wide properties?
> 
> If I set the property using the corresponding system procedure for
> setting properties, I get the expected result:
> 
> ij> CALL
> SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.locks.deadlockTimeout',
> '10');
> Statement executed.
> ij> VALUES
> SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');
> 1
> --------------------------------------------------------------------------------------------------------------------------------
> 
> 10
> 
> 1 row selected
> 
> 

Re: Question using SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY(..) on IJ

Posted by John Embretsen <Jo...@Sun.COM>.
Paulo Jesus wrote:
> I wrote the command manually here...  the system warns when the command
> it´s wrong. But the resul on correct property is the same than in a
> random property.
> 
> What's the output it should be?
> I  have some blank lines, some dots, again blank lines and at the end '1
> row selected'.
> What should i do with this?

Here is the output I get from IJ using the current development version. I 
started the server with derby.locks.deadlockTimeout=10 in my derby.properties file:

ij> connect 'jdbc:derby://localhost/myDatabase;create=true';
ij> VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');
1
--------------------------------------------------------------------------------------------------------------------------------
NULL

1 row selected


So, it seems like I don't get the real value of the property. Perhaps the system 
function only works for properties that are stored in the database, i.e. 
database-wide properties?

If I set the property using the corresponding system procedure for setting 
properties, I get the expected result:

ij> CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.locks.deadlockTimeout', 
'10');
Statement executed.
ij> VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');
1
--------------------------------------------------------------------------------------------------------------------------------
10

1 row selected


-- 
John


Re: Question using SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY(..) on IJ

Posted by Paulo Jesus <pa...@mail.telepac.pt>.
I wrote the command manually here...  the system warns when the command
it´s wrong. But the resul on correct property is the same than in a
random property.

What's the output it should be?
I  have some blank lines, some dots, again blank lines and at the end '1
row selected'.
What should i do with this?

I'm using  db-derby-10.2.2.0 and started the server whith the
startNetworkserver.ksh from the NetworkServer framework.

PJ







John Embretsen escreveu:
> Paulo Jesus wrote:
>> I´m trying to use  SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY funtion on ij
>> against a Network Server but i'm not getting any results(only some
>> garbage).
>>
>> By the reference manual i´m using e.g.
>>  VALUES
>> SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');
> 
> I'm no expert on this, but it seems that you are missing the letters CS
> in SYSCS_GET...
> 
> VALUES
> SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');
> 
> works for me.
> 
>> I´m trying to confirm manual settings made in derby.properties so i´m
>> trying to read values like
>>   derby.locks.deadlockTimeout
>>   derby.locks.waitTimeout
>>   derby.storage.pageCacheSize
>>   derby.language.logQueryPlan
>>   ...
>>
>> Can i get this values using ij?
> 
> Seems like it, as long as you connect to a database first.
> Please report any error messages you get if it still does not work for you.
> 
> 

Re: Question using SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY(..) on IJ

Posted by John Embretsen <Jo...@Sun.COM>.
Paulo Jesus wrote:
> I´m trying to use  SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY funtion on ij
> against a Network Server but i'm not getting any results(only some
> garbage).
> 
> By the reference manual i´m using e.g.
>  VALUES SYSCS_UTIL.SYS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');

I'm no expert on this, but it seems that you are missing the letters CS in 
SYSCS_GET...

VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');

works for me.

> I´m trying to confirm manual settings made in derby.properties so i´m
> trying to read values like
>   derby.locks.deadlockTimeout
>   derby.locks.waitTimeout
>   derby.storage.pageCacheSize
>   derby.language.logQueryPlan
>   ...
> 
> Can i get this values using ij?

Seems like it, as long as you connect to a database first.
Please report any error messages you get if it still does not work for you.


-- 
John