Results 1 to 6 of 6

Thread: Export all stored procedures to .sql files?

  1. #1
    Join Date
    Oct 2003
    Posts
    14

    Export all stored procedures to .sql files?

    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.

  2. #2
    Join Date
    Jan 2009
    Location
    Forest Grove, OR
    Posts
    5
    Right-mouse click on database, click Tasks, click Generate scripts.

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

  3. #3
    Join Date
    Jan 2009
    Location
    Forest Grove, OR
    Posts
    5
    Forgot to mention that this is within the SQL Server Management Studio.

  4. #4
    Join Date
    Oct 2003
    Posts
    14
    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.

  5. #5
    Join Date
    Jan 2009
    Location
    Forest Grove, OR
    Posts
    5
    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.

  6. #6
    Join Date
    Oct 2003
    Posts
    14
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •