当前位置: 代码迷 >> Sql Server >> 能否在sysobjects系统表中查到用户未加密的存储过程名称解决思路
  详细解决方案

能否在sysobjects系统表中查到用户未加密的存储过程名称解决思路

热度:99   发布时间:2016-04-27 13:57:55.0
能否在sysobjects系统表中查到用户未加密的存储过程名称
如题。

------解决方案--------------------
SQL code
--查询所有存储过程select Pr_Name  as [存储过程], [参数]=stuff((select ','+[Parameter]     from (        select Pr.Name as Pr_Name,parameter.name +' ' +Type.Name + ' ('+convert(varchar(32),parameter.max_length)+')' as Parameter        from sys.procedures Pr left join         sys.parameters parameter  on Pr.object_id = parameter.object_id        inner join sys.types Type on parameter.system_type_id = Type.system_type_id        where type = 'P'     ) t where Pr_Name=tb.Pr_Name for xml path('')), 1, 1, '')from (    select Pr.Name as Pr_Name,parameter.name +' ' +Type.Name + ' ('+convert(varchar(32),parameter.max_length)+')' as Parameter    from sys.procedures Pr left join     sys.parameters parameter  on Pr.object_id = parameter.object_id    inner join sys.types Type on parameter.system_type_id = Type.system_type_id    where type = 'P' )tbwhere Pr_Name not like 'sp_%' --and Pr_Name not like 'dt%'group by Pr_Nameorder by Pr_Name
------解决方案--------------------
SQL code
SELECT  name AS 名称,        b.encrypted AS 是否加密FROM    sysobjects a        LEFT JOIN syscomments b ON a.id = b.idWHERE   a.xtype = 'P'