블로그 이미지
bedbmsguru

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
  • total
  • today
  • yesterday
2021. 4. 26. 09:26 SQL SERVER

ALTER DATABASE [DB명] SET ENCRYPTION OFF;
GO

use DB명
DROP DATABASE ENCRYPTION KEY

 


-- 4. 암호화 상태 확인

SELECT DB_NAME(e.database_id) AS DatabaseName, 
            e.database_id, 
            e.encryption_state, 
    CASE e.encryption_state 

     WHEN 0 THEN 'No database encryption key present, no encryption' 
                WHEN 1 THEN 'Unencrypted' 
                WHEN 2 THEN 'Encryption in progress' 
                WHEN 3 THEN 'Encrypted' 
                WHEN 4 THEN 'Key change in progress' 
                WHEN 5 THEN 'Decryption in progress' 
    END AS encryption_state_desc, 
            c.name, 

     e.percent_complete 
    FROM sys.dm_database_encryption_keys AS e 

   LEFT JOIN master.sys.certificates AS c

    ON e.encryptor_thumbprint = c.thumbprint 

posted by bedbmsguru