tsql - MS SQL Server 2005 sp_stored_procedures -
I am currently running
< P> Stored functionality to retrieve the list of SP for a given data source. I have to query this dataset via PROCEDURE_NAME and PROCEDURE_OWNER columns. However, PROCEDURE_NAME has a strange return value. It seems to attach a semicolon and a number at the end of the name sp_stored_procedures
sel_AppUser ;. 1 sel_AppUser_all; 1 sel_AppUser_by_login; 1 sel_Browsable; 1
Here is sel_Browsable
create process [dbo]. Select [sel_Browsable] uniqueidentifier @BrowsableID * Browse from browsableID = @BrowsableID for XML Auto, select Elements * Properties from Where objectId = @BrowsableID Auto for XML, select Elements * Search from where browsableID = @ BrowseableID XML Auto, Order by searchOrder for element choosing attribute * Attributes from Insert XML to Auto Attribute on Search.objectID = Search.searchID where browsableID = @BrowsableID command by SearchOrder, Elements Selection Criteria. * Include Criterion.searchID = Search.searchID on search criteria from where browsableID = @BrowsableID command searchOrder, criterionOrder for XML Auto, depending on the element's choosing attribute. * Attribute at Attribute.objectID = Criterion.criterionID on inner in properties Search NER JOIN criterion.searchID = Search.searchID where browseable id = searchable by @ browsableID ORDER, XML Auto for criteria order, selection of elements criteria Operator * Join criteria from the criteria on Operator Inner. = Search.searchID where browseable id = @ BrowsableID order, search order, extractor order, operator order, XML auto, select elements of the criteria. * Criteria with criteria from lower criteria. CiterionID = Criterion.criterionID Join INNER criterion.searchID = Search at Search.searchID WHERE browsableID = @BrowsableID searchOrder, criterionOrder, XML for AutoConditionValueOrder, elements end
Initially I thought Was that these numbers could represent the number of parameters (unless NUM_INPUT_PARAMS are implemented in SQL Server), but by order I added and removed the parameter and did not see any change in the listing.
What are these numbers, I mean?
You can differentiate different stored processes with numbers, with the same name, which Can be left together once. Syntax is in SQL 2k8:
; The number is an optional integer used for group processes of the same name. The procedures of these groups can be omitted together using a drop process statement. For example, an application with an order name can use the processes called order process; 1, OrderProject; 2, and likewise drop process command crochet statement leaves the whole group if the name contains delimited identifiers, the number should not be included as part of the identifier; Use the appropriate Dealimeter only around process_name.
The feature is turned on.
BTW You can use list views to retrieve processes :. I find it very easy to use ideas using processes.
Comments
Post a Comment