473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 7769
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: A.M. de Jong | last post by:
Is there a command to store a stored procedure to a script in stead of doing it manual one by one with the generate script option. I would like to make a script which copies a bunch of stored...
3
by: Hello | last post by:
Hi all, I have 2 independent stored procedures(I cannot join them because of the group condition are different however they have the same cust id) but one for reading the summary and other showing...
2
by: serge | last post by:
My project is to automate testing of Stored Procedures of type SELECT (at least for now). I want to create a table where each stored procedure's input parameter values are entered and in another...
2
by: Rafael Faria | last post by:
Hi All, We are starting a large data warehousing project using DB2 8.2 on AIX. There is a direction to move any new internal development to Java and a question was raised: Would it be a good...
1
by: esmith2112 | last post by:
We all of a sudden find ourselves in dire straits, because we have one of those mysteries where everything used to work, and apparently, all of a sudden everything went to pot just in time for a...
3
by: Solution Seeker | last post by:
I want to Store the String value with Single Quotes in the Field of Database where if i try to Store the String value with Single Quotes (as it is) then it is throwing the error as SQL String...
11
by: Gregor Kovaè | last post by:
Hi! I have an SQL script with bunch of CREATE TABLES, ALTER TABLES, ... I'd like it to run transactially. I have found that id I run a ALTER STATEMENT inside a transaction and then roll it back...
1
by: ARK | last post by:
Some stored procedures call other stored procedures. When moving stored procedures as part of a release this requires that you create the children procedures before the calling procedures. Is...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.