Make a note of the output of onstat -d to monitor the effect of your actions.
Ensure exclusive access – preferably with Informix transaction logging off.
Informix transaction logging off: ondblog nolog <database name> then onbar -b -F
As always, make sure you’ve got a decent backup before you start.
Log into Sage – into the Company you need to reduce the space of. Exit to shell. You should now be in the company directory by default (check System Manager > System Administration > Company Management > Working Directories).
Test a small table first, e.g.:
unload st_warehouse > stkwhm.unl
Now make sure the unload file (in this case stkwhm.unl) contains the field names at the top and data below it. Then do
load -cD -x 10000 st_warehouse < stkwhm.unl
The ‘10000’ can be adjusted according the the number of lines loaded at a time – increase for larger tables.
Be sure to update statistics once done! E.g:
update statistics for table stkwhm;
And lastly, remember to switch Informix transaction logging back on.
Informix transaction logging on: ondblog buf <database name> then onbar -b -F