CMS Snapshot analysis - Run Metrics Calculation - Warnings - SQL with extension - The complexity of matching the regular expression exceeded predefined bounds

Purpose (problem description)

This page will guide you to troubleshoot the below warning that may be encountered in the Run Metric Calculation log file

MA_My Universal Analysis Unit-20160708102709.castlog
[MAv2] Computing metrics on C:\CASTMS\Deploy832AIP\SQLSCRIPT-267\SQL\wccpprddl.sql
The following error "The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that take an indefinite period time to locate." occurred while searching a substring matching regular expression "SELECT.+FROM".

For more information, refer to

Observed in CAST Version, CAST Extension Version, CAST Component Version


SQL Analyzer Release

Yes/No

2.x(tick)
1.x(tick)

CAST AIP Release

Yes/No

8.3.x (x >= 4)(error)
8.3.x (x < 4)(tick)
8.2.x (x >= 11)(error)
8.2.x (x < 11)(tick)
Observed in RDBMS

RDBMS

Yes/No

Oracle Server (tick)
Microsoft SQL Server (tick)
CSS3(tick)
CSS2 (tick)
Step by Step Scenario
  1. Discover the source and deliver the application.
  2. Accept the delivery.
  3. Run analysis.
  4. Select the Run Metrics Calculation step and open the log file.
Action Plan

The problem is that until Cast AIP 8.2.10 and Cast AIP 8.3.3, the Univeral Analyzer parses SQL and DDL files. But there is no Language Pattern provided with extension SQL Analyzer.

This means that Metric Assistant has no definition of the basic structure of the objects.

A workaround is to provide a basic Language Pattern XML file. This is only a workaround, as it can slow down the analysis and degrade performance of SQL Analyzer. Starting from Cast AIP 8.2.10 and Cast AIP 8.3.3, the Universal analyzer does not parse the files any more, and the issue is solved.

Perform the below actions

  1. Copy file SQLScriptLanguagePattern.xml into %PROGRAMDATA%\CAST\CAST\Extensions\com.castsoftware.sqlanalyzer.x.y.z\configuration\Languages\SQL then relaunch analysis

  2. If the above steps do not solve your issue contact CAST Technical Support. with the following Relevant input for CAST Technical Support to try to reproduce the issue

 

Relevant input

Notes/Comments


Related Pages