← Back to Knowledge Base

KB #240094: How to capture output of sp_n_enumfiles into a table

⏱️ 1 min read
 

Type:

Information
Summary:
API sp_n_enumfiles gives a report of encrypted database files currently attached to SQL Server. This KB Article gives instructions on how to capture the result set into a table.

 

Additional Information:
The following example puts the result set of sp_n_enumfiles into a temporary table named #dbfiles and checks to see if any files containing the name ‘northwind’ are included

Create Table #dbfiles(dbfile varchar(128))
Insert #dbfiles EXEC sp_n_enumfiles
select dbfile from #dbfiles
IF EXISTS (SELECT dbfile FROM #dbfiles WHERE dbfile like '%northwind%') begin
  select 'northwind found'
end
drop table #dbfiles

Was this article helpful?

Related Articles

KB #240072 : Log Shipping with Encryptionizer (driver v2008.401.40 and earlier)

Type: Tip Summary: Log Shipping is supported with the procedure outlined below, and only with…

KB #240137: Requesting a Permanent Registration Key

Type: Info Summary: You have installed Encryptionizer with a Temporary Registration key and wish to…

KB #240136: NetLib Key Management Service (nlcbtask) does not start but starts manually

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?