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企業管理器中操作的方式,這下知道了吧,不可逆的~~~~~