Heim >Datenbank >MySQL-Tutorial >获取SQL Server数据库中所有的用户存储过程

获取SQL Server数据库中所有的用户存储过程

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 14:58:071378Durchsuche

获取SQLServer数据库中所有的用户存储过程。 无 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

获取SQL Server数据库中所有的用户存储过程。
SELECT SCHEMA_NAME(sp.schema_id) AS [Schema],sp.name AS [Name] FROM sys.all_objects AS sp
WHERE
(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 0
END AS bit)=N'0')
ORDER BY [Schema] ASC,[Name] ASC
?
?
?
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:oracle表数据的闪回Nächster Artikel:mysql创建触发器的详细过程