Create copy script

The copy script that can be created on the basis of a database is used for the data transfer of all tables between two databases with essentially identical metadata structures.

Create copy script

  1. In the esdbm program window, click on Create transfer.

    A new tab, Transfer file, opens. The transfer file only contains the main node Transfer.

  2. Click on the Create copy script icon button in the toolbar of the Transfer file tab.

    The Create copy script dialog opens.

  3. In the Database area, select a database alias and activate the required options.

     

    Log in data

    An esoffice user login is required when a module is opened or a function that acesses an esoffice database is executed.

    The user requires 110 - Basic settings authorization.

    If you have successfully logged in to an esoffice database (alias) in esdbm, your log in data will not be requested again when you access the database alias again.

  4. Click on the OK button.

    The file selection window for saving the transfer file opens.

  5. Select a file path and enter a name for the transfer file and then click on the Save button.

  6. You can further edit the copy script by opening the saved transfer file using the File menu.

'Database' area

Alias

Primary database selection

 

The alias ESWin is entered as the Source alias by default. You can also select a different alias.

The database aliases shown are read out from the dbxconnections.ini file in the esoffice para directory. You can view / edit the database connections under Connection settings.

 

Log in data

An esoffice user login is required when a module is opened or a function that acesses an esoffice database is executed.

The user requires 110 - Basic settings authorization.

If you have successfully logged in to an esoffice database (alias) in esdbm, your log in data will not be requested again when you access the database alias again.

'Options' area

Empty tables before transfer

This option generates an SQL command before each table for the copy scriptthat deletes any existing data from the table.

Update data set

This option is only activated when the Empty tables before transfer option is not activated. It ensures that the Update existing data sets option is activated in every table of the copy script.

Also see Table node

Cancel transfer on error

This option ensures that the Cancel transfer on error option is activated in every table of the copy script.

Also see Table node

Format

Here you can choose whether the copy script is to be created for an MSSQL database or a Firebird database.

Extract from an example copy script

 

AutoCopy / Copy automatically

The Copy automatically (AutoCopy) option is set for the tables in the copy script. When this option is activated the table to be transferred will be copied exacltly (1:1) without all the fields being defined manually.

 

If you do not want to include some of the fields in a table in the copy, right click on the table and select Generate 1 to 1 field assignments in the context menu.

This adds all the fields in a table. You can now delete the unwanted fields to exclude them before the transfer.