Tuesday, July 22, 2008

SQL Server 2005 Bug ?????????????????

Hi all ,

Found one Interesting & weird behavior in SQL Server 2005 . This might be a bug in SQL server 2005 . Thought of sharing with you please have a look at it.

Database Generation Wizard:

Right click on the database -> Tasks ->Generate Scripts -> continue clicking Next (select the DB and things…).

Stop here .. please read this msdn page http://msdn.microsoft.com/en-us/library/ms186472.aspx/ms186472.aspx

Include Descriptive Headers

When True, descriptive comments are added to the script separating the script into sections for each object. Default is False.

But according to Below diagram the default option is true ?????? This Question is to Microsoft . I had logged this Issue in Microsoft site. Waiting
For their reply, also this might have fixed in Latest service pack (Have to check this).











Because of this SQL Server behaves differently when it is true/false . Say if I Generate scripts 4 times to a file, SQL will create the same Store Proc 4 times in the file.
Change the option [Include Descriptive Headers ] to false continue taking the script for 4 times you will find the same proc 4 times in the scripts while if you set this option to true as shown aboveIt will overwrite the previous script without any duplication

No comments: