Tuesday, March 6, 2012

Aggregate function is missing when scripting database objects (SQL2005)

I installed the 'StringUtilities' assembly using the Microsoft clr integration sample. The functions work fine, however, when I script out all the objects in the database, the Aggregate function is not scripted and does not appear in any of the selection lists. The other functions (Scalar and Table-valued) scripted fine. I can right click on the Aggregate function and script it out by itself, I was just wondering why it doesn't appear when I script all the database objects or just the user-defined function objects. Thanks.

What do you do to script all objects?|||In SSMS I right-click the database in the object explorer. Then I choose Tasks > Generate Script. Then I click on "Select All" on each window. When I review the generated script the Aggregate function i.e. dbo.Concatenate() is missing. I have also found the same problem if I just try to script out the Functions. The aggregate function does not appear in the pick list of Functions to be scripted. However, if I check the 'Script all objects in the selected database' checkbox on the first screen then it does generate script for the Aggregate function.

No comments:

Post a Comment