你好,游客 登录 注册 搜索
背景:
阅读新闻

SqlServer存储过程及函数的加密与解密

[日期:2006-11-24] 来源:  作者: [字体: ]
存储过程、存储函数的加密:WITH ENCRYPTION
CREATE procedure dbo.sp_XML_main
@table_name nvarchar(260)='',
@dirname nvarchar(20)=''
WITH ENCRYPTION
as
begin
....................
end
go
存储过程、存储函数的解密
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_decrypt]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_decrypt]
GO
/*--破解函数,过程,触发器,视图.仅限于SQLSERVER2000
--作者:J9988-- All rights reserved*/
/*--调用示例
--解密指定存储过程
exec sp_decrypt 'AppSP_test'
--对所有的存储过程解密
declare tb cursor for
select name from sysobjects where xtype='P' and status>0 and name'sp_decrypt'
declare @name sysname
open tb
fetch next from tb into @name
while @@fetch_status=0
begin
print '/*-------存储过程 ['+@name+'] -----------*/'
exec sp_decrypt @name
fetch next from tb into @name
end
close tb
deallocate tb
--*/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SP_DECRYPT]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SP_DECRYPT]
GO
CREATE PROCEDURE sp_decrypt(@objectName varchar(50))
AS
begin
set nocount on
--破解字节不受限制,适用于SQLSERVER2000存储过程,函数,视图,触发器
--修正上一版视图触发器不能正确解密错误linux
【内容导航】
第1页: 第2页:SqlServer存储过程及函数的加密与解密
相关资讯      
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款