# Database Discussions > Microsoft SQL Server 2005 >  Export all stored procedures to .sql files?

## joshk

In SQL Server 2000 it was pretty easy to export all stored procedures to individual query files.  I've been scouring SQL Server 2005 and have not found a way to do this -- only to script all of them to a single file.  I have SSIS installed if that helps.  Any suggestions appreciated.

----------


## rljones39

Right-mouse click on database, click Tasks, click Generate scripts.

In the Script Wizard, choose script to file and select one file per object.

----------


## rljones39

Forgot to mention that this is within the SQL Server Management Studio.

----------


## joshk

The "one file per object" option exists in SQL Server 2000 Enterprise Manager, but not in SQL Server 2005 Management Studio.  I only have the option to export everything to a single .sql file.

----------


## rljones39

The option is available in my copy of Microsoft SQL Server 2005 Standard Edition Management Studio, as well as all versions of 2008 including Express Edition.  Are you by chance using the 2005 Express Edition?  I don't have a copy available to test with.  I used the 2008 Express Management Studio against a 2005 Database and it worked fine.  You might try that.

----------


## joshk

Found the problem (and I'm using Standard Edition).  I needed to install SP2.  The service pack restores the feature, which MS had stripped out from the initial release of SQL Server 2005.

----------

