Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDL to files for DB artifacts (Stored Procedures, Views, Triggers, etc) in a SQL Server DB. 1

Status
Not open for further replies.

davism

MIS
Nov 9, 2002
140
0
0
US
Hi,

Is there a way or command to use to get the DDL's to a file for each DB artifact in a SQL Server database?

So, for instance, if there are 3 stored procedures in a database: I want the DLL for each stored procedure to go into it's own unique file:

stored procedure 1 name is Test1. All it's DDL is stored in a file called Test1.SP
stored procedure 2 name is Test2. All it's DDL is stored in a file called Test2.SP
stored procedure 3 name is Test3. All it's DDL is stored in a file called Test3.SP

Then like views:

View 1 name is Test1View. All it's DDL is stored in a file called Test1View.vw
View 2 name is Test2View. All it's DDL is stored in a file called Test2View.vw
View 3 name is Test1View. All it's DDL is stored in a file called Test3View.vw

Thanks
 
Right-click on the database in question. Choose Tasks | Generate Scripts and work through the Wizard. It includes an option for one file per object.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top