Upgrading databases

Before upgrading a database, make sure you have updated your model's upgrade file.

To upgrade a database:

  1. In NexJ Studio, click the arrow next to the Run Tool button and select Data Load Tool.
    The Data Load Tool opens.
  2. In the Model section, select the model you want to use:
    • For the currently loaded model, shown in the label, select Current.
    • For a base model in your Model Library, select Base Model and select one of the available models from the drop-down.
    • For a previously published model in your file system, select Published Model JAR and click the Browse button to locate the published model.
  3. If you want to use a test environment, select the Test check box.
  4. Specify the server and connections that you want the application to support when running with this database.
    Note: If you are using the current model, then the fields allow you to select from among the environment, server, and connection files within the model. If you are using a base or published model, then your choice is limited to only those server and connection files contained in your global environment folder.
    1. In the Server field, specify either the server or environment file that contains the server configuration information you want to use when upgrading the database. If you specify an environment file, then it will also include the connections information.
      Note: You must choose an environment or server file that uses IDs with permissions to change the database table structure, such as DBAdmin. This is necessary because the upgrade command overwrites existing databases.
    2. In the Connections field, specify the connections file that you want to use when upgrading the database. If you previously selected an environment file in the Server field, then it already has the connections information, and this field becomes inactive.
  5. In the Command field, select upgrade.
  6. In the Data Source field, select the desired data source. Selections are limited to the model's relational data sources.
  7. Click Run.
  8. If using a non-test environment, a dialog opens, asking you to confirm that you want to overwrite the data. After confirming that it is acceptable to do so, select the check box and click OK.
  9. Optional: Publish the model from the Model Library. Publishing the new version before making any other changes creates a reference version for future upgrades. It also ensures that you have a backup working model if future changes make the model unusable.