Reload descriptions from database

Applies to: Dataedo 10.x versions, Article available also for: 24.x (current), 23.x
You are looking at documentation for an older release.
Switch to the documentation for Dataedo 24.x (current).

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. Clear a custom field in repository

If you also want to import extended properties as described here, you may also want to clear the corresponding custom fields.

First, find out the name of the custom field you want to clear. To do this, open the custom fields window and double click on a field. You will see the field name in the bottom of the window:

Custom field name

In the script above, replace description = '' with the field name (field1 = '' in our example) and run it.

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