Script SQL 2005 database to individual files?



I am trying to script the DROP(IF EXISTS) and CREATE for all of my
tables, views, stored procs, and functions to individual SQL text files
(one per object). This was trivially done in SQL 2000 with Enterprise
Manager, but when I try in SQL 2005 through Management Studio my only
"script mode" options are:

- Script to file (which is one huge file with everything)
- Script to Clipboard
- Script to New Query Window

FYI, I get to this screen through Management Studio by right clicking
on a database and selecting Tasks > Generate Scripts... > Next (doesn't
seem to matter what combo of objects I select to script or what other
options). I am using SQL Server 2005 Developer (which is Microsoft SQL
Server Management Studio 9.00.1399.00).

Any solution to this (i.e. via Management Studio, command line, etc.)
would be greatly appreciated.

Thanks.
Ted

.



Relevant Pages

  • Re: Vista hosting XPe tools/db
    ... Are you running this script on the machine that actually has the SQL server ... machine hosting the database. ... i don't know if you can install a second instance of SQL ...
    (microsoft.public.windowsxp.embedded)
  • Re: ActiveX script works in DTS but not in job, why?
    ... Account that SQL Agent runs under and it is a Local Admin on the box. ... As another test I saved the script as a .vbs file and tried running it, ... Microsoft OLE DB Provider for SQL Server ... that would be since I need to be able to load DTS packages from either a SQL ...
    (microsoft.public.sqlserver.dts)
  • Re: Enterprise Manager Newbie Question
    ... a SQL backup is not a simple copy of the database files. ... Is it possible to write a script that one could run from a workstation and ...
    (microsoft.public.sqlserver.tools)
  • Re: Vista hosting XPe tools/db
    ... here's an alternative script using the Microsoft ADO as ... opposed to the SQL DMO - this should allow this script to work ... Microsoft Windows XP Embedded Test Team ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.windowsxp.embedded)
  • Re: SQL Management Studio and Visual Studio 2005
    ... Don't know of any fix. ... work from Management Studio and when you want to open a .sql ... Text and open SQL files in whatever directory. ... Unfortunately, for some reason every time I try to open a script, it ...
    (microsoft.public.sqlserver.tools)

Loading