EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB45270: How to perform multiple layers of dependency searches in order to remove dependent objects when trying to delete or remove objects in MicroStrategy Developer 9.x - 10.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This technical note lists the steps to perform multiple layers of dependency searches

There may be a scenario in which a specific object or objects are needed to be removed from use by a specific project.  An issue may arise in which these objects cannot be deleted or removed because dependencies exist for the specified objects.  When trying to delete the object from Developer, an error message appears stating that the object cannot be deleted because objects exist that depend upon the object that is trying to be deleted.  As a result, the object cannot be deleted until all dependencies are removed first.  After that, the object can then be deleted or removed from the project depending on the object itself.
 
The high level steps of this process include:
 
1.    Use specific techniques with the Search feature to find the dependent objects of the specific object trying to be deleted or removed
 
2.    Perform multiple layers of dependency searches on schema objects to find application objects that use them
 
3.    Delete the application objects that are dependent upon the schema objects, which are dependencies of the object trying to be removed
 
4.    For standard schema objects, unmap them from the tables that contain them -- if necessary
 
5.    For managed objects, navigate to the Administration menu, and select Project\Delete unused managed objects -- if necessary
 
6.    Update the project schema
 
7.    If normal logical table objects remain that are dependent upon the object trying to be removed from the project, then remove them from the project in Warehouse Catalog
 
8.    Update the project schema once more
 
9.  The object should be able to be deleted or removed from use by the project at or before this point, depending on the type of object, and how many dependencies it had
  
Please note that this procedure can be employed for many objects within Strategy.  The details below are meant to show a thorough walkthrough of how to find and remove dependents of a specific object in the recommended manner using dependent objects on a database instance as an example.  The numbering within the high level overview above does not necessarily correspond to the number of the detailed steps below:
 
The following example was performed in the Strategy Tutorial project with Strategy Developer.
 
1.    Connect to the desired environment and the desired project.  Click on the Search for Objects button as outlined below.
 
a)    Note that a project must be connected to in order for the Search for Objects feature to be used to find objects within a specific project, otherwise the search feature will most likely be searching for only configuration objects.
 
b)    Enable the Contains and Contained By tab in the search window, as well as turn on searching for Hidden and Managed Objects as shown below by navigating to the Tools\Options feature in the Search for Objects window.
 
 

ka04W000001Ev71QAC_0EM440000002Ca6.png

 
 
 

ka04W000001Ev71QAC_0EM440000002CaF.png

 
 
 

ka04W000001Ev71QAC_0EM440000002CaR.png

 
2.    Perform a search using either the Contains or Contained By tab, or a simple right-click, “Search for dependent objects" in order to return the dependent objects.
 
  

ka04W000001Ev71QAC_0EM440000002CZy.png

 

ka04W000001Ev71QAC_0EM440000002CZt.png

 
a)    In this example, the Contains tab is used to select the object to be removed using the drop down box.  The search should yield dependencies to this object so that they can be removed first, which will ultimately allow the desired object to be deleted.
 
b)    The "All of the selected objects" setting ensures that the search brings back only objects that are dependent upon the specific database instance that is added via the Add button. 
 
c)    When the Add button is selected, the desired object must be navigated to and placed in the search.  Once this is done it will show up within the Search for Objects window itself. 
 
d)    Lastly, the "Search for contained objects recursively" is selected to add an additional layer to the search.  This option will search for objects in reference to itself, which can return additional objects than when the option is not selected -- essentially, it enables a more exhaustive search.  The 3 screenshots below provide some more detail regarding this process.
 
 
 

ka04W000001Ev71QAC_0EM440000002Ca0.png

 
 
 
 

ka04W000001Ev71QAC_0EM440000002Ca7.png

 
 
 
 

ka04W000001Ev71QAC_0EM440000002Ca2.png

 
3.    Perform multiple layers of dependency searches on each schema object to determine what other objects (metrics, reports, documents, cubes etc.).  Objects that use schema objects as building blocks to construct their definition are referred to as application objects.
 
a)    An example below shows that a multi-layered dependency search for a logical table yields multiple schema objects.  The first schema object, Cost Target, is then used for a further dependency search.  One application object, a metric, and two schema objects, logical tables, is the result.  A dependency search is performed on the metric to determine if it is used in other application objects like reports or cubes.  Since no dependencies are found on the metric it can be deleted, and the Cost Target fact should no longer have any application object dependencies.  Cost Target could be unmapped from the two logical tables at this point if necessary.  After updating the schema, Cost Target would effectively be removed from the project.
 

ka04W000001Ev71QAC_0EM440000002Ca4.png

 
 
 

ka04W000001Ev71QAC_0EM440000002CaT.png

 
***The screenshot above shows how multiple dependency searches can be used to find out where a dependency no longer exists.  This technique can prove to be extremely effective in finding the points where objects can begin to be deleted. From that point, work backwards to remove the dependencies so that the desired object(s) can eventually be removed from the project.***
 
4.    Repeat this process until all application objects that use the schema objects are deleted.  Once this is done, the schema objects that remain can be unmapped from the columns within the logical tables if necessary.  Update the schema to make the changes permanent if necessary.
 
5.    After all objects are removed from logical tables, and only the tables themselves remain, they can be removed from the project in the Warehouse Catalog if necessary.  Update schema to make the changes permanent.
 
6.    If a dependency search on an object that is desired to be removed returns managed objects, then there are some special things to consider.  Essentially, the process is the same because there may be application objects that are using the managed schema objects, like a Freeform SQL Report.  Delete the application objects that depend on the managed objects by performing multiple layers of dependency searches on them -- essentially the same process as outlined above.
 
7.    Once all dependent objects are deleted and only the managed schema objects remain, then they can be deleted, along with the table that maps them by using the Administration\Projects\Delete unused managed objects.  The managed schema objects don't need to be unmapped and deleted manually like normal objects.  Once the application objects that use them are deleted, then the managed objects become "unused," which is why the Delete unused managed objects option gets rid of them all, including the tables that contain them.
 
 
 

ka04W000001Ev71QAC_0EM440000002CaH.png

 
 
8.    Update schema and the specific object should be able to be removed from the project.
 
As a result, the desired object can now be removed from use in the specific project.
 
Please note that this procedure can be employed for many other objects within Strategy.  The details above were meant to show a thorough walkthrough of how to find and remove dependents of a specific object in the recommended manner, and used a database instance as an example.
 
If issues persist following this process or arise during the process, contact Strategy Technical Support for help with those specific issues.
 y End


Comment

0 comments

Details

Knowledge Article

Published:

June 1, 2017

Last Updated:

June 1, 2017