File Analysis

ApexSQL Clean features the ability to check the contents of files, generally source code files of custom client applications, for database object dependencies. For example, ApexSQL Clean will analyze an ASP.NET project to look for references to procedures, views and tables contained in the ASP.NET code.

tip.jpg

 

Tech Tip:

 

You can supply Visual Studio solution file for file analysis. ApexSQL Clean will analyze all the files included into this solution.

 

File Name Pattern allows user to customize and maintain the list of files to be searched during the analysis process by filtering with regular expressions. For example, if the client application was written in C# then a file filter of .cs (or .cs$ to match the very last extension) would be used to add these files to be analyzed by ApexSQL Clean for SQL dependencies.

faq.jpg

 

FAQ: Can I analyze my .NET projects or other client code (Delphi, C++, ASP, etc) for database references, or does ApexSQL work on SQL Server databases only?

 

ApexSQL Clean features the ability to check the content of files, commonly source code files of custom client applications and even Visual Studio solutions for database object references. ApexSQL Clean can analyze any type of file, it will search file for name of objects. In case of .NET solution/project analyzing ApexSQL Clean will search for the references within  all files included into that solution.

 

The Recursive option allows the user to recursively check any selected directory - the search will include all sub-directories of the selected folder, but only the file types configured in the file extension list.

Select the appropriate drive and folder, and click the image127.gif button to add all listed files to the search. The files that have an extension ApexSQL Clean is configured to search will be listed to the right.

When the project has been created and the image4.gif button is clicked, ApexSQL Clean will analyze each checked file in the list for names of database objects and will record/display all the instances that it finds in the main screen. File references are considered Children of SQL objects they reference.

11.JPG

For information about the available buttons in the Wizard step above click here.

faq.jpg

 

FAQ: What would I use the name patterns and the Recursive option in the File selection wizard step for?

 

The File Name Pattern allows the user to customize and maintain the list of file extension types to be searched during the analysis process. The Recursive option allows the user to recursively check any selected directory for the specified patterns, including sub-directories.

 

The options for File Analysis are:

Button/Option

Description

image128.gif

Match defined File Name Pattern against target drive or folder and extract matching files that will be used.

 

 

Edit_pattern.jpg

Edit File Name Pattern.

 

 

Delete_pattern.jpg

Delete selected File Name Pattern.

 

 

Recursive

Extend search for matching file patterns to subfolders.

 

 

The file references will be displayed on the main grid and will also be shown in the Child sub-grid for each object that is found as shown in the following example. There is a reference to Contact table in the MultilineComments.cs file.

image241.jpg

If we check file contents (double click it or view its DDL via context menu) we see it has references to our database object.

image242.jpg