Mass Update the OrderTrac Database

Mass update the OrderTrac database

There may be a time when you need to run a custom update script to quickly update a large amount of data in the database. Only do this if OrderTrac support has provided or approved the script to run.

 Warning! Running a script that has errors in it can cause irreversable damage to the database! Make a backup before proceeding. 

 

Be sure to make a backup of your database before proceeding. To make a backup, go to File > Preferences and click the Backup tab. Click ‘Backup Now’ to back up the database to the specified location.

  1. Open the database administration tool from the following location: Start > All Programs > PostgreSQL 9.3 > pgAdminIII
  2. Double click ‘PostgreSQL 9.3 (localhost:5432)’ to open the database server.
  3. Click the ‘+’ by ‘Databases’
  4. You should see at least 2 databases: ordertrac and postgres
  5. Click ‘ordertrac’
  6. If you are prompted for a password, enter ‘ordertracsql’
  7. Click the Tools menu at the top and select ‘Query Tool’
  8. Enter your script into the selected white text area.
  9. Click the Execute pgScript button (button on the toolbar with green triangle and letters pgs )
  10. The database has been updated. Open OrderTrac and verify data has been updated accurately.
  11. If you have any more scripts to run, repeat steps 8-10.

The Ordertrac Database has now been updated! If any issues occurred during this process, restore your database from the backup you made. To restore, go to File > Preferences, and on the Backup tab, click the ‘Restore…’ button to restore the database from the backup you created earlier.