views:

66

answers:

2

When scripting a DB using SQL Server Management Studio (SSMS) it generates line like:

/****** Object:  ForeignKey [FK_NoteLinkAssociation_Link]    Script Date: 04/24/2009 10:04:46 ******/

Is there a way to stop it from generating that line or the date part of that line?

Reason: The DB is being scripted and stored in source control and when you do a diff on it versus the previous there are hundreds of lines with the data being different which doesn't help finding the real differences so any solution that addresses this problem would also be acceptable.

(SSMS2008 is being used against a 2005 DB.)

+1  A: 

In SSMS 2005, hopefully SSMS 2008 is not wildly different:

  • Tools...Options...Scripting
  • "General Scripting Options"
  • "Include descriptive headers" = false
gbn
Thanks gbn +1. I've marked SQLMenance as correct because I don't have SSMS 2005 to confirm. I wish I could mark both as correct - sorry.
Guy
He did answer correctly :-)
gbn
+1  A: 

In SSMS 2008 Tools..>Options..>SQL Server Object Explorer..>Scripting

First item under "General Scripting Options", make "Include descriptive headers" false

SQLMenace
On my version appears to be second option but just what I was looking for - thanks.
Guy