Generate SQL Scripts

During my current development project, I have a bunch of new stored procedures that I want to script out – and add to TFS (Team Foundation Server).

Ordinarily, I would use the “Generate Scripts” option within SQL Server Management Studio.

image

But – after selecting the 10-20 procs to script out, I was only able to output this to ONE file :

image

This is annoying, as I know there used to be a way to extract into multiple files. 

Especially with regard to Source Control – need to be able to show history / differences – and have multiple developers working on procs. (EACH proc.)

Someone suggested I check which version of SQL Server was installed on my local PC – and the Help > About showed version “9.00.2047”

From reading this post, it looks like I’ve only got SQL Server 2005 SP1.

  • RTM – 2005.90.1399
  • SQL Server 2005 Service Pack 1 – 2005.90.2047
  • SQL Server 2005 Service Pack 2 – 2005.90.3042

So – after installing “SQL Server 2005 Service Pack 2” – I can now export to multiple files !

image

Just need to select the “path” now – not specify the “file name” – as this will be from the name of the stored proc.

I’m surprised that this feature was “dropped” from SQL Server, when the new SQL Server 2005 product was released – as I’m pretty sure it was in SQL Server 2000.

But – good that the feature is back – just need SP2.

I wonder what this screen looks like in SQL Server 2008 ?!?

Advertisements

2 thoughts on “Generate SQL Scripts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s