Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Extensible rule-based tool to find problems in stored procedures?


Extensible rule-based tool to find problems in stored procedures?

Author
Message
michael_c_leone
michael_c_leone
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 34
Hello,

Is there a extensible rule-based tool to find problems in SQL Server stored procedures? What I'm looking for is something similar to:

http://www.mono-project.com/Gendarme

...but only for stored procedures instead of .NET app code (in our case VB). We've found Gendarme to be very useful so far and it got me thinking it would be great to have the same capability to analyze stored procedures for bad practices, etc (including any rule we want it to look for per the extensibility).

Thanks, Michael
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14955 Visits: 38949
not sure about extensibility, but i've seen two tools that look for issues, complexity, and rules for coding;
http://sqlcop.lessthandot.com/
http://www.sqlcodeguard.com/

I'm not familiar with either one, but it's a starting point;

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

michael_c_leone
michael_c_leone
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 34
Thanks! It looks like SqlCodeGuard is just want I was looking for. Not sure how extensible it is, or if it will be easy to get the results into a database where we can report and track, but it is a great start.
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)

Group: General Forum Members
Points: 8237 Visits: 14368
I demoed Visual Studio features at one point and the rules are extensible.

Create and Register Additional Rules for Analyzing Database Code - Visual Studio 2010

Analyzing Database Code to Improve Code Quality - Visual Studio 2010

Not a lot of shops adopted the database tools integrated in versions of Visual Studio 2010 and before because it was cost prohibitive, instead opting for some combination of SSMS and other tools. The good news is that Microsoft has carried static code analysis forward into SSDT for SQL 2012 which is free :-D I havent demoed it yet though to see how much they brought forward.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
sqlcodeguard
sqlcodeguard
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 90
michael_c_leone (8/31/2012)
Thanks! It looks like SqlCodeGuard is just want I was looking for. Not sure how extensible it is, or if it will be easy to get the results into a database where we can report and track, but it is a great start.

from version 2.1.4628 SqlCodeGuard has an API to incorporate it in your own projects

usage is pretty simple

SqlCodeGuardAPI.API api = new SqlCodeGuardAPI.API();
api.IncludeIssue("ALL");
bool unparsed;
List<Issue> l = api.GetIssues(sql, out unparsed);
if (unparsed)
{
Console.WriteLine("Unparsed! Issue list may be incomplete or wrong");
}
Console.WriteLine("Issues:");
foreach (Issue i in l)
{
Console.WriteLine(String.Format("({0}){1} at {2}:{3} ({4})", i.ErrorCode, i.ErrorText, i.Column, i.Line, i.ErrorMessage));
}
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search