Re: Get "user" tables



Hi,

Hello, I need to communicate with a db2 database from a java program
and this java program needs to check which "user tables" there are. I
[...]
myself. But it is this the best way? The java program doesn't specify
a user upon connection because it's connecting through a local system
account I think. Therefore it cannot perform selection based on
username.

You could check out the Database Metadata:

http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html

retrievable via Connection#getMetaData(). Works fine for Oracle, no idea about DB2.

Ronny

.



Relevant Pages

  • Re: Get "user" tables
    ... Ronny Schuetz wrote: ... and this java program needs to check which "user tables" there are. ... a user upon connection because it's connecting through a local system ...
    (comp.lang.java.programmer)
  • Get "user" tables
    ... I need to communicate with a db2 database from a java program ... and this java program needs to check which "user tables" there are. ... tabschema from syscat.tables where tabschema!= ... a user upon connection because it's connecting through a local system ...
    (comp.lang.java.programmer)
  • Re: Question on SSH hang on exit when running Java background process
    ... My problem is that my SSH client hang on "exit" if I run a java program ... it seems that the SSH connection is still alive and ...
    (SSH)
  • mysql-connector-java-5.0.4-bin-g.jar not connecting
    ... the java program I get "Cannot instantiate jdbc driver". ... Mysql is definitely working because I can access it from Apache Webserver ... System.out.println ("Database connection established"); ...
    (comp.lang.java.databases)
  • nio multi thread client performance
    ... I've a java program to manage servers by tcp/ip. ... There is a thread per connection. ... I used nio and non-blocking mode ...
    (comp.lang.java.programmer)