Click here to Skip to main content
15,905,967 members
Please Sign up or sign in to vote.
2.33/5 (2 votes)
I have a database with many stored procedures. I want to export those stored procedure statements into sql files, so I can execute them again.
I want to create a windows application to do such jobs.
Is there an existing tool can do such jobs?
How can I write the code in C# ?
Do you have any suggestion ?

I need your help. Thank you firstly.

The reason why I want to do this is that,
I had created many stored procedures, and I need all statements to execute when I install the application in a remote server.
Posted
Updated 9-Jun-11 2:42am
v2

This command might help,

select ROUTINE_DEFINITION from INFORMATION_SCHEMA.ROUTINES


Every row is a stored procedure
 
Share this answer
 
Comments
taony 9-Jun-11 8:43am    
Thank you, I am going to try this command.
taony 9-Jun-11 9:00am    
Thank you, you are right. It helped me a lot.
Why would you want to do that? If the stored procedures are already in the database, there's no reason to export them to their own files. You're completely defeating the purpose of having the stored procedures IN the database.
 
Share this answer
 
Comments
taony 9-Jun-11 9:00am    
Thank you for giving me a answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900