Solved

SQL Server Stored Procedure code compiled

Posted on 2014-03-25
3
507 Views
Last Modified: 2014-03-26
I am using SQL Server 2005 on a system using many stored procedures.
A standby server has the same stored procedures by due to on-going maintenance it may be possible that changes in the main server may not have been updated in every case.
Is it possible to compare the compiled stored procedure compiled code in the main server with the same stored procedure compiled code in the standby server ?
There may be differences in the source code due to varying comments so a textual comparison may yield false differences in functionality.
0
Comment
Question by:alcindor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 32

Expert Comment

by:Brendt Hess
ID: 39954599
There are a few tools that may do what you need.

The most commonly used tool for this is a paid one - Red Gate's SQL Compare.  It is pricey, but good.  You may be able to kludge up a free version using two tools from Red Gate's free tools - Red Gate Scream (small tool to compare two Compare snapshots), and Red Gate Snapper (small tool to take a snapshot of a DB).

OpenDBDiff (at http://opendbiff.codeplex.com/) looks interesting and seems to do what you are asking for as well.  It is open source and free.

Also the Toad for SQL Server Freeware edition should be able to do this.  You can find it at http://www.toadworld.com/m/freeware/default.aspx

Hopefully, one or more of these will do what you need.
0
 
LVL 32

Accepted Solution

by:
Brendt Hess earned 500 total points
ID: 39954602
As far as I know, a comparison of compiled code (1) is not currently possible, and (2) could also result in inaccurate comparisons, because of different execution plans when compiled (which does happen, more often than you would think).  If one of the tools above allows you to exclude comments in the comparison, that should do the trick.
0
 
LVL 2

Author Closing Comment

by:alcindor
ID: 39955775
Thanks for your comments, I will check out the links supplied.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question