471,893 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,893 software developers and data experts.

Script to store stored procedures in seperate files

How does MicroSoft store the stored procedures in seperate files.
What tools are used.
Cause that's what I like to do too.

Arno de Jong,

The Netherlands.
(SCPTFXR does not have the option to store the stored procedures in
different files
I think)
Jul 20 '05 #1
2 7679
Enterprise Manager will do this for you: Right-click on the database, click
"Generate SQL script", select the option "Create one file per object".

You can do this programmatically using the Script method of the DMO
StoredProcedure object. Call .Script once for each SP with an appropriate
file name.

http://msdn.microsoft.com/library/en...f_m_s_0n1g.asp

--
David Portas
------------
Please reply only to the newsgroup
--

"A.M. de Jong" <ar****@wxs.nl> wrote in message
news:bp**********@reader11.wxs.nl...
How does MicroSoft store the stored procedures in seperate files.
What tools are used.
Cause that's what I like to do too.

Arno de Jong,

The Netherlands.
(SCPTFXR does not have the option to store the stored procedures in
different files
I think)

Jul 20 '05 #2
SQL Server stores the text of stored procedures/views/triggers in a
table called syscomments.

you could use SP_HELPTEXT spname to retrieve text for any stored
procedure
you could study the SP_HELPTEXT procedure and it will show you exactly
how microsoft retrieves the TEXT:) ENJOY

Peace:)


"David Portas" <RE****************************@acm.org> wrote in message news:<g8********************@giganews.com>...
Enterprise Manager will do this for you: Right-click on the database, click
"Generate SQL script", select the option "Create one file per object".

You can do this programmatically using the Script method of the DMO
StoredProcedure object. Call .Script once for each SP with an appropriate
file name.

http://msdn.microsoft.com/library/en...f_m_s_0n1g.asp

--
David Portas
------------
Please reply only to the newsgroup
--

"A.M. de Jong" <ar****@wxs.nl> wrote in message
news:bp**********@reader11.wxs.nl...
How does MicroSoft store the stored procedures in seperate files.
What tools are used.
Cause that's what I like to do too.

Arno de Jong,

The Netherlands.
(SCPTFXR does not have the option to store the stored procedures in
different files
I think)

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by A.M. de Jong | last post: by
1 post views Thread by esmith2112 | last post: by
11 posts views Thread by Gregor Kovač | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.