Sw4   >   Sql   >   Moving Data

Moving Data

You can use the DBAdmin tool for moving data from one database to another database provide that all of the schemas are in your StudioWorks app for the data you want to move. The meta-data must also be up to date for the schemas.

The steps are as follows:

  1. Create the new database which you want to move the data to. The database could be a new Omnis data file, a FrontBase database, MySQL database or some other RDBMS which the DBAdmin tool is able to work with.
  2. If the RDBMS supports users, add the superuser user _SYSTEM and the tablesowner user DBADMIN with the usual StudioWorks password.
  3. Programmer Menu > Rebuild Lists in case there have been any changes to SQL classes or meta-data.
  4. Programmer Menu > Database Administrator to open the DB Admin window.
  5. Click the Session Manager link in the top right corner of the window.
  6. Create and save a session which is mapped to the your new database. Save and then Test the session to make sure StudioWorks is able to logon to the database with the information you entered.
  7. If the source database is not the one you are currently logged onto with your StudioWorks app you will need to create a second session mapped to the old database. Save and Test the second session to make sure StudioWorks is able to logon to the source database.
  8. Close the Session Manager window.
  9. Click the Data Mover tab in the DBAdmin window.
  10. Set the From session droplist to the source database.
  11. Set the To session droplist to the target database.
  12. Select the schema tables in the From list which you want to move to the target database.
  13. Click the Sync Database button. The DBAdmin tool will loop through the selected schemas and create the tables in the target database.
  14. Click the Move Data button. The DBAdmin tool will loop through the selected schemas and move the data from the source database to the target database.