SQL视图加密,加密后不可逆

  最近在研究公文流转定义的相关资料,从网上下载了一个带源码的系统,埋头分解研究,后来顺着代码找到了SQL视图部分,居然发现是加密的,以前一直没注意这个问题,想把它解出来。为了比较好的说明问题先来加密下SQL视图。view plaincopy to clipboardprint?
  --如下的视图创建语句,这个创建的视图是不加加密的
  CREATE VIEW dbo.V_MapManagePower
  AS
  SELECT dbo.ManageUser.ManageUserID, dbo.ManageUser.ManageUserName,
  dbo.ManageUser.ManageUserLock, dbo.ManageGroup.ManageGroupID,
  dbo.ManageGroup.ManageGroupName
  FROM dbo.ManageGroup INNER JOIN
  dbo.ManagePowerConfig ON
  dbo.ManageGroup.ManageGroupID = dbo.ManagePowerConfig.ManageGroupID INNER
  JOIN
  dbo.ManageUser ON
  dbo.ManagePowerConfig.ManageUserID = dbo.ManageUser.ManageUserID
  --如下的视图创建语句,这个创建的视图是不加加密的
  CREATE VIEW dbo.V_MapManagePower
  AS
  SELECT dbo.ManageUser.ManageUserID, dbo.ManageUser.ManageUserName,
  dbo.ManageUser.ManageUserLock, dbo.ManageGroup.ManageGroupID,
  dbo.ManageGroup.ManageGroupName
  FROM dbo.ManageGroup INNER JOIN
  dbo.ManagePowerConfig ON
  dbo.ManageGroup.ManageGroupID = dbo.ManagePowerConfig.ManageGroupID INNER
  JOIN
  dbo.ManageUser ON
  dbo.ManagePowerConfig.ManageUserID = dbo.ManageUser.ManageUserIDview plaincopy to clipboardprint?
  --这个创建的视图语句就比上面的多了with encryption,结果再去看视图设计的时候就加密了
  CREATE VIEW dbo.V_MapManagePower with encryption
  AS
  SELECT dbo.ManageUser.ManageUserID, dbo.ManageUser.ManageUserName,
  dbo.ManageUser.ManageUserLock, dbo.ManageGroup.ManageGroupID,
  dbo.ManageGroup.ManageGroupName
  FROM dbo.ManageGroup INNER JOIN
  dbo.ManagePowerConfig ON
  dbo.ManageGroup.ManageGroupID = dbo.ManagePowerConfig.ManageGroupID INNER
  JOIN
  dbo.ManageUser ON
  dbo.ManagePowerConfig.ManageUserID = dbo.ManageUser.ManageUserID
  --这个创建的视图语句就比上面的多了with encryption,结果再去看视图设计的时候就加密了
  CREATE VIEW dbo.V_MapManagePower with encryption
  AS
  SELECT dbo.ManageUser.ManageUserID, dbo.ManageUser.ManageUserName,
  dbo.ManageUser.ManageUserLock, dbo.ManageGroup.ManageGroupID,
  dbo.ManageGroup.ManageGroupName
  FROM dbo.ManageGroup INNER JOIN
  dbo.ManagePowerConfig ON
  dbo.ManageGroup.ManageGroupID = dbo.ManagePowerConfig.ManageGroupID INNER
  JOIN
  dbo.ManageUser ON
  dbo.ManagePowerConfig.ManageUserID = dbo.ManageUser.ManageUserID再来看看从SQL企业管理器中操作的方式,这下知道了吧,不可逆的~~~~~