Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Highly Rated Users

Forum
No Posts Rated

Top 50
Given
Received

Forum Statistics

Users
Members:
1878
Members Online:
2
Guests Online:
88

Total Post History
Posts:
81448
Topics:
18714

7-Day Post History
New Posts:
1
New Topics:
0
Active Topics:
1

Our newest member
kowilmar1990z

Other

FAQ
All times are UTC [ DST ]

Google Ads

Run as part of an automated build

Please wait...

Run as part of an automated build

Postby chrisbartlett on Tue Oct 05, 2010 8:40 pm

I would like to include SQLCop as part of an automated build.
To do this it would be necessary to run SQLCop from the command line, passing in the database etc to verify as parameters with the results being output as XML to a file.
I realise this could involve considerable work but I do think it would take what is already a very useful tool to the next level.
Thanks.
chrisbartlett
Newbie
Newbie
LTD Bronze - Rating: 1
 
Posts: 4
Joined: Tue Oct 05, 2010 8:09 pm

Re: Run as part of an automated build

Postby gmmastros on Tue Oct 05, 2010 8:56 pm

I like the suggestion. Of course, it will take some effort to accomplish, but it shouldn't be too difficult.

Would it be ok to notify you by email so that you could be involved with the beta testing? Since I am an admin on this site, I have access to the email address you used to register (therefore no need to post it).
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2367
Joined: Tue Oct 09, 2007 5:19 pm
Unrated

Re: Run as part of an automated build

Postby ca8msm on Tue Oct 05, 2010 9:22 pm

Nice idea :) I can see how that could become very useful
User avatar
ca8msm
LTD Admin
LTD Admin
LTD Silver - Rating: 687LTD Silver - Rating: 687LTD Silver - Rating: 687LTD Silver - Rating: 687LTD Silver - Rating: 687
LTD Silver - Rating: 687LTD Silver - Rating: 687LTD Silver - Rating: 687LTD Silver - Rating: 687LTD Silver - Rating: 687
 
Posts: 2492
Joined: Wed Oct 10, 2007 6:49 pm
Location: North East England
Unrated

Re: Run as part of an automated build

Postby chrisbartlett on Tue Oct 05, 2010 9:52 pm

George, I would be happy to help as part of the beta testing.
chrisbartlett
Newbie
Newbie
LTD Bronze - Rating: 1
 
Posts: 4
Joined: Tue Oct 05, 2010 8:09 pm
Unrated

Re: Run as part of an automated build

Postby gmmastros on Thu Oct 07, 2010 6:08 pm

Anybody have thoughts on the structure for the XML output file? I have a lot of the coding done, but I'm a little unsure of the output structure.

I think all I have left to do is to build the XML output file and also to handle any errors that may occur. I've added a command line argument so you can specify a file where errors are logged. An example of an error would be: unable to login, etc... My thoughts are.... If you are going to be scripting this, we cannot have any modal forms that display error messages which wait for the user to click on OK button. This part shouldn't be too difficult. It's really the structure of the XML file that I am unsure of.
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2367
Joined: Tue Oct 09, 2007 5:19 pm
Unrated

Re: Run as part of an automated build

Postby gmmastros on Thu Oct 07, 2010 6:12 pm

I should probably mention what I have already. It looks like this...

  1. <SQLCop>
  2.   <category name="Code">
  3.     <results>
  4.       <test name="Decimal Size Problem">
  5.         <item>dbo.DecimalProblem</item>
  6.       </test>
  7.       <test name="Decimal Size Problem">
  8.         <item>dbo.DecimalProblem</item>
  9.         <item>LTD.DecimalProblem</item>
  10.       </test>
  11.       <test name="Procedures using dynamic SQL without sp_executesql"></test>
  12.     </results>
  13.   </category>
  14.   <category name="Column">
  15.     <results>
  16.       <test name="Column Data Types (Numeric vs. Int)">
  17.         <item>dbo.NumberNumericTest.Num</item>
  18.       </test>
  19.       <test name="Column Name Problems">
  20.         <item>dbo.ALLT.Col1</item>
  21.         <item>dbo.ALLT.col2</item>
  22.       </test>
  23.     </results>
  24.   </category>
  25. </SQLCop>
  26.  
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2367
Joined: Tue Oct 09, 2007 5:19 pm
Unrated

Re: Run as part of an automated build

Postby chrisbartlett on Mon Oct 11, 2010 2:34 pm

The XML structure looks OK to me, the only alteration I would suggest is the removal of the <results> element as it is not required.
chrisbartlett
Newbie
Newbie
LTD Bronze - Rating: 1
 
Posts: 4
Joined: Tue Oct 05, 2010 8:09 pm
Unrated

Re: Run as part of an automated build

Postby gmmastros on Mon Oct 11, 2010 3:43 pm

Good point. I'll probably have something ready to test as early as tomorrow or Wednesday.
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2367
Joined: Tue Oct 09, 2007 5:19 pm
Unrated

Re: Run as part of an automated build

Postby Naomi on Mon Oct 11, 2010 5:38 pm

riverguy wrote:I probably couldn't give meaningful feedback on the XML as I rarely use XML, but for a future version, one option I would love would be the ability to store the output into a database table. After running the command line app against several servers, it would be easy for the end user to either run a report they have created in SSRS based off of this table, or, simply host the reportviwer within the SQL Cop GUI for a default report based off of the data currently in the table. I think this kind of has precedent when considering that Microsoft products often log to database tables, SSIS being an example.


Sounds like also a good idea - optionally save the log in the database.
Premature optimization is the root of all evil in programming.
Donald Knuth, repeating C. A. R. Hoare
Naomi
Senior Sage
Senior Sage
LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234LTD Bronze - Rating: 234
 
Posts: 1754
Joined: Thu Mar 26, 2009 5:46 am
Location: WI
Unrated

Re: Run as part of an automated build

Postby chrisbartlett on Fri Oct 22, 2010 9:40 pm

gmmastros wrote:Good point. I'll probably have something ready to test as early as tomorrow or Wednesday.


George, any idea when this will be available to use / test, thanks?
chrisbartlett
Newbie
Newbie
LTD Bronze - Rating: 1
 
Posts: 4
Joined: Tue Oct 05, 2010 8:09 pm
Unrated

Re: Run as part of an automated build

Postby gmmastros on Fri Oct 22, 2010 10:12 pm

Sorry. I got distracted with work. #-o

Actually, part of the bigger problem is that I made other changes to the app (other than the command line stuff). I haven't had a chance to test the other parts yet. Specifically, I added a search box with options. You can search through code or you can search through your data. I think I'll send you a copy of the executable so you can take a quick look at it.
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2367
Joined: Tue Oct 09, 2007 5:19 pm
Unrated

Re: Run as part of an automated build

Postby swamsan on Tue Oct 16, 2012 6:36 am

Is the commandline tool available now for SQLCOP?
swamsan
Newbie
Newbie
 
Posts: 1
Joined: Tue Oct 16, 2012 6:34 am
Unrated

Re: Run as part of an automated build

Postby danielfranklinr on Tue Jun 16, 2015 5:02 pm

Hi @gmmastros,

Sorry to bring up this post, but I was wondering if this feature was implemented on the version 1.1, this is as far as I can see the last available version of SQLCop.

Hoping to hear from you soon.

Regards,
Daniel
danielfranklinr
Newbie
Newbie
 
Posts: 1
Joined: Tue Jun 16, 2015 5:00 pm
Unrated