Differences between revisions 4 and 7 (spanning 3 versions)
Revision 4 as of 2006-07-05 05:33:55
Size: 1762
Editor: yoch
Comment:
Revision 7 as of 2007-07-03 06:53:47
Size: 2189
Editor: yoch
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
'''updateccdb''' utility works for current company only. You need to change company using '''conset -c''' to update different company.
 * '''updateccdb -a''' should be added to crontab list
. It will check all tables for new/changed fields to avoid invalid read/write request and analyze tables (-a option) to improve performance.
'''updateccdb''' utility works for current company or for company specified with -C option.
 * '''updateccdb -a''' should be added to crontab list to run every day at ni
ght time. It will check all tables for new/changed fields to avoid invalid read/write request and analyze tables (-a option) to improve performance.
Line 8: Line 8:
 * If any new fields have been added to the '''Company''' or '''Branch''' record, corresponding tables should be updated manualy using sql prompt: (ALTER TABLE ''TableName'' ADD ''FieldName FieldType;''). Also there are some issues with '''glcont''' record - it can be updated using standart '''updateccdb''', but conset to another company will not work anymore).
Line 11: Line 12:
updateccdb -r -o oldName -n newName -f fileName|All #-f All will rename columns for ALL datatypes. updateccdb -r -o oldName -n newName [-f fileName] #if no filename specified, it will rename columns for ALL datatypes (not recomended) because does not make too much sense.

Maintaining SQL-based Clients (updateccdb utility)

updateccdb utility works for current company or for company specified with -C option.

  • updateccdb -a should be added to crontab list to run every day at night time. It will check all tables for new/changed fields to avoid invalid read/write request and analyze tables (-a option) to improve performance.

Below are a few things you should consider before installing or updating any new sql programs:

  • If any new fields have been added to the Company or Branch record, corresponding tables should be updated manualy using sql prompt: (ALTER TABLE TableName ADD FieldName FieldType;). Also there are some issues with glcont record - it can be updated using standart updateccdb, but conset to another company will not work anymore).

  • If any new fields have been added to any record, updateccdb should be run. To ensure that the programs refer to the correct fields it is good idea to run updateccdb every time when new programm getting copied to customer site.

  • Programmers should be very wary of renaming fields, especially if the data in those fields are to stay in use. In this case utility would need to be run to ensure the field renaming happens correctly.

    updateccdb -r -o oldName -n newName [-f fileName]  #if no filename specified, it will rename columns for ALL datatypes (not recomended) because does not make too much sense.
  • If the field is just being renamed as it is being taken out of use or used for something else (if data should not be transfered from old field to new one), updateccdb will leave old one in the database and create column for new one (if the new one is not one of those FILL field). To reclaim disk space you need to run updateccdb with -d option (it will prompt for confirmation for each field being removed).

  • FOR PROGRAMMERS: If for some reason we will need to change internal database type (if updateccdb without argument failed, ...) we should run:

    updateccdb -c -o oldtype #we can get oldtype from updateccdb log file


CategorySql

SqlMaintenance (last edited 2013-09-18 06:09:34 by localhost)