how to i find out the user when stored procedure last modified

  • Hi All,

    how to i find out the user when stored procedure last modified

    i am able to get the list of sp's modified date

    using below Queries

    select modify_date,* from sys.objects

    select modify_date,* from sys.procedures

    select last_altered,* from information_schema.routines

    but not able to get the user name

    Please provide solution

  • Use source control for object changes in your database.

    If you can't use source control, use a DDL trigger to track the changes.

    But source control is really the correct solution.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • how to create source control

  • cooljagadeesh (12/3/2012)


    Hi All,

    how to i find out the user when stored procedure last modified

    i am able to get the list of sp's modified date

    using below Queries

    select modify_date,* from sys.objects

    select modify_date,* from sys.procedures

    select last_altered,* from information_schema.routines

    but not able to get the user name

    Please provide solution

    Where are you maintaining the different versions of SProcs ?

  • cooljagadeesh (12/3/2012)


    how to create source control

    http://www.bing.com/search?q=source+control+sql+server

    or

    http://www.google.com/#hl=en&sugexp=les%3Bernk_timediscountb&gs_nf=3&gs_rn=0&gs_ri=hp&cp=15&gs_id=1l&xhr=t&q=sql+server+source+control&pf=p&tbo=d&output=search&sclient=psy-ab&oq=sql+server+sour&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=ff2852371cfa3161&bpcl=39314241&biw=1920&bih=985

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • To do source control management easily, you will need to introduce other tools. The two primary ones are SQL Server Database Toos (SSDT) from Microsoft. These are built into Visual Studio. If you have VS 2012, you get them for free. If not, there is a download somewhere for it. But, this tool does require you to use Visual Studio.

    To stay within SQL Server Management Studio, you'll want to look to Red Gate Software (my employer) and our SQL Source Control product[/url]. I have an article I wrote on how to use our tool sets for monitoring changes in your environments[/url].

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply