Staging table naming

Is there a possibility to change the name of a staging table to bring it back in line with the changed name of an entity.

The web UI allows us to update names of entities, but not the name of the associated staging table. Can we use management studio to change the name directly in the database or is this going to break the system?

Thanks,

Peter

July 1st, 2013 5:13pm

There is a way to do this but you have to be very careful not to break the system.

For example, if you have an entity call Product Category and for some reason the staging table is called [stg].[Category_Leaf], you need to follow more or less these steps:

1) Update the [StagingBase] column on mdm.tblEntity (making a note of the old name) - e.g. from Category to Product_Category.

2) Find the associated tables in the stg schema and their dependencies

3) Rename the staging tables -  e.g., from [stg].[upd_Category_Leaf] to [stg].[upd_Product_Category_Leaf]

4) Rename the staging stored procedures -   e.g., from [stg].[upd_Category_Leaf] to [stg].[upd_Product_Category_Leaf]

5) Edit the associated stored staging stored procedures and update the broken references to the table(s) in the staging schema renamed in point 3. Please be careful when you do a replace, these stored procedures contain a combination of references to the staging tables that sometimes include and sometimes do not include square brackets around the object names -  i.e., '[' and ']'.

6) Rename and edit the staging error details view(s) and update the broken references to the table(s) renamed in point 3 -  e.g. [stg].[viw_Category_MemberErrorDetails] to [stg].[viw_Product_Category_MemberErrorDetails]

7) If the entity has business rules, you need to find the stored procedures that applies the business rules update the broken references to the table(s) in the staging schema renamed in point 3.

It is quite involved and, if you don't have to do it, it is perhaps better not to do it. But we had to do it and can think of several reason why this would be necessary.

P.S.: It will be great if this could be through web UI in one single step. I don't see why not.

Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2013 4:02am

Thanks for the detailed answer. Indeed something not to do in a hurry.

Kind regards,

Peter Jonckheere

July 2nd, 2013 12:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics