Documentation

Table of Contents:


    Reload descriptions from database

    2018-08-23
    Applies to: 7.x (current), Article available also for: 6.x

    Dataedo is a master data repository for all descriptions. Descriptions are imported to repository only at the first import of each element or when the description in the repository is empty.

    If for some reason you want to reload all the texts from the database, you need to clear them from the repository and perform a reimport from the database. Here is an instruction how to do this.

    This operation is irreversible and will remove all your previous descriptions.

    We strongly suggest creating a backup of your repository before attemping it.

    1. Clear existing descriptions in repository

    You can remove descriptions using an editor but if you want to do it for all of them at once, we advise you to execute SQL statements on your repository database. Copy the script below, replace documentation title with the title of your documentation (you can obtain it by selecting documentation, pressing F2 and copying the text) and execute the script.

    -- tables and views
    update tables
       set description = ''
      from tables t 
           inner join databases d on d.database_id = t.database_id
     where d.title = 'AdventureWorks'; -- your documentation title
    
    -- table and view columns
    update columns
       set description = ''
      from columns c 
           inner join tables t on c.table_id = t.table_id
           inner join databases d on d.database_id = t.database_id
     where d.title = 'AdventureWorks'; -- your documentation title
    
     -- primary and unique keys
    update unique_constraints
       set description = ''
      from unique_constraints c
           inner join tables t on c.table_id = t.table_id
           inner join databases d on d.database_id = t.database_id
     where d.title = 'AdventureWorks'; -- your documentation title
    
     -- tables relations
    update tables_relations
       set description = ''
      from tables_relations r
           inner join tables t on r.pk_table_id = t.table_id
           inner join databases d on d.database_id = t.database_id
     where d.title = 'AdventureWorks'; -- your documentation title
    
      -- triggers
    update triggers
       set description = ''
      from triggers tr
           inner join tables t on tr.table_id = t.table_id
           inner join databases d on d.database_id = t.database_id
     where d.title = 'AdventureWorks'; -- your documentation title
    
     -- procedures and functions
    update procedures
       set description = ''
      from procedures p 
           inner join databases d on d.database_id = p.database_id
     where d.title = 'AdventureWorks'; -- your documentation title
    
    -- procedure and function input/output
    update parameters
       set description = ''
      from parameters pp
           inner join procedures p on p.procedure_id = pp.procedure_id
           inner join databases d on d.database_id = p.database_id
     where d.title = 'AdventureWorks'; -- your documentation title
    

    2. Reimport schema

    Once your descriptions in the repository are cleared, you have to reimport database schema from the source database.

    To do this, choose Update documentation from the ribbon, enter connection details on the first screen, select Advanced settings option and check Reimport all included objects option on next screen. Yu can find more details here Reimporting all included objects.

    Confirm and finish the import.

    Once import is complete all descriptions will be reimported to your documentation.

    Found issue with this article? Comment below
    Comments (0)