Re: Help with SQL 2005 and Sourcesafe 6
- From: "Nomad" <nonsense@xxxxxxxxxxxxxx>
- Date: Fri, 2 Feb 2007 14:10:53 -0000
I understand where you're coming from but if you open up the .sql script
file, which is based on a stored procedure in the database, in a query
window and then compile it, you have only compiled the .sql file, not the
stored procedure in the database that it belongs to. How does the stored
procedure in the database get updated?
Appreciate the help.
"Erland Sommarskog" <esquel@xxxxxxxxxxxxx> wrote in message
news:Xns98CA37AC6B3DYazorman@xxxxxxxxxxxx
Nomad (nonsense@xxxxxxxxxxxxxx) writes:
Thanks for your reply. One thing with VB code is that once you have
checked it in, the code is not compiled, but it is the latest version.
That doesn't seem to be the case with stored procedures.
Not sure what you mean here. The latest version is simply what was
checked in most recently. If it isn't checked in, it does not exist
from a CM point of view.
My question is if you have your scripted stored procs in VSS, do you
then have to, say, run an alter script @ the end of the day which
updates the databases stored procs with the modified procs from VSS?
In principle, this is no different than VB code: you will have to
compile that latest version to be table to use it.
But you of course be missing the tools to this in a convenient way. A
simple-minded way is to have scripts that goes:
IF object_id('dbo.this_sp') IS NOT NULL
DROP PROCEDURE dbo.this_sp
go
CREATE PROCEDURE dbo.this_sp ....
The file would then also have all permissions needed, since would be
dropped to.
Another alternative is to have a dummy in the beginning of the
file:
IF object_id('dbo.this_sp') IS NULL
EXEC('CREATE PROCEDURE dbo.this_sp AS SELECT 12')
go
ALTER PROCEDURE dbo.this_sp
In our shop we have our own toolset, which is quite advanced by now -
we've had it for over ten years. It's available at
http://www.abaris.se/abaperls/ as freeware, but it may be doing too
much for you.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: Help with SQL 2005 and Sourcesafe 6
- From: Erland Sommarskog
- Re: Help with SQL 2005 and Sourcesafe 6
- From: Ed Murphy
- Re: Help with SQL 2005 and Sourcesafe 6
- References:
- Re: Help with SQL 2005 and Sourcesafe 6
- From: Erland Sommarskog
- Re: Help with SQL 2005 and Sourcesafe 6
- Prev by Date: Error when trying to save or write to table
- Next by Date: Re: Error when trying to save or write to table
- Previous by thread: Re: Help with SQL 2005 and Sourcesafe 6
- Next by thread: Re: Help with SQL 2005 and Sourcesafe 6
- Index(es):
Relevant Pages
|