WEB开发网
开发学院数据库MSSQL Server 怎样对SQL Server 2005存储过程解密 阅读

怎样对SQL Server 2005存储过程解密

 2008-05-09 09:55:40 来源:WEB开发网   
核心提示: FOR SELECT real_decrypt from #outputORDER BY identFOR READ ONLY--获取文本SELECT @LFCR = 2SELECT @LineId = 1OPEN ms_crs_syscomFETCH NEXT FROM ms_crs_s

FOR SELECT real_decrypt from #output

ORDER BY ident

FOR READ ONLY

--获取文本

SELECT @LFCR = 2

SELECT @LineId = 1

OPEN ms_crs_syscom

FETCH NEXT FROM ms_crs_syscom into @SyscomText

WHILE @@fetch_status >= 0

BEGIN

SELECT @BasePos = 1

SELECT @CurrentPos = 1

SELECT @TextLength = LEN(@SyscomText)

WHILE @CurrentPos != 0

BEGIN

--通过回车查找行的结束

SELECT @CurrentPos = CHARINDEX(char(13)+char(10), @SyscomText,

@BasePos)

--如果找到回车

IF @CurrentPos != 0

BEGIN

--如果@Lines的长度的新值比设置的大就插入@Lines目前的内容并继续

While (isnull(LEN(@Line),0) + @BlankSpaceAdded +

@CurrentPos-@BasePos + @LFCR) > @DefinedLength

BEGIN

SELECT @AddOnLen = @DefinedLength-(isnull(LEN(@Line),0) +

@BlankSpaceAdded)

INSERT #CommentText VALUES

( @LineId,

isnull(@Line, N'') + isnull(SUBSTRING(@SyscomText,

@BasePos, @AddOnLen), N''))

SELECT @Line = NULL, @LineId = @LineId + 1,

@BasePos = @BasePos + @AddOnLen, @BlankSpaceAdded = 0

END

SELECT @Line = isnull(@Line, N'') +

isnull(SUBSTRING(@SyscomText, @BasePos, @CurrentPos-@BasePos + @LFCR), N'')

SELECT @BasePos = @CurrentPos+2

INSERT #CommentText VALUES( @LineId, @Line )

SELECT @LineId = @LineId + 1

上一页  1 2 3 4 5 6 7  下一页

Tags:怎样 SQL Server

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接