Table of Contents:

    Copy descriptions between documentations

    Applies to: 6.x, Article available also for: 9.x (current), 8.x, 7.x, 5.x
    You are looking at documentation for an older release.
    Switch to the documentation for Dataedo 9.x (current).

    There are many reasons to copy descriptions from one documentation to another.

    You may want to create a duplicate documentation for your database as it was on a specific date (as an archive). Or maybe you finished developing a major change in your database and after moving shanges from development to production database you also want to copy descriptions.

    For these scenarios we've created a script that copies descriptions between documentations in one repository.


    Script is a set of stored procedures that you install on the Dataedo repository database.

    The procedure:

    1. Copies object (table, view, trigger, procedure, function, column, relation, unique key, parameter) desciptions and titles.
    2. Does not copy schema (tables, columns etc.). You need to make sure that database schema was imported (and updated) prior to running script.
    3. Optionally overwrites user-defined objects: relations, unique keys, modules, ER diagrams.


    To install stored procedures download script below. Then connect to Dataedo repository database (SQL Server) and execute the script.

    Download script with procedures

    This should create 3 stored procedures in your database:

    Running procedures

    This sample code will copy descriptions from documentation titled My Database (Dev) to the one titled My Database (Prod).

    EXECUTE dbo.copy_doc 
    @src_title='My Database (Dev)',
    @dst_title='My Database (Prod)',

    Alternatively, you can call the procedure with documentation IDs (you can find them in databases.database_id column):

    EXECUTE dbo.copy_doc_by_id 

    Two modes

    Copying descriptions only

    If you set @create_user_obj parameter to 0 procedure will only copy descriptions and titles.


    Copying descriptions and user defined objects

    If you set @create_user_obj parameter to 1 then procedure will overwrite all user-defined objects relations, unique keys, modules, ER diagrams.


    Note: After running procedure hit Refresh view button on Dataedo ribbon.

    Copying entire documentation

    If you want to create a duplicate of your documentation, first update your existing one (so that it matches the actual database), then import the same database as new documentation, then run the script above.

    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).