ApexSQL Enforce
SQL code smells
Improve SQL code smells with best coding practices reviews and enforcement
Overview
·Review databases and individual SQL scripts
·Import and export rules
·Process unattended via the CLI
·Seamlessly integrate into your CI/CD process
·Leverage a library of 100+ pre-written rules
·Create custom rules with a built in IDE
·Write custom rules in C# or VB.NET
·Create HTML reports and XML exports
·Integrate with SSMS and Visual Studio
·Generate SQL to fix violations
Features
Enforce best practices
Process databases and scripts against more than 100 out-of-the-box rules covering best practices, naming conventions, potential configuration and performance problems and more
Create and manage rulebases
Create new/different rulebases by exporting and importing. Download updated rulebases directly from our website and import new rules into your existing rulebase
Create new rules
Create your own, custom rules using C# or VB.NET. Code rule conditions using auto-complete, syntax highlighting and all the other features you would expect in an integrated IDE
Manage rules
Edit, sort, filter, group and view rules within a grid based interface
Report and export results
Create XML reports and XML exports. Export all generated Fix SQL snippets into a single script to fix all detected problems
Process static scripts
Review and process stand-alone scripts aka static script analysis
Customize severity, impact score and failure thresholds
Customize severity level for rules and impact score for severities. Set custom thresholds for build failure
Categorize rules
Allocate rules to existing or custom categories i.e. security, performance, naming conventions within an existing rulebase
Programmatically construct Fix SQL statements
Enter static Fix SQL into the rule editor, or create it programmatically via the rule condition
Write rules down to the statement level
Our API exposes a script parse tree down to the sub-statement level like elements of a Where or Order by clause. This allows rules to be written to govern script level best practices like statement construction, use of triggers and cursors, variable naming and much more
Explore rulebases
View, select and run specific rules from various groups using the Rulebase explorer panel
View results
See a summary from a processed rulebase including summary and detail information
Visual themes
Customize the visual appearance with interface themes.
ApexSQL Enforce FAQs
General
What systems are supported?
SQL Server version 2005 and above, Azure SQL Database, Amazon RDS for SQL Server are supported.
Is ApexSQL Enforce a stand-alone application or add-in for SQL Server Management Studio and or Visual Studio?
ApexSQL Enforce is a stand-alone application and it can be integrated in SQL Server Management Studio and Visual Studio.
What will ApexSQL Enforce console app produce as a return code if the application completes processing, but the job has “Failed”?
ApexSQL Enforce will produce a variety of return codes e.g.: -1 for Pass and 102 for Fail, in the case that the rulebase processed a database that resulted in failure due to a high impact score.
Can I query the database directly from an ApexSQL Enforce rule if I can’t get sufficient information from the API?
Yes, conditions can make direct calls to the database and execute SQL statements. For example:
Var SqlCommand = Enforce. Server. Connection.CreateCommand();
SqlCommand.CommandText = “SELECT * FROM Customers”;
SqlCommand.CommandType =CommandType.Text;
var reader = SqlCommand.ExecuteReader();
Are Options set at the application or rulebase level?
Options like impact score by severity and resultset type options like: including passed, failed and errors on rules, are set on application level. However, failure thresholds, rulebase properties and rule selections are saved on rulebase level.
Can I create a Project to save a rulebase, rulebase selections and options along with a data source?
There are no Projects in ApexSQL Enforce, however, rulebases can be created, saved and edited. Rulebases include rulebase selection, rule categories and failure threshold values.
Do you solicit, accept rules created by users, the community?
Yes, good community created rules will be added in the default rulebases and published in updates.
Do you have an "Example" rulebase, just to show how to accomplish simple things?
Yes, ApexSQL Enforce comes with preinstalled rulebase named “ApexSQL rulebase (C#)”, that show basic examples of writing rules and give brief explanation on what results will be produced. These rulebases can be found under the default rulebase directory:
%local disc%:\Users\%user%\Documents\ApexSQL\ApexSQL Enforce\Rulebases
System requirements
ApexSQL Enforce |
|
Hardware |
Dual Core 2.0 GHz CPU |
SQL Server |
SQL Server 2005 and higher [1] |
Add-in integration |
SQL Server Management Studio 2012 and higher [2] |
OS |
Windows 7 SP1/Windows Server 2008 R2 SP1 and higher [1] |
Software |
.NET Framework 4.7.2 or higher |
Permissions and additional requirements |
Windows user account with administrative privileges |
Compare
|
ApexSQL |
Redgate® |
SQL Server version |
||
SQL Server 2005 |
〇 |
|
SQL Server 2008 - 2019 |
〇 |
〇 |
SQL Server editions |
||
Express |
〇 |
〇 |
Standard |
〇 |
〇 |
Enterprise |
〇 |
〇 |
Cloud |
||
Azure SQL Database |
〇 |
|
Amazon RDS for SQL Server |
〇 |
|
Integration |
||
SQL Server Management Studio 2012 - 2014 |
〇 |
|
SQL Server Management Studio 2016 |
〇 |
〇 |
SQL Server Management Studio 17 - 18 |
〇 |
|
Visual Studio |
〇 |
|
Configuration |
||
Set thresholds for running process |
〇 |
|
Merging rulebases (importing, exporting) |
〇 |
|
Data sources |
||
Databases |
〇 |
〇 |
SQL scripts |
〇 |
〇 |
Managing rules |
||
Add rule |
〇 |
|
Clone rule |
〇 |
|
Delete rule |
〇 |
|
Edit rule |
〇 |
|
Reporting |
||
XML |
〇 |
〇 |
HTML |
〇 |
〇 |
FixSQL |
〇 |
〇 |
Rule categories |
||
Code |
〇 |
〇 |
Deprecated features |
〇 |
〇 |
Design |
〇 |
〇 |
Maintenance |
〇 |
〇 |
Naming conventions |
〇 |
〇 |
Performance |
〇 |
〇 |
Query |
〇 |
〇 |
Security |
〇 |
〇 |
Other |
||
Multi violation per rule |
〇 |
〇 |
Duplicate code finder for object pairs, objects and script blocks |
2018 R6 |
|
Save project as batch |
〇 |
|
Interface |
||
GUI themes |
〇 |
〇 |
Command line interface |
〇 |
〇 |
High DPI and 4K resolution support |
〇 |
|
Host aware theme adoption |
〇 |
|
Microsoft standard iconography, colors and other visual effects |
〇 |
© Copyright 2000-2023 COGITO SOFTWARE CO.,LTD. All rights reserved