← 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 #240085: SQL will not start – related articles

Type:  Information Summary: SQL will not start after securing with Encryptionizer. Here are the related…

KB #240154: Upgrade Operating System on a machine with EKM installed (v2018.1204.32022.1181)

Type: Information Summary: You are upgrading the operating system of a machine in place, and…

KB #240143: Windows does not start after Encryptionizer installed

Type: Information Summary: You have installed Encryptionizer and Windows does not start properly on boot.…

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?