Source Control for T-SQL

Source Control for T-SQL

Post by Bob Bryento » Sat, 31 Aug 2002 06:32:40



Has anyone come up with a way of providing source
control, say with Source Safe, for all of the Stored
Procs, Functions, and Triggers that an application will
use?

I can do this externally, but if I use the .NET IDE,
wouldn't it be nice if all of the scripts were checked in
and out through Source Safe?

 
 
 

Source Control for T-SQL

Post by Ivan Demkovitc » Sat, 31 Aug 2002 06:43:48


Quote:> I can do this externally, but if I use the .NET IDE,
> wouldn't it be nice if all of the scripts were checked in
> and out through Source Safe?

Yeh... You right. It will be nve to do this.

 
 
 

Source Control for T-SQL

Post by Alvin Zhao[M » Wed, 04 Sep 2002 17:02:20


Hi Bob,

You can use VSS to keep your stored procedure under safe control. To make
this,
you can follow the steps below.

1) Install VS.Net on client machine

2) Install VSS on client machine

3) Open the VS.Net IDE and make sure that they have enabled "version
control"
on the tools=>options=>database tools tab. The option is "Enable version
control"

4) Install VSS on server machine

5) Make sure SQL is running as a domain account and that that account has
been
added to the VSS database on the server

6) Run the VS.Net install on the server machine, deselecting everything but
"Server components/VS 6 Stored Procedure Version Control"

7) Open the VS.Net IDE and create a connection to that SQL database making
sure
to use NT authentication.

8) Right click on the stored procedure node and select add to Source
Control,
This creates the initial project structure in VSS

9) You must now still add the individual SP's. You can click on the top one,
hold down shift, and click on the last one. This will highlight all the
SP's
allowing you to right click and add to Source Control

Sincerely,

Alvin Zhao
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

1. Urgently Need SQL Source Control (Version Control)

Please let me know if you feel there is a more appropriate forum for this
question.

As more and more of my applications use stored procedures like traditional
programming functions, I need to manage my SQL just like any other source
code. As a developer and I'm very familiar with Visual Source Safe, but I
can't figure out if I can attach my SQL Server to VSS. Can this be done?

I want to put as much of the db under source control as possible, (eg;
Procs, Tables, Triggers....), and I need Version Control (History) more than
the ability to check in and out, but that would be way cool too.

If VSS is not the right tool, then what is?

If there is no such tool, do you think this will work:
1. Write a scheduled job to generate SQL scripts for all DB objects
(hopefully, as separate files) and then save the files into a specific
folder with the solution/project folder.
2. If the folder is checked into VSS and the folder is part of my solution,
then when I check in my work (nightly), the SQL script files would be
checked in also. Thus, giving me a version history.

What do you think? What's the best way to get Version Control in MS SQL
Server 2000?

2. 14684-FL-Ft. Lauderdale-PeopleSoft-UNIX-ORACLE-Payroll Applications-Human Resour

3. Create User Control as Data Source Using ADO Data Control

4. Updating and inner joins

5. Differences between SyBase TSQL, and SQL Server 2000 TSQL

6. comp.databases.sybase Frequently Asked Questions (FAQ)

7. changing source file in DTS through TSQL

8. ANN: Scripting lang adds SQL database support

9. SQL Server 2K, Enterprise Manager, and Source Code Control

10. SQL and Source Code Control

11. Stored Procedures Under Source Control with SQL Server 2000

12. Putting sql server 2000 database objects under VSS Source Control

13. SQL Server Source control