打印本文 打印本文 关闭窗口 关闭窗口
sqlserver 存储过程、存储函数的加密、解密
作者:武汉SEO闵涛  文章来源:敏韬网  点击数7908  更新时间:2007/11/14 13:08:52  文章录入:mintao  责任编辑:mintao
nbsp;          else ''''CREATE PROCEDURE ''''+ @objectName +'''' WITH ENCRYPTION AS ''''

                       end)

 

 

if @type=''''FN'''' or @type=''''TF'''' or @type=''''IF''''

SET @OrigSpText2=(case @type when ''''TF'''' then

''''CREATE FUNCTION ''''+ @objectName+''''(@a char(1)) returns @b table(a varchar(10)) with encryption as begin insert @b select @a return end ''''

when ''''FN'''' then

''''CREATE FUNCTION ''''+ @objectName+''''(@a char(1)) returns char(1) with encryption as begin return @a end''''

when ''''IF'''' then

''''CREATE FUNCTION ''''+ @objectName+''''(@a char(1)) returns table with encryption as return select @a as a''''

end)

 

if @type=''''TR''''

begin

 

if @tr_parent_xtype=''''V''''

begin

set @OrigSpText2=''''CREATE TRIGGER ''''+@objectname+'''' ON ''''+OBJECT_NAME(@parentid)+'''' WITH ENCRYPTION INSTEAD OF INSERT AS PRINT 1 ''''

end

else

begin

set @OrigSpText2=''''CREATE TRIGGER ''''+@objectname+'''' ON ''''+OBJECT_NAME(@parentid)+'''' WITH ENCRYPTION FOR INSERT AS PRINT 1 ''''

end

 

end

 

if @type=''''V''''

set @OrigSpText2=''''CREATE VIEW ''''+@objectname+'''' WITH ENCRYPTION AS SELECT 1 as f''''

 

set @q=4000-len(@OrigSpText2)

上一页  [1] [2] [3] [4] [5] [6] [7] [8]  下一页

打印本文 打印本文 关闭窗口 关闭窗口