Object properties can be divided into two main groups:
These can all be removed using the CAST entry table CI_NO_PROPERTIES. Properties are listed in the CAST System View CTV_OBJECT_PROPERTIES.
In this example, we are going to remove a property from an SQL object (a Procedure called "GetTitleAuthors") in the CAST Analysis Service. The property we are going to remove is the Source Code Comments, which is described in the Analysis Service as "sourceCodeComment".
You can check the value for this property by querying a CAST System View:
select PROP_DESCRIPTION, VALUE from CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'GetTitleAuthors' and PROP_NAME = ' sourceCodeComment ' |
The result that is returned shows the value:
PROP_DESCRIPTION VALUE [char] [char] ----------------------------------- Source Code Comments variable declaration Source Code Comments code Source Code Comments If this procedure is not called from another one, Raise an error Source Code Comments return the error value |
You can also see object properties in CAST Enlighten by placing the object in a view and then selecting the object and using the F12 key.
The next step is to insert the data into the CAST entry tables that will cause the property in question to be removed from the Analysis Service when the tool is run. Add a new Update CAST Knowledge Base Tool and enter the following query:
insert into <KB_name>.dbo.CI_NO_PROPERTIES (OBJECT_ID, PROP_NAME, ERROR_ID) select OBJECT_ID, 'BodyCommentLinesCount', 0 from <KB_name>.dbo.CTV_GUID_OBJECTS where OBJECT_NAME = 'GetTitleAuthors ' go |
|
Then:
If you want to check that the property has indeed been removed successfully, you can use the following query in an SQL IDE against your Analysis Service (adapting it for your environment):
select PROP_DESCRIPTION, VALUE from CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'GetTitleAuthors ' and PROP_NAME = 'BodyCommentLinesCount' |
The result returns 0 for this OBJECT_NAME:
PROP_DESCRIPTION VALUE [char] [char] ----------------------------------- This transaction returns no row. |
You can also check in CAST Enlighten.
In this example, we are going to remove a property from a C++ object (a Function called "print_header ()") in the CAST Analysis Service. The property we are going to remove is the Number of inner comment lines, which is described in the Analysis Service as "BodyCommentLinesCount".
You can check the value for this property by querying a CAST System View:
select PROP_DESCRIPTION, VALUE from CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'print_header ()' and PROP_NAME = 'BodyCommentLinesCount' |
The result that is returned shows the value 11:
PROP_DESCRIPTION VALUE [char] [char] Number of inner comment lines 11 |
You can also see object properties in CAST Enlighten by placing the object in a view and then selecting the object and using the F12 key.
The next step is to insert the data into the CAST entry tables that will cause the property in question to be removed from the Analysis Service when the tool is run. Add a new Update CAST Knowledge Base Tool and enter the following query:
insert into <KB_name>.dbo.CI_NO_PROPERTIES (OBJECT_GUID, PROP_NAME, ERROR_ID) select OBJECT_GUID, PROP_NAME, 0 from <KB_name>.dbo.CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'print_header ()' and PROP_NAME = 'BodyCommentLinesCount' go |
|
Then:
If you want to check that the property has indeed been removed successfully, you can use the following query in an SQL IDE against your Analysis Service (adapting it for your environment):
select PROP_DESCRIPTION, VALUE from CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'print_header ()' and PROP_NAME = 'BodyCommentLinesCount' |
The result returns 0 for this OBJECT_NAME:
PROP_DESCRIPTION VALUE [char] [char] ----------------------------------- This transaction returns no row. |
You can also check in CAST Enlighten.
In this example, we are going to remove a property from a T-SQL server object (a stored procedure called "GetAuthors") in the CAST Analysis Service. The property we are going to remove is the Number of code lines, which is described in the Analysis Service as "CodeLinesCount".
You can check the value for this property by querying a CAST System View:
select PROP_DESCRIPTION, VALUE from CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'GetAuthors' and PROP_NAME = 'CodeLinesCount' |
The result that is returned shows the value 13:
PROP_DESCRIPTION VALUE [char] [char] ----------------------------------- Number of code lines 13 |
You can also see object properties in CAST Enlighten by placing the object in a view and then selecting the object and using the F12 key.
The next step is to insert the data into the CAST entry tables that will cause the property in question to be removed from the Analysis Service and create an OBJECT_GUID for the object in question when the tool is run. Add a new Update CAST Knowledge Base Tool and enter the following query:
insert into <KB_name>.dbo.GUID_OBJECTS (OBJECT_ID, OBJECT_GUID, ERROR_ID) select OBJECT_ID, OBJECT_NAME, 0 from <KB_name>.dbo.CTV_GUID_OBJECTS where OBJECT_NAME = 'GetAuthors' go insert into <KB_name>.dbo.CI_NO_PROPERTIES (OBJECT_GUID, PROP_NAME, ERROR_ID) select OBJECT_NAME, PROP_NAME, 0 from <KB_name>.dbo.CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'GetAuthors' and PROP_NAME = 'CodeLinesCount' go |
This is in effect two queries:
|
Then:
If you want to check that the property has indeed been removed successfully, you can use the following query in an SQL IDE against your Analysis Service (adapting it for your environment):
select PROP_DESCRIPTION, VALUE from CTV_OBJECT_PROPERTIES where OBJECT_NAME = 'GetAuthors' and PROP_NAME = 'CodeLinesCount' |
The result returns 0 for this OBJECT_NAME:
PROP_DESCRIPTION VALUE [char] [char] ----------------------------------- This transaction returns no row. |
You can also check in CAST Enlighten.