Re: Help with SQL 2005 and Sourcesafe 6



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
.



Relevant Pages

  • Re: nested stored procedures and returning lots of rows
    ... I initially thought of using nested stored procedures and returning ... proc then the called stored procs can't see it ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Error msg
    ... > I have corrected my stored procedures with what you said. ... In an interface like ADO you would iterate over ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.data.oledb)
  • Re: Error msg
    ... > The stored procedures looks like this: ... > // update record table here ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.data.oledb)
  • Re: Select *
    ... work, but yeild incorrect results. ... If you are using stored procedures, you can use sysdepends to track ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Select query help+primary key
    ... While SELECT * is handy when running ad hoc-queries, ... Finding which stored procedures is simple, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)