I know that you can do this in SQL Server 2005, but I'm at a loss for 2000.
我知道你可以在SQL Server 2005中做到这一点,但我对2000年感到茫然。
4 个解决方案
#1
1
Not to my knowledge.
不是我的知识。
To get around this, I manage my stored procedures in a Visual Studio database project. Every stored procedure is in its own file and has a drop command at the top of the file. When I update the stored through Visual Studio, the database's created date is updated in the database because of the drop/create statement. I am able to use the created date in SQL Server 2000 as the last modified date in this manner.
为了解决这个问题,我在Visual Studio数据库项目中管理我的存储过程。每个存储过程都在其自己的文件中,并在文件顶部有一个drop命令。当我通过Visual Studio更新存储时,由于drop / create语句,数据库的创建日期在数据库中更新。我能够以这种方式将SQL Server 2000中创建的日期用作最后修改日期。
#2
0
From all the research I've done on this in the past, I unfortunately have to say no. SQL Server 2000 simply does not store this information, and I've never seen any solution for retrieving it.
从我过去所做的所有研究中,我不幸地说不。 SQL Server 2000根本不存储此信息,我从未见过任何检索它的解决方案。
There are a few alternative methods, but they all involve user intervention. Besides keeping stored procedure scripts in a source control system, I think the next best approach is to use comments inside the stored procedure. Not ideal, but it's better than nothing if you want to track what gets updated.
有一些替代方法,但它们都涉及用户干预。除了将存储过程脚本保存在源控制系统中之外,我认为下一个最好的方法是在存储过程中使用注释。不理想,但如果你想跟踪更新的内容,它总比没有好。
#3
0
SELECT crdate
FROM sysobjects
WHERE name = 'proc name here'
AND type = 'P'
#4
0
It looks like you could use : SELECT * FROM INFORMATION_SCHEMA.ROUTINES
看起来你可以使用:SELECT * FROM INFORMATION_SCHEMA.ROUTINES
Found here : Date object last modified
在此处找到:上次修改日期对象
#1
1
Not to my knowledge.
不是我的知识。
To get around this, I manage my stored procedures in a Visual Studio database project. Every stored procedure is in its own file and has a drop command at the top of the file. When I update the stored through Visual Studio, the database's created date is updated in the database because of the drop/create statement. I am able to use the created date in SQL Server 2000 as the last modified date in this manner.
为了解决这个问题,我在Visual Studio数据库项目中管理我的存储过程。每个存储过程都在其自己的文件中,并在文件顶部有一个drop命令。当我通过Visual Studio更新存储时,由于drop / create语句,数据库的创建日期在数据库中更新。我能够以这种方式将SQL Server 2000中创建的日期用作最后修改日期。
#2
0
From all the research I've done on this in the past, I unfortunately have to say no. SQL Server 2000 simply does not store this information, and I've never seen any solution for retrieving it.
从我过去所做的所有研究中,我不幸地说不。 SQL Server 2000根本不存储此信息,我从未见过任何检索它的解决方案。
There are a few alternative methods, but they all involve user intervention. Besides keeping stored procedure scripts in a source control system, I think the next best approach is to use comments inside the stored procedure. Not ideal, but it's better than nothing if you want to track what gets updated.
有一些替代方法,但它们都涉及用户干预。除了将存储过程脚本保存在源控制系统中之外,我认为下一个最好的方法是在存储过程中使用注释。不理想,但如果你想跟踪更新的内容,它总比没有好。
#3
0
SELECT crdate
FROM sysobjects
WHERE name = 'proc name here'
AND type = 'P'
#4
0
It looks like you could use : SELECT * FROM INFORMATION_SCHEMA.ROUTINES
看起来你可以使用:SELECT * FROM INFORMATION_SCHEMA.ROUTINES
Found here : Date object last modified
在此处找到:上次修改日期对象