|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Stored procedures change dateHi, where can I find last change date for a stored procedure, in management
studio it shows create-date but not when it last changed. Good to have when there are lots of developers on a test server... Thanx Jonas Check the information_schema.routines view
SELECT SPECIFIC_NAME, CREATED, LAST_ALTERED FROM information_schema.routines Do you store scripts for your objects in a source code repository (such as VSS)? It is a good idea because it allows you to see what changed, when it changed, who changed it, and what the previous version(s) looked like. If you aren't creating your objects from scripts and storing those scripts within a source code repository, I encourage you to think about that option. -- Show quoteKeith Kratochvil "Jonas" <Jo***@discussions.microsoft.com> wrote in message news:8B32D938-6ED6-4208-9CB5-01F77B240A1E@microsoft.com... > Hi, where can I find last change date for a stored procedure, in > management > studio it shows create-date but not when it last changed. > Good to have when there are lots of developers on a test server... > > Thanx > > Jonas
Show quote
"Keith Kratochvil" wrote: Thank you Keith (and Andrew too). > Check the information_schema.routines view > > SELECT SPECIFIC_NAME, CREATED, LAST_ALTERED > FROM information_schema.routines > > Do you store scripts for your objects in a source code repository (such as > VSS)? It is a good idea because it allows you to see what changed, when it > changed, who changed it, and what the previous version(s) looked like. If > you aren't creating your objects from scripts and storing those scripts > within a source code repository, I encourage you to think about that option. > > -- > Keith Kratochvil > > > "Jonas" <Jo***@discussions.microsoft.com> wrote in message > news:8B32D938-6ED6-4208-9CB5-01F77B240A1E@microsoft.com... > > Hi, where can I find last change date for a stored procedure, in > > management > > studio it shows create-date but not when it last changed. > > Good to have when there are lots of developers on a test server... > > > > Thanx > > > > Jonas > > > We will consider using source safe or other source code repository, what alternatives is there to VSS? Regards Jonas There is not a way to see the last changed date unless you use a source
control tool as mentioned or you always drop and recreate. An ALTER will not change any dates. -- Show quoteAndrew J. Kelly SQL MVP "Jonas" <Jo***@discussions.microsoft.com> wrote in message news:8B32D938-6ED6-4208-9CB5-01F77B240A1E@microsoft.com... > Hi, where can I find last change date for a stored procedure, in > management > studio it shows create-date but not when it last changed. > Good to have when there are lots of developers on a test server... > > Thanx > > Jonas In SQL Server 2005, meta-data is kept for modifications. For procedures, this is visible through
sys.procedures and INFORMATION_SCHEMA.MODULES. I fully agree about using source control, I should add... USE tempdb GO CREATE PROC p AS SELECT 1 GO SELECT name, create_date, modify_date FROM sys.procedures GO ALTER PROC p AS SELECT 2 GO SELECT name, create_date, modify_date FROM sys.procedures GO SELECT SPECIFIC_NAME, CREATED, LAST_ALTERED FROM information_schema.routines -- Show quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message news:eJs%23EOI9GHA.3280@TK2MSFTNGP02.phx.gbl... > There is not a way to see the last changed date unless you use a source control tool as mentioned > or you always drop and recreate. An ALTER will not change any dates. > > -- > Andrew J. Kelly SQL MVP > > "Jonas" <Jo***@discussions.microsoft.com> wrote in message > news:8B32D938-6ED6-4208-9CB5-01F77B240A1E@microsoft.com... >> Hi, where can I find last change date for a stored procedure, in management >> studio it shows create-date but not when it last changed. >> Good to have when there are lots of developers on a test server... >> >> Thanx >> >> Jonas > > |
|||||||||||||||||||||||