Table of Contents:

    Copy descriptions between repositories

    You are looking at documentation for an older release.
    Switch to the documentation for Dataedo 9.x (current).

    You can copy documentation descriptions, modules, diagrams or user relations from one repository to other repsitory. This might be useful if you are using dev, UAT and prod environments or have multiple instances of the same or similar database.

    For these scenarios we've created a script that copies descriptions between documentations - either in the same, or in different repositories.

    The script won't work for file repositories.

    Download script

    To download, right click on the link below, and save:

    Download the script

    What is copied

    The script copies:

    • Object (table, view, trigger, procedure, function, column, relation, unique key, parameter) desciptions, custom fields and titles.
    • Optionally overwrites user-defined objects: relations, unique keys, modules, ER diagrams.

    The script does not copy:

    • schema (tables, columns etc.).
    • cross database relations
    • dependencies
    • custom field settings
    • manual tables

    You need to make sure that database schema was imported (and updated) prior to running script.

    Two modes

    Copying descriptions only

    If you set @synch_user_obj parameter to 0 procedure will only copy descriptions, custom fields and titles.

    Copying descriptions and user defined objects

    If you set @synch_user_obj parameter to 1 then procedure will overwrite all user-defined objects relations, unique keys, modules, ER diagrams. Note that this will remove from the destination repository user defined object missing from source repository.

    Running the script

    The script is run on Dataedo repository database. You can connect to it through SQl Server Management studio.

    Before running:

    1. Replace [source_repository] and [destination_repository] in the entire file with your source and destination repository database. If you want to copy description within a repository, replace both with the same database name.
    2. Change the @src_title and @dst_title variables to source and destination documentation names.
    3. Make sure the custom field names and settings on both sides are the same if you want them to be copied.
    4. Set the @synch_user_obj to 0 if you only want to copy descriptions of database objects, or 1 if you also want to copy user-defined objects.

    Documentation names must be unique within repositories. Both documentations must exist. Script will not work if names can't be matched.

    Found issue with this article? Comment below
    There are no comments. Click here to write the first comment.

    By continuing to use our website, you consent to the use of cookies in accordance with our Privacy Policy (updated 28-04-2020).