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 4 of 6 Topic 8838 of 9520
Post > Topic >>

Re: Get "user" tables

by WP <mindcooler@[EMAIL PROTECTED] > Apr 29, 2008 at 08:49 AM

On 29 Apr, 17:37, "Dave Hughes" <d...@[EMAIL PROTECTED]
> wrote:
> WP wrote:
[snip]
>
> Okay, you're using an "implicit" connection which means the Java app is
> connecting as the user it's running under. If you wanted to find out
> which tables a specific user has created you could do something like:
>
> SELECT TABSCHEMA, TABNAME FROM SYSCAT.TABLES WHERE OWNER = 'USERNAME'
>
> (If you're using DB2 v8 or below, user DEFINER instead of OWNER). To
> find out which tables the currently connected user has created:
>
> SELECT TABSCHEMA, TABNAME FROM SYSCAT.TABLES WHERE OWNER = USER

SELECT TABSCHEMA, TABNAME FROM SYSCAT.TABLES WHERE OWNER = USER; works
just fine and I think I'm going to use that. Right now, the java
program and the db2 database can be assumed to be running on the same
machine but I'm thinking maybe I should reconfigure things so the java
program has to specify username when connecting (and password maybe).
Hmm.

Thanks for the quick replies!

[snip]
>
> BTW, don't use != for inequality - it's deprecated. <> is standard SQL.

Ah, thanks, I will remember that. First I tried "IS NOT" but that
didn't work, heh.

By the way, I'm using verion 9.5.

>
> Cheers,
>
> Dave.

- WP
 




 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:03:09 CST 2008.