Re: Tracking Stored Procedure changes

From: Erland Sommarskog (sommar@algonet.se)
Date: 07/27/02


From: Erland Sommarskog <sommar@algonet.se>
Date: Sat, 27 Jul 2002 21:45:34 +0000 (UTC)


Neal Wright (nwright@edgewater.com) writes:
> I recall earlier versions of SQL Server contained an
> update timestamp for tracking stored procedure
> modifications. Does anyone have any idea if this is
> possible in 2k? I see that 2k has a version number of
> sorts in the sysobjects table but this merely notes that
> it has been modified.

In SQL 6.5 your only option when you changed a stored procedure was
to drop the existing version and then create it anew. This way
sysobjects.crdate would reflect when the procedure last was updated
in the database.

In SQL7/SQL2000 you can change the procedure with ALTER PROCEDURE which
does not change sysobjects.crdate. It appears though that
sysobjects.schema_ver is updated each time, so if you save the previous
value, you can tell that someone has fiddled with the procedure, but
you cannot tell when.

-- 
Erland Sommarskog, SQL Server MVP
sommar@algonet.se
Books Online (updated!) for SQL 2000 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp


Relevant Pages

  • Re: Views vs Stored Procedures, whats the difference?
    ... I hope you are not suggesting you embed SQL queries into the application? ... A stored procedure logic will be exactly as fast as the algorithm you ... I understant that SQL Server supports hints. ... implementations (nestedloop, merge, hash, ..) on decent sized tables, then ...
    (comp.databases.ms-sqlserver)
  • Re: Stored Procedures - Patterns and Practices
    ... >published the reasoning behind its opinions. ... I disagree that the debate in SQL Server related discussion forums ... If the natural key is long or spans too many ... I want to call a stored procedure that adds a customer ...
    (microsoft.public.sqlserver.programming)
  • Re: Issue with retrieving large data over web using Stored Procedu
    ... how do I go about analyzing a stored procedure with selecting ... Is there any tool in the SQL Profiler that analyze each Trace? ... "Active Server Pages error 'ASP 0113' ... This email account is my spam trap ...
    (microsoft.public.inetserver.asp.db)
  • Re: XML vs SQL Server
    ... The built in factory assumes a common syntax among the ... So as long as the sql can be shared, ... procedures for Sql Server and stored procedure for Oracle? ... Oracle supports stored procedure overloads, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: XML vs SQL Server
    ... Then, yes, the built in factory will be sufficient. ... So as long as the sql can be shared, ... procedures for Sql Server and stored procedure for Oracle? ... Oracle supports stored procedure overloads, ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast