← Back to Knowledge Base

KB #240086: fn_n_keycount() returns Zero, when greater than Zero expected.

⏱️ 2 min read
 

Type:

Information
Summary:
You are expecting fn_n_keycount() to return a value > 0, but it returns 0.

 

Additional Information:
You can test if there is a global key active in a secured SQL instance by running the following command:

SELECT master.dbo.fn_n_keycount()

If the instance is secured and the key is active, you can expect the returned value to be greater than zero (> 0). However, if it unexpectedly returns zero (0), here are some possible causes:

  • The SQL instance is not, in fact, secured. You can confirm by running the Admin Wizard. The list of SQL instances should provide the status of each SQL instance on the machine. If it is not secured, then secure it using the Admin WIzard
  • You indicated that the Master Must be encrypted when you secured the SQL instance, however, the Master database files are in fact not encrypted. SQL will start, however, Encryptionizer keys will not load to the SQL instance.
  • You indicated Lock Key to Machine when you secured the SQL instance, but the instance was copied to new hardware. Encryptionizer did not load the keys to the SQL instance because it did not recognize the hardware.
  • There is an issue with your License. Review 240132 for more information.

Related Topics:

240132: Test if your License/Activation is valid

240102: Encrypted Databases not accessible (Recovery Pending, Suspect)

 

Was this article helpful?

Related Articles

KB #240047: Encrypted values in var char column are randomly decrypting incorrectly

Type: Tip Summary: Values in a varchar column are, seemingly randomly, not decrypting to the…

KB #240105: How to transfer an Encryptionizer license from one machine to another (Build 2019.1210.31152 or earlier)

Type: Information Summary: You are upgrading a machine or otherwise need to move an installation…

KB #240119: Encrypted Databases Not Accessible After Reboot but are Accessible After Manually Restarting SQL Server

Type: Workaround Summary: Encrypted databases may be inaccessible after reboot (listed as Suspect or Recovery…

Still need help?

Our support team is here to assist you.

NetLib Security
AI Assistant · Online
Hi! I'm the NetLib Security assistant. I can answer questions about our encryption solutions, HIPAA compliance, Encryptionizer, and more. How can I help you today?