You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ruslan Sivak <rs...@istandfor.com> on 2006/04/25 15:14:54 UTC

svn for SQL Server's Stored procedures?

Is there some utility somewhere which allows MS SQL Server's stored
procedures to be kept in subversion?

 

 


Re: svn for SQL Server's Stored procedures?

Posted by eg <eg...@gmail.com>.
Andy Levy wrote:

> The code
> changes are easy.  For the database, we don't make table changes via
> SQL (we use the GUI), and we don't have stored procedures.  I go into
> Enterprise Manager and script each object in the database, and check
> the resulting files into SVN.  Then the diff from one month to the
> next tells me what, if anything, has changed.  I used the procedure
> described here ->
> http://www.databasejournal.com/features/mssql/article.php/3389411 to
> create the SQL scripts; just make sure you select "one file per
> object" to make diffs easier.
> 

If you want to diff the scripts with subversion, just make sure that 
when you generate scripts you always select the Ansi and not Unicode 
file format from the dialog. Subversion will treat unicode files as 
binary files I believe.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn for SQL Server's Stored procedures?

Posted by Frank Gruman <fg...@verizon.net>.
Andy Levy wrote:
> On 4/25/06, Ruslan Sivak <rs...@istandfor.com> wrote:
>   
>> Is there some utility somewhere which allows MS SQL Server's stored
>> procedures to be kept in subversion?
>>     
>
> The stored procedures are kept within the database itself.  What you
> can do (and I would do, if the need was large enough), is have the
> developers/DBAs write the SPs outside SQL Server, save to files, and
> manage those files via SVN.  It does require some discipline, but if
> you separate by role the individuals installing the SPs from those
> writing them, it can be done. You can do your table & view definitions
> this way as well, and track your user accounts/roles/permissions as
> well.
>   

I think what you are looking for is something similar to what VSS has 
done with its integration into SQL Server.

The dt_addtosourcecontrol, dt_checkinobject, dt_checkoutobject, 
dt_isundersourcecontrol, etc stored procedures will all allow links 
directly from the database to source code control.  Unfortuantely they 
are only written for VSS.  I've not really looked into these much 
because we primarily work on Oracle databases and use Subversion in my 
department.  Although the concept is pretty intriguing where you could 
write a set of procedures that will check in your stored procedures from 
the database and allow you to work almost exclusively inside the 
database without having to worry about external flat files, I don't 
think anyone has paid much attention to this yet.

Oh the possibilities if only I had more time...


Regards,
Frank

Re: svn for SQL Server's Stored procedures?

Posted by Andy Levy <an...@gmail.com>.
On 4/25/06, Ruslan Sivak <rs...@istandfor.com> wrote:
>
> Is there some utility somewhere which allows MS SQL Server's stored
> procedures to be kept in subversion?

The stored procedures are kept within the database itself.  What you
can do (and I would do, if the need was large enough), is have the
developers/DBAs write the SPs outside SQL Server, save to files, and
manage those files via SVN.  It does require some discipline, but if
you separate by role the individuals installing the SPs from those
writing them, it can be done. You can do your table & view definitions
this way as well, and track your user accounts/roles/permissions as
well.

Example:  For my system, I'm required to produce a monthly report of
any changes (code and DB table definitions) to the system.  The code
changes are easy.  For the database, we don't make table changes via
SQL (we use the GUI), and we don't have stored procedures.  I go into
Enterprise Manager and script each object in the database, and check
the resulting files into SVN.  Then the diff from one month to the
next tells me what, if anything, has changed.  I used the procedure
described here ->
http://www.databasejournal.com/features/mssql/article.php/3389411 to
create the SQL scripts; just make sure you select "one file per
object" to make diffs easier.

It's kind of backwards from your question, but should hopefully give
you an idea.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org