tmcmaster
asked on
Table list in DB2 Database.
I am into an IBM AS400 in the Query Utilities for DB2. I have many options but primarily before I can use the Query Manager and Utilities I need to know how to locate the tables in the database.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you don't know the schema, do you at least know the table name?
ASKER
No and that's our problem we get no cooperation from the developer
So, let me see if I understand. You don't know the schema, and you don't know the table name. So, how do you know what you're looking for?
tmcmaster:
Query the system catalog. E.g.:
==> select * from qsys2.systables
or
==> select * from qsys2.systables
...depending on your naming convention.
Once you know about the system catalog, which is mostly in library QSYS2 (or schema QSYS2), lots of stuff can be found.
You'll probably want to substring the longer names and run various SELECTs to different tables and views such as SYSVIEWS, SYSPROCS and others.
Tom
Query the system catalog. E.g.:
==> select * from qsys2.systables
or
==> select * from qsys2.systables
...depending on your naming convention.
Once you know about the system catalog, which is mostly in library QSYS2 (or schema QSYS2), lots of stuff can be found.
You'll probably want to substring the longer names and run various SELECTs to different tables and views such as SYSVIEWS, SYSPROCS and others.
Tom
ASKER
Generally the tables have common names such as customers, inventory etc. So if I can look at all the schemas I should be able to determine which one their using. Sounds tough I know but I have absolutely no help from other side.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I can get to the iseries navigator and select Databases
Then I get S10ade1b which expands with a schemas button which expands to four (4) Schemas
The one I am interested in is the WFMENU which will expand and have a list of tables which expand to more menu systems. When I expand those I get a long list of application menus indicating for example that APM is the Accounts Payable..
The top of the page gives me the ip address xxx.xxx.xxx.xxx(S10ade1b) which I guess is the instance.
I know this is asking a lot but I have not worked on an OS400 system nor used the query manager.
Whatever knowledge you can impart on me would be greatly appreciated.
Then I get S10ade1b which expands with a schemas button which expands to four (4) Schemas
The one I am interested in is the WFMENU which will expand and have a list of tables which expand to more menu systems. When I expand those I get a long list of application menus indicating for example that APM is the Accounts Payable..
The top of the page gives me the ip address xxx.xxx.xxx.xxx(S10ade1b) which I guess is the instance.
I know this is asking a lot but I have not worked on an OS400 system nor used the query manager.
Whatever knowledge you can impart on me would be greatly appreciated.
ASKER
We are getting closer. QSYS2 library has shown up. However; I am at the OS/400 Main Menu with a lots of selections. i.e. selection 4 is files, libraries and folders. Green Screen
I haven't found an opportunity to use the select * statement anywhere.
I haven't found an opportunity to use the select * statement anywhere.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This working out great. I got into the database using the iSeries Navigator. I selected a schema 'WFMENU, expanded it and selected tables. At the bottom of the screen under 'database task' I selected 'Run an SQL script'. This presented the screen that allows the input of SQL statements.
I entered 'SELECT * FROM QSYS2.SYSTABLES; and this presented all the tables for table owner MSSGROUP which also in this listing I found the schema for tables is MSSF.
I then did a 'SELECT * FROM MSSF. APCONT1; ( ONE OF THE TABLES I'M INTERESTED IN), and it showed me the table with coloumns and values. which is fantastic.
My next move is to export these tables into Excel or CSV files, and that should be the home run answer.
All of you are great!
Thanks,
Ted
I entered 'SELECT * FROM QSYS2.SYSTABLES; and this presented all the tables for table owner MSSGROUP which also in this listing I found the schema for tables is MSSF.
I then did a 'SELECT * FROM MSSF. APCONT1; ( ONE OF THE TABLES I'M INTERESTED IN), and it showed me the table with coloumns and values. which is fantastic.
My next move is to export these tables into Excel or CSV files, and that should be the home run answer.
All of you are great!
Thanks,
Ted
ASKER
This working out great. I got into the database using the iSeries Navigator. I selected a schema 'WFMENU, expanded it and selected tables. At the bottom of the screen under 'database task' I selected 'Run an SQL script'. This presented the screen that allows the input of SQL statements.
I entered 'SELECT * FROM QSYS2.SYSTABLES; and this presented all the tables for table owner MSSGROUP which also in this listing I found the schema for tables is MSSF.
I then did a 'SELECT * FROM MSSF. APCONT1; ( ONE OF THE TABLES I'M INTERESTED IN), and it showed me the table with coloumns and values. which is fantastic.
My next move is to export these tables into Excel or CSV files, and that should be the home run answer.
All of you are great!
Thanks,
Ted
I entered 'SELECT * FROM QSYS2.SYSTABLES; and this presented all the tables for table owner MSSGROUP which also in this listing I found the schema for tables is MSSF.
I then did a 'SELECT * FROM MSSF. APCONT1; ( ONE OF THE TABLES I'M INTERESTED IN), and it showed me the table with coloumns and values. which is fantastic.
My next move is to export these tables into Excel or CSV files, and that should be the home run answer.
All of you are great!
Thanks,
Ted
ASKER
Does anybody know how to export table data from the iSeries Navigator
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Everything is correct except when I select the local database, the taskpad does not give me the 'export data ' option.
Under database tasks I have a help icon i.e. ? and when I expand it i'ts just help.
Under database tasks I have a help icon i.e. ? and when I expand it i'ts just help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have awarded all points on this question. Please stop Monitoring.
ASKER