Filtered out extended property being included in object script

BugmeisterBugmeister Posts: 21 New member
edited June 15, 2020 11:17PM in SQL Source Control
Hi,

If I exclude an extended property by name via the filter, should that prevent the extended property being included in any object scripts that have the property against them?  

I.e. if I have a stored procedure name named "usp_Foo" which has a property named "MyProp" which is excluded in the SSC extended property filter list, will the "usp_Foo" script include the sp_addextendedproperty statement for "MyProp"?

I thought it wouldn't be included in the object's script which is the behaviour I was hoping for, however it seems to be still included even though it's excluded, so just wanted to check my assumption before perhaps asking support.  

Thanks
Peter
Tagged:

Best Answer

  • DanCDanC Posts: 627 Gold 5
    Hi @Bugmeister

    Ah you're right, so when you have an extended property against the database itself, it is it's own object and therefore it can be filtered out with the filters. 

    However when you have an extended property against an object, it becomes a part of that object and therefore the SQL Compare option "Ignore extended properties" is required. 

    Does that help make sense of it?

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

Answers

  • Hi @Bugmeister

    I've been doing some testing around this and I've found you can't specify to exclude a particular extended property with a filter, instead you would need to exclude all extended properties using "Ignore extended properties" in SQL Compare. 

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • BugmeisterBugmeister Posts: 21 New member
    Thanks Dan.  Filtering extended properties by name seems work ones that are against the database itself (at least when we've done it in the past).  Do you think it's a bug/issue that it doesn't work the same way for ones against stored procedures?
Sign In or Register to comment.