Question [SOLVED] Dbtool - does the 2. SQL Width Scan w/Fix Option only fix the tables with errors?

Hello,

when I run the dbtool program it scans the tables for errors:
2. SQL Width Scan w/Fix Option only fix the tables with errors

I can specify the table I know, but in the past we used to run this on all tables.

Here is an example (using Dbtool with verbose mode 4):

Current max fieldLen for auditlog (61):
Fld# SQLWidth Max Width ArrayWidth Max ArrayWidth ERROR NAME
---- -------- --------- ---------- -------------- -------- ----
2: 16 7 au-file
3: Date 0 au-date
4: 16 8 au-time
5: 152 126 au-user
6: 140 16 au-index
7: 56 54 au-log1
8: 92 78 au-log3
9: 32 14 au-log4
10: 32 18 au-log5
11: 32 0 au-log6
12: 32 0 au-log7
13: 32 0 au-log8
14: 32 0 au-log9
15: 32 0 au-log10
16: 32 0 au-log11
17: 32 0 au-log12
18: 32 0 au-log13
19: 32 0 au-log14
20: 32 0 au-log15
21: 32 0 au-log16
22: 32 0 au-log17
23: 32 0 au-log18
24: 32 0 au-log19
25: 32 0 au-log20
26: 58 56 au-log2
27: 50 58 *** au-olog1

The dbtool offers the fix with padding.

<connect>: (0=single-user 1=self-service >1=#threads)? 1
Padding % above current max: 5
<table>: (Table number or all)? all

Will this padding be applied only to table 61 as in the example above?

Thanks,
Richard
 

Osborne

Active Member
To only apply for table 61 you need to enter 61 not all for <table>

It has been quite a few years since I used DBTool to adjust padding but the last time I did I recorded the screen and if any help have listed:

Code:
                     DATABASE TOOLS MENU - 10.2B
                     ---------------------------

                1. SQL Width & Date Scan w/Report Option
                2. SQL Width Scan w/Fix Option
                3. Record Validation
                4. Record Version Validation
                5. Read or Validate Database Block(s)
                6. Record Fixup
                7. Schema Validation
                9. Enable/Disable File Logging
                10. Index space validation
                11. Index space fixup

                Q. Quit

                Choice: 2

        <connect>:    (0=single-user 1=self-service >1=#threads)? 1

        Padding % above current max: 10

        <table>:      (Table number or all)? 42

        <display>:    (verbose level 0-3)? 0


 Total records read: 5987

 SQLWidth errors found: 2, Date errors found: 0

 SQLWidth errors fixed: 2
 
To only apply for table 61 you need to enter 61 not all for <table>

It has been quite a few years since I used DBTool to adjust padding but the last time I did I recorded the screen and if any help have listed:

Code:
                     DATABASE TOOLS MENU - 10.2B
                     ---------------------------

                1. SQL Width & Date Scan w/Report Option
                2. SQL Width Scan w/Fix Option
                3. Record Validation
                4. Record Version Validation
                5. Read or Validate Database Block(s)
                6. Record Fixup
                7. Schema Validation
                9. Enable/Disable File Logging
                10. Index space validation
                11. Index space fixup

                Q. Quit

                Choice: 2

        <connect>:    (0=single-user 1=self-service >1=#threads)? 1

        Padding % above current max: 10

        <table>:      (Table number or all)? 42

        <display>:    (verbose level 0-3)? 0


 Total records read: 5987

 SQLWidth errors found: 2, Date errors found: 0

 SQLWidth errors fixed: 2

Thanks, that I know, I tried it, so it works. My question is about the padding for ALL tables, how does it work? Does it touch all tables, or just the ones where errors were found?
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
This question can potentially have many different answers.

For any question that can be paraphrased as "how does OpenEdge work?", it is important to know which release you are using.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
The KB article and the docs suggest that any table whose SQL width is below width plus padding will be adjusted upward to the new minimum, regardless of data values.

But I suggest you set up a test database in your environment and verify for yourself. Inspect the state of the database beforehand and try to predict the results, then run dbtool option 2 and see if the results match your expectations.
 
I ran the dbtool prior to fixing errors with verbose 4, the ran the fix, this seems to only do the padding (in this case I did 10%) with the "all tables" option. Compare the two log files side by side using "sdiff" as attached.

SQLWidth errors found: 0, Date errors found: 0 SQLWidth errors found: 0, Date errors found: 0
Width of array field errors found: 2. <

Current max fieldLen for mahead (472): Current max fieldLen for mahead (472):
Fld# SQLWidth Max Width ArrayWidth Max ArrayWidth ERROR Fld# SQLWidth Max Width ArrayWidth Max ArrayWidth ERROR
---- -------- --------- ---------- -------------- -------- ---- -------- --------- ---------- -------------- --------
.
.
. no changes here.

29: 364 156 145 130 29: 364 156 145 130
30: 364 26 30 26 30: 364 26 30 26

Before fix Changes after fix
==================== ===================================================================
31: 364 52 132 130 ### | 31: 364 52 145 130
32: 364 46 132 130 ### | 32: 364 46 145 130

Thank you all for you time.
Richard
 
Top