Saturday, August 8, 2009

Compare SQL Databases

If you ever come across a situation where your application behaves differently with different DBs you have and not sure if any of the Stored procedures have changed...?
Following SQL script can be used to compare the Stored procedures.
select top SYSCOM_1.text, DB2.text 
from MyDATABASE_1.dbo.syscomments SYSCOM_1 
inner join 
sysobjects so on so.id=SYSCOM_1.id inner join 
(select SYSCOM_2.text,SYSCOM_2.id, so.name from MyDATABASE_2.dbo.syscomments SYSCOM_2inner join MyDATABASE_2.dbo.sysobjects so on so.id=SYSCOM_1.id )
DB2 on so.name = DB2.name COLLATE DATABASE_DEFAULT 
where DB2.text <> SYSCOM_1.text COLLATE DATABASE_DEFAULT

Tuesday, August 4, 2009

Security update for Microsoft Visual Studio 2005

On July 28th, MS rolled out a security upgrade for MS Runtime files. If you haven't built your c++ project from last few day, you have a surprise waiting.

Welcome to the world of Manifest Hell!!!. Soon your eventviewer will be filled with SideBySide error. If you haven't rebuilt of your binaries completely, you will end up getting two entries in your binary manifest. If your test machine is not updated with latest windows updates, your application will not launch at all. You need to update have the runtime binary with newer Runtime.

So here is what you need to do if you are getting SideBySide error.

Open the manifest file(Or the Binary if you are embedding the manifest). See if it has two entries for dependency..













8.0.50727.4053 is the new version after the upgrade.

rebuild all the Dependant projects, so that all are using the newer runtime. In all cases make sure you have only one dependency, if there are more look for its dependency and rebuild'em.

Yes, its simple. Just rebuild.

Finally, Make sure you package right redistributable installer in the final installer.
Posted by Picasa