Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > Re: Get "user" ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 8838 of 9520
Post > Topic >>

Re: Get "user" tables

by Lennart <Erik.Lennart.Jonsson@[EMAIL PROTECTED] > Apr 29, 2008 at 08:36 AM

On Apr 29, 5:19 pm, WP <mindcoo...@[EMAIL PROTECTED]
> wrote:
> 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
> came up with the following query which I tried in Control Center:
> select tabname, tabschema from syscat.tables where tabschema !=
> 'SYSCAT' and tabschema != 'SYSIBM' and tabschema != 'SYSIBMADM' and
> tabschema != 'SYSSTAT' and tabschema != 'SYSTOOLS';
> It seems to work, it returns just the tables that I have created
> 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.
>
> I just wanted to hear if I should proceed with this solution or if
> there's some better approach.
>
> - WP

You could simplify the query to ... where tabschema not like 'SYS%'.
However, I'm somewhat surprised that you don't know which schema's
there are, is there some specific reason for that?

/Lennart
 




 6 Posts in Topic:
Get "user" tables
WP <mindcooler@[EMAIL   2008-04-29 08:19:47 
Re: Get "user" tables
Lennart <Erik.Lennart.  2008-04-29 08:36:42 
Re: Get "user" tables
"Dave Hughes" &  2008-04-29 10:37:01 
Re: Get "user" tables
WP <mindcooler@[EMAIL   2008-04-29 08:49:37 
Re: Get "user" tables
"Dave Hughes" &  2008-04-29 14:55:33 
Re: Get "user" tables
WP <mindcooler@[EMAIL   2008-04-30 01:05:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 21:04:22 CST 2008.