Skip to main content
Skip table of contents

Refreshing the test database

When a test environment is required to mirror what is currently in the production (Live) database, a backup of the live database should be restored over the test database.

Before refreshing the test database

To follow the instructions on this page, you need to:

  • Be familiar with the PayGlobal environment.
  • Be able to backup and restore a database using SQL Server Management Studio.
  • Host your PayGlobal solution in-house.

For our Online customers, PayGlobal Support will action the refresh for you.  Requests for Online test database refreshes should be sent to payglobalsupport@myob.com - Online test database refreshes are typically completed overnight, ready for the next morning.


1. Make backups and restore your test database from live
  1. Make a backup of your test and live databases.
  2. Restore the live database backup onto your test database.

For information on backing up and restoring your databases, see Microsoft SQL Server 2022 Documentation – Restore a Database Backup Using SSMS.

2. Secure the test database
To secure the Test database you will run HR.exe with the /initsql switch. It is important to use the HR.exe from the latest version of the PayGlobal application that you have installed.
  1. Click the Windows Start button to see the menu.
  2. Click Run.
  3. Type the Hr.exe path into the Open field in the Run box. If the Hr.exe path contains spaces, you must enclose the path and filename in double quotes.
  4. After you add the Hr.exe path, type a space, and then type /initsql. For example:
  5. Click OK. The Company Setup form is displayed.
  6. Enter the following details:
    • Path Type the path of your existing company Data folder – this folder will hold the data for the company.
      You can check the company Data folder location that is specified in the Hr.ini file. The Hr.ini file is located in the same folder that you launch StartPayGlobal.exe from.
    • Database type SQL Server.
    • Country Select the relevant country.
    • Server name The SQL Server where the database will be created and stored. This is also known as the SQL server instance name.
    • PayGlobal user By default this is PGUser_[Database Name]. The PayGlobal user must be unique to each database. If the SQL Server uses Windows Authentication, you can leave the PayGlobal user field blank.
    • Database name Type a name for the database that will be created on the SQL Server, for example, TreeTopsESS.
    • Restore login – By default this is PGRestorer_[Database Name]. Each database on your SQL Server needs a unique Restorer login.
    Not all fields need to be completed, just the fields highlighted below. It will look similar to the following screenshot.
  7. Once you have completed the settings on the Company Setup form. Click on Secure existing. You'll see a warning message:
  8. Click Yes to continue securing the database.
  9. You will get a message at this point if you have not previously performed any secure or restore actions in this session:
  10. Select the authentication option that was used when SQL Server was installed. If this was SQL Server authentication, type in the sa password.

  11. Depending on the SQL Server authentication, you may be prompted to Confirm the following message, click Yes:

  12. If the specified database directory does not exist, then the following message appears:
  13. Click Yes to create the directory. You'll see an information message:

  14. Click OK to return to the Company Setup form.

  15. Click Close.

  16. A Confirm message appears to Exit initialisation form? Click Yes.

    After you upgrade or restore an SQL Server database, we recommend that you restart the SQL Server Service to free system resources.

3. Confirm Hr.ini details

After you restore and secure the database, you will need to confirm the database version and check the Test company is set to the correct version in the Hr.ini file.

  1. Make a backup copy of the Hr.ini
  2. Open the HR.ini
  3. Checked the Live company RunVersion used and update the Test company RunVersion so that it is using the same version.
  4. Close and save the Hr.ini file.

  5. Once you have confirmed the Test database has been successfully refreshed you can delete the copy of the Hr.ini file you backed up in step 1.

4. Import reports

When you installed the new version of PayGlobal, the Installation Wizard copied a Report catalogue (tmrr.zip) to the PayGlobal executable folder. You now need to import the new report catalogue into your new database.

  1. Login to Payglobal.
  2. In the PayGlobal Tree, navigate to the Reports | Import Reports run command.
  3. Double-click Import Reports. The Import Reports box is displayed.
  4. Click Import.
    The Open box displays the contents of the PayGlobal application folder. If the PayGlobal application folder is not displayed, then navigate to it.
  5. Double-click the report ZIP file, tmrr<version number>.zip. For example, Tmrr4.8.0.0.zip

    The PayGlobal executable folder can contain several versions of the ZIP files, but you must select the ZIP file that corresponds to the new version number.

    If you select a file other than the report catalogue, then the following error appears: ”Authenticity failure: Please obtain an ORIGINAL report catalogue archive”.

    The Import Reports box is displayed. PayGlobal extracts the reports from the ZIP file to the Rept folder in the executable folder. The following Information message is displayed: Importing completed.

  6. Press Enter or click OK to return to the Reports folder.

  7. Double-click Update Report Definitions Table. The following Information message is displayed: Report Definitions Table updated.

  8. Press Enter or click OK to return to the main PayGlobal window.
5. Update file paths

When you refresh test or move a database to a different server, you need to update the following data paths and file names.

This step is important so that the payroll users do not accidentally import or overwrite data that relates to the Live database.

If you use any of the following functions, navigate to the applicable fields and update them:

  • Direct Credit file - Administration | Modify Company Settings | Payroll | Banking | Banking Details | Direct credit file name field.
  • General Ledger file - Administration | Modify Company Settings | Payroll | Processing | General Ledger | GL file name field.
  • Exporting Rostering data from PayGlobal - Administration | Modify Company Settings| Rostering/T&A | Rostering| Export to Payroll | Data path field.
  • Exporting Rostering Job costing data from PayGlobal - Administration | Modify Company Settings | Rostering/T&A | Rostering| Export to Job Costing | Job data path field.
  • Exporting T&A data from PayGlobal - Administration | Modify Company Settings | Rostering/T&A | T&A |Export to Payroll | Data path field.
  • Exporting T&A Job costing data from PayGlobal - Administration | Modify Company Settings | Rostering/T&A | T&A |Export to Job Costing | Job data path field.
  • Importing Clock data - Time & Attendance | Clocks | Add or Edit | Import Details | Local import path field.
  • Importing Rostering Timebands into PayGlobal - Administration | Modify Company Settings | Rostering/T&A | Rostering| Import Timebands | Timeband data path field.
  • Importing T&A data into Payroll - Payroll | Payroll Import Types | Add or Edit | Details | TA data path field. Also in Administration | Modify Company Settings | Payroll | Import from T&A | Import TA| TA data path field.
  • Importing T&A Timebands into PayGlobal - Administration | Modify Company Settings | Rostering/T&A | T&A |Import Timebands | Timeband data path field.
  • Message Diversion Rules - Administration | Messaging | WorkGroups | Add or Edit | MessageDiversion Rules | Add or Edit | Message Diversion Actions | To path field.
6. Check Windows security

PayGlobal users must have Windows Security permissions that allow them to access the PayGlobal Data folder and database files.

Using Windows Explorer, check that users have the following minimum folder permissions:

  • Read access to the Test Company Data folder and all its sub-folders, except for the following sub- folders that need Read and Write access:
    • Log
    • Perm
    • Temp
  • Read and Execute access to the folder that contains the PayGlobal executables.
The Test Company data and PayGlobal application installation folders can be found in the Hr.ini file (see step 3).
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.