Obtain all user stored procedures in the SQLServer Database

Source: Internet
Author: User
Obtain all user stored procedures in the SQLServer database. No SELECTSCHEMA_NAME (sp. schema_id) AS [Schema], sp. nameAS [Name] FROMsys. all_objectsASspWHERE (sp. typeNPORsp. typeNRFORsp. typeNPC) and (CAST (caseWHENsp. Reboot)

Obtain all user stored procedures in the SQLServer database. No SELECT SCHEMA_NAME (sp. schema_id) AS [Schema], sp. name AS [Name] FROM sys. all_objects AS spWHERE (sp. type = n'p' OR sp. type = n' RF 'OR sp. type = N 'pc') and (CAST (case WHEN sp. is_ms_shipped = 1 THEN 1 W

Obtain all user stored procedures in the SQL Server database. <无>
SELECT SCHEMA_NAME(sp.schema_id) AS [Schema],sp.name AS [Name] FROM sys.all_objects AS spWHERE(sp.type = N'P' OR sp.type = N'RF' OR sp.type=N'PC')and(CAST( case     WHEN sp.is_ms_shipped = 1 THEN 1    WHEN (        SELECT             major_id         FROM             sys.extended_properties        WHERE             major_id = sp.object_id and             minor_id = 0 and             class = 1 and             name = N'microsoft_database_tools_support')         IS NOT NULL THEN 1    ELSE 0END AS bit)=N'0')ORDER BY [Schema] ASC,[Name] ASC???

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.