Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

REPLICATE (Project Definition)

  • Last UpdatedJan 30, 2025
  • 4 minute read

Function:

Saves the Project in a file so it can be replicated.

Description:

This command can be used:

  • To replicate the complete Project, including all data (except the ISO subdirectories), to a new Project. The administrator use the REPLICATE command to do this.

  • To replicate the structure of a Standard (non-Global) Project to file. The administrator use the REPLICATE SYSTEM command to do this.

  • To replicate the structure of a Global Project to file:

    • Use REPLICATE SYSTEM to replicate the structure of the Project at the current Location.

    • Use REPLICATE SYSTEM STANDALONE to replicate the Project as a Standard Project, omitting references to Locations and communications.

    • Use REPLICATE SYSTEM SATELLITE at a Satellite in a Global Project to replicate the Project as represented in the local System DB. That is, the local information about Users, MDBs and Communication Events will be stored, but not the elements which can only be created and deleted at the Hub.

The file created by the REPLICATE SYSTEM command can be run as a macro in AVEVA Administration. The REPLICATE SYSTEM command causes AVEVA Administration to scan the System DB (and Global DB) and output to the named file all the commands necessary to recreate the Project structure.

In a Global Project, the file created contains macros that should be run in two stages:

  • The first stage creates the basic Project structure and generates the Satellite Locations. The macro then terminates.
    The administrator should then edit the remainder of the file into a new file to be run as a separate macro, which should not be run until Satellites have been created and initialized.

  • The second stage allocates DBs to Satellites and makes the relevant DBs Primary at Satellites.

Before the administrator runs the macro to recreate the Project structure, make sure that suitable Project variables have been defined. In a Global Project, this must include transfer directories for each Satellite. For more details, refer to TRANSFER (Global Project Administration).

Note:
It is strongly recommended that this is only done in a newly created Project, otherwise results could be unpredictable.

Examples:

REPLICATE XYZ

Copies all data from the current Project directories into directories for a Project named XYZ. In a Global Project, a new UUID value for the Project is set (stored in ADUUID of /*GL; this is because each Project requires a unique value of this attribute. This is used by Global daemons to distinguish between Projects at the same Location).

REPLICATE F123

In this case the long Project identifier (%ABC000ID%) has been specified. This will replicate to the underlying Project path of which this variable is associated, i.e the path that %ABC000% maps to.

Note:
A new UUID value may be queried at /*GL using Q NEWUID. The administrator may use this value to set ADUUID manually if a Global Project has been copied externally to the AVEVA base product.

If ADUUID is left unchanged, there may be data corruption since daemons may send data to the wrong Project.

The ADUUID attribute is essential to distinguish between Global Projects. Each Project should have a unique value of ADUUID. This value is what the Global daemon uses to select the correct Project.

For example if the User copies a Project using the file system, rather than by using the REPLICATE command, then the ADUUID attribute in both Projects will be the same, and this may cause commands from one Global Project to be received by the wrong Global Project.

It is therefore essential that the AVEVA base product administrator resets the ADUUID attribute of the Project. The NEWUID attribute provides a way to get a new value, since it makes a 'UUIDGEN' query. The administrator can then use the result of the NEWUID attribute query to set the ADUUID attribute.

Note:
NEWUID is not an attribute of the DB. It is a pseudo-attribute provided for the purpose of generating a new UID value for ADUUID.

/*GL

!N=NEWUID

ADUUID=$!N

REPLICATE SYSTEM file name

Generates macro to replicate the Project structure. If the current Project is Global, the macro will include Location and Communication details.

REPLICATE SYSTEM /file name FILENUMBERS

Generates macro in a file /file name to replicate the complete data in the current Project, maintaining the same file numbers.

REPLICATE SYSTEM /file name OVERWRITE

Generates macro to replicate the complete data in the current Project. The data will be saved in the named file. If the file exists, it will be overwritten.

REPLICATE SYSTEM STANDalone file name

Generates macro to replicate the Project setup for a stand-alone (non-Global) Project. This omits all references to Locations and Communication elements.

REPLICATE SYSTEM SATELLite file name

Generates macro to replicate the Project setup for a Satellite of a Global Project. Outputs the commands for building the System DB only, not the Global DB, that is, Teams, DBs and Locations are omitted.

Command Syntax for a Standard (Non-Global) Project:

>-- REPLICATE -+- code -----------------------------.
               |                                    |
               ‘- SYSTEM file name -+- FILENumbers -|
                                    |               |
                                    ‘---------------+- OVERwrite -.
                                                    |             |
                                                    ‘-------------+-->

Command Syntax for a Global Project:

>- REPLICATE -+- code ------------------------------------------------.
              |                                                     |
              ‘- SYSTEM -+- STANDalone -.                           |
                         |              |                           |
                         |- SATELLite --+-----------------------------|
                         |              |                           |
                         ‘--------------+- file name -+- FILENumbers -|
                                                      |               |
                                                    ‘---------------+- OVERwrite --.
                                                                   |             |
                                                               ‘--------------+-->

The FILENumbers option maintains the same file numbers.

The OVERWRITE option overwrites an existing file of the same name.

TitleResults for “How to create a CRG?”Also Available in