Kbase P24496: What is the DBTool ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/28/2008 |
|
Status: Verified
GOAL:
What is the DBTool ?
GOAL:
How to identify problems with the SQL Width for a database?
GOAL:
How to identify problems with the SQL Width when using DataServers ProToXXX?
GOAL:
How to identify problems with the SQL Width when using PeerDirect replication ?
GOAL:
How to change SQL Width from command line?
GOAL:
Is there a command I can use to change the SQL width from command line?
GOAL:
How to change MAX Width from command line?
FACT(s) (Environment):
Progress 9.1E
OpenEdge 10.x
All Supported Operating Systems
OpenEdge SQL Category: JDBC Drivers
FIX:
Dbtool is a new character mode application which allow Progress to identify problems with the SQL Width and record format errors in our database. It can also be used with replication using PeerDirect.
This tool was first included in Service Pack 6 for Progress 9.1D and is included in the DLC/bin executables.
To access the DBTool menus type: dbtool <dbname>
This following options menu are presented by dbtool.
DATABASE TOOLS MENU - 1.0b
--------------------------
1. SQL Width & Date Scan w/Report Option
2. SQL Width Scan w/Fix Option
3. Record Validation
4. Record Version Validation
5. Read database block(s)
6. Record fixup
9. Enable/Disable File Logging
Q. Quit
Where:
Option 1: Will find the maximum field sizes and report them.
Option 2: Will find the maximum field sizes and update their width.
Option 3: Will validate the schema versioning of the records after records are updated by the tool
Option 4: Will validate the schema versioning before and after the records are updated by the tool
Option 5: Will display the amount of records find by recid, table and area
Option 6: Will scan records for indications of possible corruption. (This option was added in Service Pack 10.0B04)
Option 9: Will enable or disable the logging of the tool , if enabled a dbtool.out file will be generated if not the output will go to the screen.
Note:
You will be presented with a choice to run any option from this menu online or offline:
<connect>:(0=single-user 1=self-service >1=#threads)?
If this is offline select 0 to run the tool single-user,
if online enter n to run self-service multi-threaded, where n = number of CPU's, ie 1 thread per CPU
Then to enter a specific table number or all tables for the option to scan:
<table>: (Table number or all)?
Table number can be found through the following 4GL query:
FOR EACH _file WHERE _file-number > 0 AND NOT _file-name BEGINS "SYS" NO-LOCK:
DISPLAY _FILE._file-name _file-number.
END.
Since OpenEdge 10.x a padding percentage option has been introduced that will modify the SQL-WIDTH or the MAX-WIDTH attribute to make it xx% more than the longest content of any offending field. Where xx% is the padding percentage entered.
Depending on the Option selected, you may be asked for the recid.
<recid>: (recid or all)?
Which is an element you will be either aware of particular to the Option selected or not, in which case scan all recids
When a specific recid is entered, you will be asked for the Storage Area number for that recid
<area>: (Area number or all)?
The Storage Area Number will be for the storage area that houses the table that the named recid belongs to.
Knowing the table number, the related Storage Area number can be found through the following simple 4GL query:
FIND _Storageobject WHERE _Storageobject._object-type = 1 AND
_Storageobject._object-number = <tablenumber>.
DISPLAY _Storageobject._area-number.
Finally the verbosity level
<display>: (verbose level 0-3)?
verbosity levels above 1 are only of use if explicitly instructed by development.
The usage of this tool is very helpful, for example, when trying to determine if the SQL Width of a given field has been exceeded and we need to repair this SQL width. Running Option 1, against all tables and all. areas with verbosity level 1, will generate a report where the problem fields are highlighted with double asterisk **. Then Option 2 can be run against specific tables to fix the field widths.
.