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