Poor Man's Flight - Help
A short description of PMF's functions:
Menu
- Connect
This will bring up the login dialog.
- Next tab, new tab and close tab
You can open/view as many tables as you like but only in the same database. Use Menu->New Tab and Menu->Close Tab or STRG+T and STRG+W to open and close tabs.
- DB Info
Information for all DB2 databases currently accessible on your system. "Internal version" is a hex number by the way.
- Query db
Use this to search in tables. You can search for host variable (i.e. column name) or table contents like numbers or strings. If you want to find a certain string,
you need to put the string in quotes, e.g. 'SomeStringToFind'. If you want to search via LIKE, you need to specify the string like this: '%StringToFi%'. The search for strings is case sensitive.
- Delete tables
Will drop the selected tables. A backup before deletion would be a good idea.
- Find identical rows
This will find (and if desired, delete) identical rows from the selected tables.
- Table spaces
Displays table space information.
- Table sizes
Estimates the size of tables, based on runstats information. Do runstats on tables where size information is negative.
Table
- Create DDL
This will create a DDL file, containing column, index and trigger information for the selected table.
- Index/Reorg/Runstats/Rebind/Alter
Helps you to create and drop indexes, do reorgs, runstats and rebinds. 'Alter table' allows you to add columns to a table. You may need to reorganize the table after adding or deleting a column.
- Export
Export data from a table into DEL, WSF, IXF and plain text files. You can either export the currently selected subset or the whole table. If the table contains LOBs, check 'Export LOBs' and they will be written to extra files.
- Import
Import data into a table from DEL, WSF and IXF files. Only IXF files can be used to create a table.
Administration
- Snapshot
Some more or less useful information gleened from the snapshot API.
Settings
- Configuration
Currently you can set the maximum number of rows that should be read, default is 2000.
- Set font
Lets you change the font.
- Connection profiles
Add, change and remove connection profiles, i.e. database, user and password. You can set one profile as default profile. CAUTION: The passwords will be stored in clear text in a file called 'connset' in your home directory.
- Style
Chose between different styles.
- CharForBitData
CharForBitData can be displayed in binary or HEX format or as a generic marker.
- Count rows
This will do a 'SELECT COUNT(*) FROM currentTable' whenever you open or refresh a table. The number of rows will be displayed in the INFO field at the bottom. CAUTION: On large tables this can take a lot of time.
- Read uncommitted rows
Checked: PMF will read rows that are currently pending, meaning that they were changed but the changes are not committed yet. Of course it's impossible to update such a row. Unchecked: PMF will only read committed rows.
This forces PMF to wait until rows are committed, which in turn may lead to timeouts.
- Info
Bookmarks
- Add bookmark
Store SQL statements as a bookmark.
- Edit bookmark
Change and delete bookmarks.
You can open/view as many tables as you like (in the same database). Use Menu->New Tab and Menu->Close Tab or STRG+T and STRG+W to open and close tabs.
Tables and navigation
- Back and forward buttons: Use these to go back and forth in the SQL command history for this tab
- Yelllow field: Name of the current database
- First ComboBox: Table schemata. Select a schema.
- Second ComboBox: Tables in the previously selected schema. Select a table to view its contents.
- Button "Open": Reloads the currently selected table. CAUTION: Pending changes will be lost!
- Rows to fetch: PMF will cut the result of a SELECT after 2000 rows (default). If you want to display more or less rows,
enter a number here.
- Single Row: This forces PMF to use CURRENT OF CURSOR for UPDATES and DELETES. Check this, if
you have multiple identical rows in your table (or rethink your table design). "SingleLine" might also be useful
if you have to deal with very large VARCHAR columns. Do NOT use this in combination with a SELECT that
has an ORDER BY clause, because CURRENT OF CURSOR is not valid in statements containing ORDER BY.
Dataviewer
- Here you can edit the table's data. Use the cursor keys to navigate cells, use 'F2' to activate a cell for editing.
- Changes will not be comitted until you click 'Save'.
Right-clicking on a cell will open the Filter. This is one of these things which are hard to explain but easy to use. Try it, it's easy to learn and very useful (at least for me).
The first filter will select all rows where the selected column has the selected cell's data.
The second filter will add the cell's data to an existing WHERE clause (in the field 'SQL Cmd' below).
The third filter will generate a SELECT statement which will select only this row.
Buttons
- New Row: To create a new row, select an existing row and click 'New Row' (CTRL+N). The new row will be created below the original row. Click 'Save' (CTRL+S) to commit.
- Save: After editing cells or inserting new rows, click 'Save' (CTRL+S). No changes will be comitted until you click 'Save'
- Delete: Select rows by clicking on the vertical header. You can use the usual keys (SHIFT, CTRL or CTRL+A) to select multiple rows.
- Run (F5): Executes the command in the field 'SQL Cmd' below.
- Ext SQL: Opens a very simple editor for multi-lined SQL statements
- LOB->File: Exports LOBs (LargeObjects) to files. For each LOB in each selected row, you will be prompted for a file name.
- File->LOB: When inserting new rows with a LOB-column you will be prompted for a file which contains the LOB to insert.
SQL
Enter an SQL statement here (SELECT, INSERT, UPDATE, DELETE but also commands that are not necessarily table-related: CREATE VIEW, DROP, ....) and click 'Run Cmd' or hit F5 to execute.
These commands will be persistently stored in the ComboBox 'Stored Cmds'.
Filter
Use these ComboBoxes to create SQL statements.
Stored Cmds
Previously executed statements are stored here.
Info
Information about pending Inserts and Updates, number of displayed rows and timereons. Timerons is an internal value, mainly used to measure the performance of SELECTs.
SELECTs using a high-cardinality index can yield Timerons of 50 or lower.