Solved

SQL Server Stored Procedure code compiled

Posted on 2014-03-25
3
505 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:bhess1
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:
bhess1 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

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…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 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