If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to find the Creator Name for a perticular table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-31-07, 00:01
shrivatsa shrivatsa is offline
Registered User
 
Join Date: May 2006
Posts: 9
How to find the Creator Name for a perticular table

Hi,


If I know the table name how to find the creator for that table?
I am unable run queries for that table without the creator name.


Thanks
Reply With Quote
  #2 (permalink)  
Old 01-31-07, 01:08
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
definer in syscat.tables
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #3 (permalink)  
Old 01-31-07, 08:29
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by shrivatsa
I am unable run queries for that table without the creator name.
I think that you may be confusing schema name with creator name; they are not necessarily the same, and you definitely don't need the creator name to query the table.
Reply With Quote
  #4 (permalink)  
Old 02-01-07, 03:41
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
It is always good practice to fully qualify all your database objects (tables, functions, ...) anyway, i.e. use schema and object name.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 02-01-07, 04:28
vini_srcna vini_srcna is offline
Registered User
 
Join Date: May 2006
Posts: 82
You told that you know the table name. Try with this query.

SELECT STRIP(CREATOR)||'.'||NAME FROM SYSIBM.SYSTABLES WHERE NAME = 'table_name' AND TYPE = 'T';

you should get the fully qualified table name for the above query. (1 or more)
Proved the table name you will provide really exists.

Quote:
I am unable run queries for that table without the creator name.
What error are you getting. Is that saying OBJECT does not exists ..?
you cannot query the table with out the owner's name unless you are an owner for that table. If you wont give the creator name in the query, then CURRENT SQLID will be considered as the table owner.
Give us the information about platform, and version details. If its z/os it should be giving -204.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On