Purpose (problem description)
The purpose of this page is to explain how to deal with hanging issues when running the Metrics Calculation step on a DDL file, after a SQL Analyzer analysis
Observed on RDBMS
RDBMS | Yes/No |
---|---|
Oracle Server | |
Microsoft SQL Server | |
CSS3 | |
CSS2 |
Step by Step scenario
- Run the Analysis (At application level or Analysis Unit Level)
- After the Execution Unit has been analyzed, we note that the Run Metrics Calculation step never ends.
Action Plan
In such a SQL Analyzer analysis we often have only one file or a few files containing all the code, so we cannot afford to apply the dichotomy process. Some metrics are particularly long to process, for example "Avoid using SQL queries inside loops". Deactivating them may be an option.
- Edit file <Extension Folder>\com.castsoftware.sqlanalyzer-x.y.z\configuration\Languages\SQL\SQLCastMetrics.xml
Comment-out the section for metric "Avoid using SQL queries inside loops" like shown below :
SQLCastMetrics.xml<!-- <METRIC Name="Avoid using SQL queries inside loops" TYPE="1523"> <LANGUAGE NAME="SQLScript-LANGUAGE"> <ACTIVE>yes</ACTIVE> <INIT>0</INIT> <SEARCH_IN_CODE>Yes</SEARCH_IN_CODE> <SEARCH_IN_COMMENT>No</SEARCH_IN_COMMENT> <SEARCH_IN_STRING>No</SEARCH_IN_STRING> <SEARCH_IN_EMBEDDEDSQL>No</SEARCH_IN_EMBEDDEDSQL> <SEARCH_CASE_SENSITIVE>No</SEARCH_CASE_SENSITIVE> <EMBEDDED> <BEGIN> <REGEXP><![CDATA[[[:space:]](while\b|loop\b|for\b[[:space:]]*[[:alnum:]]*[[:space:]]*do\b|repeat\b|<<)[[:space:]]*]]></REGEXP> </BEGIN> <VALUE> <REGEXP><![CDATA[[[:space:]](select|update|insert|delete|merge)[[:space:]]]]></REGEXP> </VALUE> <END> <REGEXP><![CDATA[(end[[:space:]]*loop|end[[:space:]]*while|end|end[[:space:]]*for|end[[:space:]]*repeat|goto)]]></REGEXP> </END> </EMBEDDED> </LANGUAGE> </METRIC> -->
- Relaunch Analysis
If you do not find the information you are looking for or solution for your problem,contact CAST Technical Support with Relevant Input. CAST Technical Support will reproduce the issue
Notes/Comments
Ticket # 13498
Related Pages