While trying to check some ORACLE configuration files manually I
decided to write a Vedit macro to support me a bit.
PARCHECK checks/compares parameters and their values in two files and
makes them visible and easily editable.
Example:
db_files = 20
# db_file_multiblock_read_count = 8 # SMALL
# db_file_multiblock_read_count = 16 # MEDIUM
db_file_multiblock_read_count = 32 # LARGE
# db_block_buffers = 200 # SMALL
# db_block_buffers = 550 # MEDIUM
db_block_buffers = 3200 # LARGE
# shared_pool_size = 3500000 # SMALL
# shared_pool_size = 6000000 # MEDIUM
shared_pool_size = 9000000 # LARGE
log_checkpoint_interval = 10000
processes = 50 # SMALL
# processes = 100 # MEDIUM
# processes = 200 # LARGE
You have two of those configuration files opened in Vedit, containing a bunch
of parameter-value pairs to be compared/checked.
Unfortunately the files may not be ordered somehow, may not be of
equal length and may contain more or less comment lines...
The (default, but changeable) syntax is here:
# comment line
parameter_name = value
parameter_name=value
(You can define the '#' and the '=' within the macro.)
Now placing the cursor on a parameter in one file and executing the
macro does the following:
- The two files are shown side by side (if not already).
- The current parameter is searched in the second file.
- If not found anywhere: Error message
- If found: check the value
- if the values are the same in both files: highlight it green
- if the values are the different: highlight it red
- if not found as active parameter, but only as comment: Message
Having the macro assigned to a key it's easy to walk through the
parameters and do the checking.
Of course it's not limited to ORACLE parameter files!
http://ziemski.privat.t-online.de/vedit/macros/parcheck.vdm
Christian