dbTalk Databases Forums  

Tool for comparing result of 2 stored procs

comp.databases comp.databases


Discuss Tool for comparing result of 2 stored procs in the comp.databases forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Yash
 
Posts: n/a

Default Tool for comparing result of 2 stored procs - 11-07-2007 , 09:00 AM






Hi,

We are in the process of tuning the performance of our stored procs in
SQL 2000 and are looking for a tool that would help us in comparing
the result sets of an old SP and a modified SP. The tool should take
as input the names of the 2 SPs, a set of parameter values and invoke
them. Internally it should compare the result sets returned and log/
display the difference in result sets if any.
We do not want to compare response time, but want to compare result
sets just to be sure that the modifications have not changed the
functionality of the SP.
The tool should also be able to compare result sets of SPs that give
out multiple record sets.

Please let us know which tool we can use.

Thanks,
Yash


Reply With Quote
  #2  
Old   
Alex Kuznetsov
 
Posts: n/a

Default Re: Tool for comparing result of 2 stored procs - 11-07-2007 , 02:26 PM






On Nov 7, 8:00 am, Yash <yas... (AT) gmail (DOT) com> wrote:
Quote:
Hi,

We are in the process of tuning the performance of our stored procs in
SQL 2000 and are looking for a tool that would help us in comparing
the result sets of an old SP and a modified SP. The tool should take
as input the names of the 2 SPs, a set of parameter values and invoke
them. Internally it should compare the result sets returned and log/
display the difference in result sets if any.
We do not want to compare response time, but want to compare result
sets just to be sure that the modifications have not changed the
functionality of the SP.
The tool should also be able to compare result sets of SPs that give
out multiple record sets.

Please let us know which tool we can use.

Thanks,
Yash
we developed exactly that:

http://www.simple-talk.com/sql/t-sql...-procedures--/



Reply With Quote
  #3  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Tool for comparing result of 2 stored procs - 11-07-2007 , 06:03 PM



Yash (yashgt (AT) gmail (DOT) com) writes:
Quote:
We are in the process of tuning the performance of our stored procs in
SQL 2000 and are looking for a tool that would help us in comparing
the result sets of an old SP and a modified SP. The tool should take
as input the names of the 2 SPs, a set of parameter values and invoke
them. Internally it should compare the result sets returned and log/
display the difference in result sets if any.
We do not want to compare response time, but want to compare result
sets just to be sure that the modifications have not changed the
functionality of the SP.
The tool should also be able to compare result sets of SPs that give
out multiple record sets.
What I have done, and I don't claim to the most efficient, is to copy
and paste into two Excel sheets. The on the third Excel sheet, I add
this formula:

iif (sheet1!A1 =sheet2!A1; ""; "XXX")

and duplicated this cell all over the sheet. (Note: you have to have to
replace the semicolons with commas depending on your regional settings.)

For this to work, the result need to have an ORDER BY clause, or else
you may have accidental differences.

In my case, there is a little twist: if the result sets are completely
identical, I don't have to prepare the third sheet, or even copy into
the second. To wit, I run a tool Clipmate (from www.thornsoft.com)
that captures things put on the clipboard, and it confirms a new clip
with a sound. And if the new clip is identical to the current clip,
the sound is different!

Alas, I often that there minor differences in the result set, that are
not significant, or even are improvements of what I started with.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #4  
Old   
steve
 
Posts: n/a

Default Re: Tool for comparing result of 2 stored procs - 11-08-2007 , 03:03 PM



On Nov 7, 7:00 am, Yash <yas... (AT) gmail (DOT) com> wrote:
Quote:
Hi,

We are in the process of tuning the performance of our stored procs in
SQL 2000 and are looking for a tool that would help us in comparing
the result sets of an old SP and a modified SP.
Wouldn't it be nice if such a tool was not even necessary!

Basic Anatomy of Sql Server, part I
What is a stored procedure?
http://beyondsql.blogspot.com/2007/1...er-part-i.html

Basic Anatomy of Sql Server, part II
The unit test as part of the database.
http://beyondsql.blogspot.com/2007/1...r-part-ii.html

Basic Anatomy of Sql Server, part III
What does deferred name resolution really mean?
http://beyondsql.blogspot.com/2007/1...-part-iii.html

www.beyondsql.blogspot.com



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.