Friday, February 17, 2012

extracting DDLs in SQL Server

I really apprciate any idea's

On extracting ddl's for each object on a separate file in SQL Server?

Something like ddl's for:
procedure1.sql, procedure2.sql....so on procedure100.sql
onto a file server.

Does SQL Server has any API's like Oracle's dbms_metadata?

Or can we use SQL enterprise manager to do this job?

Thanks, Madhavi.In Query analyser, you can right click on most objects in the object browser
and select "Script object to" and choose your reference....

In enterprise manager you can right click on a DB and select "Generate SQL Script"...from there a window appears where you can choose what object types to script (Tables/UDF/Stored procs/User defined types...)|||Thanks

How can I automate this process? As, I will have to schedule this process to run daily.

Madhavi.|||I'd use SQL-DMO (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqldmo/dmoref_con01_85f7.asp).

-PatP

No comments:

Post a Comment