Creating the snapshot

DataMajor works on a COPY of your data, this copy needs to be updated on a regularly basis via a job in cron. When first installed support will have setup the cron job for you.

Some of the common cron settings are:

  5 0 * * *  /usr/local/bin/vet -p wdb >/dev/null #Every morning at 0:05
  5 0 * * 0  /usr/local/bin/vet -p wdb >/dev/null #Once a week (Sunday)
  5 0 1 * *  /usr/local/bin/vet -p wdb >/dev/null #Once a month (on the 1st)

If you need to re-build the snapshot before the automatic run you can do this manually. The re-build can take a little while!!.

Use the stand alone utility 'wdb', at an OS prompt enter:

vet -p wdb

Use the Automation Manager within premvet to alter and adjust the snapshot times rather than editing cron jobs manually.

This will use the default settings (include all animals and covers five years of information). You can specify some options to wdb, these are:

-O directory Where to send output files (Default /tmp)

-Y x Where x is number of full years to include in clinical history. (default is 5 full years)
-M x Similar to -Y above except this specifies months (Between 12 and 300) (use either -Y OR -M)
-C name What to call the database (default is premvet) - See Note below.
-P number When merging multiple databases you should use the 'pass' option.
Pass 1 - Setup the system ready for sites
Pass 2 - Add data from premvet files
Pass 3 - Create the SQL files (See example below)

-f what
Where what is:
1 CSV (No longer used see Exporting Data).
2 Fixed Length
3 MySQL (Default)

-o option nodead Exclude Dead Animals
debug Show progress when running and leave temporary files on the disk.
pdsa Include PDSA specific data
office Internal use only
dofull Create (dofull) or do NOT create (nofull) the full text index. (default is dofull).
nofull
notext The system will ignore unpriced lines.
noopt Optimise (doopt) or do not (noopt) the tables on a re-build. (Default is noopt)
doopt
ubys Used when creating multiple databases. If specified it will include an entry for the user at every site he/she works at. The default is just to include the user once per cluster site.
m251 Analysis code 251 (User Defined Files) - these will be treated as comments and be appended to preceeding line. Otherwise they will always be separate lines and coded as such.
incnoclin Will include animals with no clinical records.
compress Will run the myisampack utility to compress the database (Default is OFF)
noattach Do you want (attach) or do not want (noattach) attachments processed (Default is attach)
attach
oldclint Keep the database compatible with older version of Premvet.
petaid PDSA PetAid Specific options.
nogold Stops the system from joining lines done by the same user on the same date for the same animal together.
convert Set the options to be -Y 20 -o nofull -o incnoclin -o noattach

For example, to run the export for 10 years and exclude dead animals you would enter:

vet -p wdb "-Y 10 -o nodead"

Remember the more data you extract the more disk space that will be required so ensure you have the disk space.

There is also an option on the utility menu to do run wdb, as well, when run from the Utility menu you cannot alter any of the defaults.

Note: You can use the -C option to set the name. However, it is much easier to set in one of the start up files:

SQLD="name" ; export SQLD

Whatever is set in SQLD will be used automatically.