Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to trace Stored Procedure modifications histor

Author  Topic 

vyelchri
Starting Member

12 Posts

Posted - 2009-06-23 : 00:31:24
Hi,

i want to trace the no. of times the stored procedure is modified along with date and time. i want dates and times the no. of the times the SP is being modified.

Can some body plz assist me?

Thanks,
VB

chih
Posting Yak Master

154 Posts

Posted - 2009-06-23 : 01:00:24
you can use database trigger
Go to Top of Page

vyelchri
Starting Member

12 Posts

Posted - 2009-06-23 : 01:22:20
Is it a predefined Database trigger or i need to write a DB trigger to trace the modified date and time.

If i write a DB trigger for tracing how it should apply to all the stored procedures in the database. i want to trace the modified dates for many Stored Procedures.

can u suggest any simple way to do this task?

Thanks,
VB
Go to Top of Page

chih
Posting Yak Master

154 Posts

Posted - 2009-06-23 : 01:31:28
I am not sure about other simple ways. But as I do not want to pay for 3rd party applications, I simply write a ddl trigger which trace every single modificaitons.
What I did is write a ddl trigger which fires when DDL_DATABASE_LEVEL_EVENTS occured

I also use this as source control
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-06-23 : 07:11:06
Have a look at this article, should cover what you need:

http://www.sqlteam.com/article/using-ddl-triggers-in-sql-server-2005-to-capture-schema-changes

- Lumbago
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-06-23 : 07:13:55
You can't do this back in time though so if you need this auditing data right now you're gonna have to find it manually by asking colleagues etc.

- Lumbago
Go to Top of Page
   

- Advertisement -