views:

150

answers:

3

Using SQL Server 2005 management studio, I have exported each Sprocs and Functions as a separate .sql file.

Is there a way that using CLOC tool, I can produce lines of code metric?

The CLOC site states that it supports SQL but it does not generate any metric in this case.

Thanks,

Ajit.

A: 

Might this be of help: How do I calculate the SIZE of stored procedures in SQL Server 2005?

Mitch Wheat
A: 

WHy don't you use "Generate Scripts" by rightlciking on your database in Management studio, selecting your tables/stored procs/functions, and then exporting it to one giant file. From that, you can use a tool like notepad++ (or even notepad if u take word wrap off and status bar on), to see number of lines. or you can use CLOC on this one file created. Which ever makes you happy.

waqasahmed
There are 2000+ procedures currently. I am looking for targeting specific procedures for refactoring.
Ajit Singh
+1  A: 

I got a tool that satisfies my requirement:

http://www.downloadthat.com/windows/Programming/Misc-Tools/OxyProject-Metrics_download.html

If anything better, pl share it.

Thanks.

Ajit.

Ajit Singh