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 > Listing of files or column definitions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-04, 11:06
DennisLink DennisLink is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
Listing of files or column definitions

I have been using openquery quite regularly to get information from multiple DB2 databases into my MS SQL Server database and I consistently have frustration with finding things. I don't have direct access to the AS/400, only an ODBC connection.

Can anyone tell me a way to query a list of table names within a specific library (like sysobjects in MS SQL Server) or a way to query field names and definitions (like syscolumns in MS SQL Server) for a specific table? Please remember that I only have an ODBC connection and I cannot execute a command line program.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 12-01-04, 12:39
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
list files

select name,creator from sysibm.systables where creator='xxx'
select name from sysibm.syscolumns where tbcreator='xx' and tbname='yy'
do you have a db client installed ?
if so, cli is always available.
db2 list tables for schema xxx
db2 describe table xxx.yyyy
best regards, Guy Przytula
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 12-02-04, 09:49
rubystep rubystep is offline
Registered User
 
Join Date: Sep 2003
Posts: 85
db2 describe table schema.table show detail
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