How to retrieve DATABLADES names through a jdbc connection ??
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration, Java & JDBC Development
Hi all ! I'd like to retrieve Datablades while my jdbc connection, Is there a table in sysmaster or sysutils, where I could find the info (didn't find it yet), a way to request blademgr and get the info back, or a specific method comming with the jdbc driver that I could use ???? Thx for any help ! Steph. -- _________________________________________________________________ Steph Monier - DBA Engineer REEF SA - www.reef.com 3057 17th Street - San Francisco California 94110-1387 USA Voice 1 415 241 2800 (ext 241) - Fax 1 415 241 9499 _________________________________________________________________ BUSINESS IS DYNAMIC - TAKE CONTROL ... _________________________________________________________________
Steph Monier wrote:
> I'd like to retrieve Datablades while my jdbc connection,
OK.
1. If you have a look in the files called objects.sql in each
datablase's installs, you will find a bunch of INSERT queries that look like
this:
insert into sysbldobjects
(bld_id, obj_kind, obj_signature, obj_owner, sequence, create_sql,
create_can_fail, drop_sql, drop_can_fail)
values
( blah, blah, blah )
This system catalog contains information relevant to the DataBlade
install. I would guess that a list of currently installed blades can be
retrieved using a query that looks like this:
2. The list of DataBlades not installed -- which Blade Manager give you
-- is (I believe) acquired by looking into the $INFORMIXDIR/extend
directory.
3. But this isn't going to be the full story. A lot of extensions don't
come in DataBlade-ized packages, and many developers eschew the whole
DataBlade support infrastructure in favor of direct CREATE TYPE and CREATE
FUNCTION statements. There are a mess of system catalogs that contain all of
this information:
sysxtdtypes - Contains information about extended types: name, kind, etc.
sysattrtypes - what types are bound to what columns.
sysprocedures - what UDRs (functions and procedures) are available.
For example, I find the following query really, really useful:
SELECT P.procname::lvarchar,
P.owner::lvarchar,
ifx_ret_types(P.procid)::lvarchar AS Return_Types,
P.numargs,
P.paramtypes::lvarchar
FROM SYSPROCEDURES P;
This gives you a list of all of the UDFs in the database, together with
their arguments (in the right order) and their return type.
Rather than sweat too much about the DataBlade module--which is really
only a handle to a bunch of UDT/UDFs--my advice would be to look into the
types and functions within the database. Think of them as just another part
of the schema, not a lot different from tables/views/synonyms so far as the
administrator is concerned.
Hope this helps!
KR
Pb
PS . See you all in Orlando!
Steph Monier wrote:
> I'd like to retrieve Datablades while my jdbc connection,
OK.
1. If you have a look in the files called objects.sql in each
datablase's installs, you will find a bunch of INSERT queries that look like
this:
insert into sysbldobjects
(bld_id, obj_kind, obj_signature, obj_owner, sequence, create_sql,
create_can_fail, drop_sql, drop_can_fail)
values
( blah, blah, blah )
This system catalog contains information relevant to the DataBlade
install. I would guess that a list of currently installed blades can be
retrieved using a query that looks like this:
2. The list of DataBlades not installed -- which Blade Manager give you
-- is (I believe) acquired by looking into the $INFORMIXDIR/extend
directory.
3. But this isn't going to be the full story. A lot of extensions don't
come in DataBlade-ized packages, and many developers eschew the whole
DataBlade support infrastructure in favor of direct CREATE TYPE and CREATE
FUNCTION statements. There are a mess of system catalogs that contain all of
this information:
sysxtdtypes - Contains information about extended types: name, kind, etc.
sysattrtypes - what types are bound to what columns.
sysprocedures - what UDRs (functions and procedures) are available.
For example, I find the following query really, really useful:
SELECT P.procname::lvarchar,
P.owner::lvarchar,
ifx_ret_types(P.procid)::lvarchar AS Return_Types,
P.numargs,
P.paramtypes::lvarchar
FROM SYSPROCEDURES P;
This gives you a list of all of the UDFs in the database, together with
their arguments (in the right order) and their return type.
Rather than sweat too much about the DataBlade module--which is really
only a handle to a bunch of UDT/UDFs--my advice would be to look into the
types and functions within the database. Think of them as just another part
of the schema, not a lot different from tables/views/synonyms so far as the
administrator is concerned.
Hope this helps!
KR
Pb
PS . See you all in Orlando!