In order to prevent critical data of gas monitoring system of coal mine from tampering and ensure data security, the paper proposed a method of using symmetric encryption algorithm to encrypt important field in database of SQL Server 2008 and restore data by key and decryption function. Any changes to the encrypted data cannot be achieved unless knowing the key and using the decryption function, so as to effectively prevent the illegal operation of critical data and protect sensitive data. Practical application confirmed validity of the critical data encryption algorithm.