Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 115819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:04:48+00:00 2026-05-11T03:04:48+00:00

I have been wondering how to put all the stored procedures on a SQL

  • 0

I have been wondering how to put all the stored procedures on a SQL 2000 under source control.
We are using Subversion for all our normal source code, so it would be great if there were a solution to the problem using Subversion.

Do you have any ideas?

Update 16-02-2009: This is the vbs script i used to export all the stored procedures:

Set con = CreateObject('ADODB.Connection') con.ConnectionString = '*** Database connection string here ***' con.Open  Set rs = CreateObject('ADODB.RecordSet') rs.ActiveConnection = con  strSQL = 'SELECT ROUTINE_NAME, ROUTINE_DEFINITION ' & _ 'FROM INFORMATION_SCHEMA.routines ' & _ 'WHERE ROUTINE_NAME NOT LIKE 'dt_%' ' & _ 'ORDER BY 1'  Set fso = CreateObject('Scripting.FileSystemObject') rs.Open strSQL  While Not rs.Eof      filename = rs('ROUTINE_NAME') & '.sql'     routineSQL = rs('ROUTINE_DEFINITION')     Set tf = fso.CreateTextFile(filename, True)     tf.Write routineSQL     tf.Close     set tf = Nothing      rs.MoveNext Wend Set fso = Nothing  rs.Close  Set rs = Nothing  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:04:49+00:00Added an answer on May 11, 2026 at 3:04 am

    As other people have said, start off with each stored proc in a separated text file that is under source control. Write a script that deletes all you stored procedures then re-creates them from the text files (while logging/reporting any errors) – this script should be easy to run. Then every time you update from source control rerun the script. All edits to stored procedures should be done to the text file, not the “live” copy on your local database otherwise you will loose changes when you do a update.

    You will soon want someway of auditing your database schema and creating upgrade scripts etc.

    If you are only using SQL server then consider SQL Compare from Reg-Gate. I think it will compare stored procs (and other sql) in a text file with what is in your database and sync the two. So letting you use the editing tools in SqlServer to edit the live stored procedures.

    (As of the end of 2009, Red-Gate is just about to ship Sql Compare for Oracle)

    I have been told that ApexSQL’s Diff tool is another option instead of Sql Compare, ApexSQL’s Edit claims to provide source control integration.

    At the high-end consider Visual Studio Team System Database Edition, however it costs a lot, then you may have to pay even more for Oracle support from a 3rd party. But if you are a Microsoft partner (or can become one) you may get some copes very cheaply.

    See also Do you source control your databases? on StackOverflow for a good set of answers on the bigger problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 285k
  • Answers 285k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to put the layer you want to reveal… May 13, 2026 at 4:44 pm
  • Editorial Team
    Editorial Team added an answer Cloning just clones the cursor on dataset, not duplicating the… May 13, 2026 at 4:44 pm
  • Editorial Team
    Editorial Team added an answer As you didn't name a specific programming language, here is… May 13, 2026 at 4:44 pm

Related Questions

While discussing how to process AT commands with a colleague, we discovered that contrary
I have set makepl_arg [INSTALLDIRS=site PREFIX=~/perl] mbuildpl_arg [--install_base ~/perl] in the CPAN.pm configuration. I
How would one test whether data structure built properly? I'm implementing kind of modified
Ok, I'm programming in objective-C and using Xcode. I have read through the documentation

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.