Mass Update the OrderTrac Database

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 can cause irreversible damage to the database. 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 PGAdmin III. 
    On Windows 7: Click Start > All Programs > PostgreSQL 9.3 > pgAdmin III
    On Windows 10: Click Start > PostgreSQL 9.3 > pgAdminIII, 
  2. Double click ‘PostgreSQL 9.3 (localhost:5432)’ to open the database server.
    – If you are prompted for a password, enter ordertracsql

  3. Click the ‘+’ by ‘Databases’
  4. You should see at least 2 databases: ordertrac and postgres
  5. Click ‘ordertrac’  
    – If you are prompted for a password, enter ordertracsql
  6. Click the Tools menu at the top and select ‘Query Tool’, or click the Query tool icon from the top menu
  7. Enter your script into the selected white text area as shown below where the green text is
  8. Click the Execute pgScript button (button on the toolbar with green triangle and letters pgs )
  9. The database has been updated. Open OrderTrac and verify data has been updated accurately.
  10. 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.