Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Tracking of changes

 
   Database Help (Home) -> Programming RSS
Next:  URGENT Help with STRIP on a Varchar(250) with TRA..  
Author Message
simon

External


Since: Jun 23, 2010
Posts: 4



(Msg. 1) Posted: Wed Jun 23, 2010 1:07 am
Post subject: Tracking of changes
Archived from groups: microsoft>public>sqlserver>programming (more info?)

Hi,

is it possible to see in sql2008 enterprise edition, when some
object(stored procedure, function,...) was changed?
Any idea, how to watch tracking of changes on objectts?

Thank you,
Simon

 >> Stay informed about: Tracking of changes 
Back to top
Login to vote
Uri Dimant

External


Since: Aug 24, 2003
Posts: 1744



(Msg. 2) Posted: Wed Jun 23, 2010 8:25 am
Post subject: Re: Tracking of changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

SELECT * FROM sys.procedures ORDER BY modify_date DESC


"simon" wrote in message

> Hi,
>
> is it possible to see in sql2008 enterprise edition, when some
> object(stored procedure, function,...) was changed?
> Any idea, how to watch tracking of changes on objectts?
>
> Thank you,
> Simon

 >> Stay informed about: Tracking of changes 
Back to top
Login to vote
simon

External


Since: Jun 23, 2010
Posts: 4



(Msg. 3) Posted: Thu Jun 24, 2010 12:49 am
Post subject: Re: Tracking of changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you Uri.
How can I track each change, is there some tool in SQL or I must write
some kind of trigger?

By the way, congratulate for yesterday match with Algeria Smile

Regards, Simon

On 23 jun., 14:09, "Uri Dimant" wrote:
> SELECT * FROM sys.procedures ORDER BY modify_date DESC
>
> "simon" wrote in message
>
>
>
>
>
> > Hi,
>
> > is it possible to see in sql2008 enterprise edition, when some
> > object(stored procedure, function,...) was changed?
> > Any idea, how to watch tracking of changes on objectts?
>
> > Thank you,
> > Simon- Skrij navedeno besedilo -
>
> - Prika¾i citirano besedilo -
 >> Stay informed about: Tracking of changes 
Back to top
Login to vote
simon

External


Since: Jun 23, 2010
Posts: 4



(Msg. 4) Posted: Thu Jun 24, 2010 7:50 am
Post subject: Re: Tracking of changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

also I would like to know if it's possible to see also which user made
a change to some procedure or function and not just last modified
date.

Regards,Simon

On 24 jun., 09:49, simon wrote:
> Thank you Uri.
> How can I track each change, is there some tool in SQL or I must write
> some kind of trigger?
>
> By the way, congratulate for yesterday match with Algeria Smile
>
> Regards, Simon
>
> On 23 jun., 14:09, "Uri Dimant" wrote:
>
>
>
> > SELECT * FROM sys.procedures ORDER BY modify_date DESC
>
> > "simon" wrote in message
>
> >
>
> > > Hi,
>
> > > is it possible to see in sql2008 enterprise edition, when some
> > > object(stored procedure, function,...) was changed?
> > > Any idea, how to watch tracking of changes on objectts?
>
> > > Thank you,
> > > Simon- Skrij navedeno besedilo -
>
> > - Prika 3/4 i citirano besedilo -- Skrij navedeno besedilo -
>
> - Prika¾i citirano besedilo -
 >> Stay informed about: Tracking of changes 
Back to top
Login to vote
Uri Dimant

External


Since: Aug 24, 2003
Posts: 1744



(Msg. 5) Posted: Fri Jun 25, 2010 2:25 am
Post subject: Re: Tracking of changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Create a trigger on database level
--Preventing changes to database objects

CREATE TRIGGER trgNoMonkeying ON DATABASE
FOR DROP_TABLE, ALTER_TABLE
AS
DECLARE @Message VARCHAR(255)
SELECT @message = 'You are forbiddent to alter or delete the '''
+ EVENTDATA().value('(/EVENT_INSTANCE/ObjectName)[1]',
'nvarchar(100)') + ''' table'
RAISERROR ( @Message, 16, 1 )
ROLLBACK ;
GO

"simon" wrote in message

Hi,

also I would like to know if it's possible to see also which user made
a change to some procedure or function and not just last modified
date.

Regards,Simon

On 24 jun., 09:49, simon wrote:
> Thank you Uri.
> How can I track each change, is there some tool in SQL or I must write
> some kind of trigger?
>
> By the way, congratulate for yesterday match with Algeria Smile
>
> Regards, Simon
>
> On 23 jun., 14:09, "Uri Dimant" wrote:
>
>
>
> > SELECT * FROM sys.procedures ORDER BY modify_date DESC
>
> > "simon" wrote in message
>
> >
>
> > > Hi,
>
> > > is it possible to see in sql2008 enterprise edition, when some
> > > object(stored procedure, function,...) was changed?
> > > Any idea, how to watch tracking of changes on objectts?
>
> > > Thank you,
> > > Simon- Skrij navedeno besedilo -
>
> > - Prika 3/4 i citirano besedilo -- Skrij navedeno besedilo -
>
> - Prika¾i citirano besedilo -
 >> Stay informed about: Tracking of changes 
Back to top
Login to vote
simon

External


Since: Jun 23, 2010
Posts: 4



(Msg. 6) Posted: Mon Jun 28, 2010 12:15 am
Post subject: Re: Tracking of changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 25 jun., 07:20, "Uri Dimant" wrote:
> Create a trigger on database level
> --Preventing changes to database objects
>
> CREATE TRIGGER trgNoMonkeying ON DATABASE
>     FOR DROP_TABLE, ALTER_TABLE
> AS
>     DECLARE @Message VARCHAR(255)
>     SELECT  @message = 'You are forbiddent to alter or delete the '''
>             + EVENTDATA().value('(/EVENT_INSTANCE/ObjectName)[1]',
>                                 'nvarchar(100)') + ''' table'
>     RAISERROR ( @Message, 16, 1 )
>     ROLLBACK ;
> GO
>
> "simon" wrote in message
>
>
> Hi,
>
> also I would like to know if it's possible to see also which user made
> a change to some procedure or function and not just last modified
> date.
>
> Regards,Simon
>
> On 24 jun., 09:49, simon wrote:
>
>
>
> > Thank you Uri.
> > How can I track each change, is there some tool in SQL or I must write
> > some kind of trigger?
>
> > By the way, congratulate for yesterday match with Algeria Smile
>
> > Regards, Simon
>
> > On 23 jun., 14:09, "Uri Dimant" wrote:
>
> > > SELECT * FROM sys.procedures ORDER BY modify_date DESC
>
> > > "simon" wrote in message
>
> > >
>
> > > > Hi,
>
> > > > is it possible to see in sql2008 enterprise edition, when some
> > > > object(stored procedure, function,...) was changed?
> > > > Any idea, how to watch tracking of changes on objectts?
>
> > > > Thank you,
> > > > Simon- Skrij navedeno besedilo -
>
> > > - Prika 3/4 i citirano besedilo -- Skrij navedeno besedilo -
>
> > - Prika¾i citirano besedilo -- Skrij navedeno besedilo -
>
> - Prikaži citirano besedilo -

Hi,

what about for alter stored procedure(not just table)? And also to
insert somewhere which user is altering the procedure?

Thanks, Simon
 >> Stay informed about: Tracking of changes 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 2061



(Msg. 7) Posted: Mon Jun 28, 2010 6:25 pm
Post subject: Re: Tracking of changes [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

simon ( ) writes:
> what about for alter stored procedure(not just table)? And also to
> insert somewhere which user is altering the procedure?

If you want log other events, you would add that to the action list
for the trigger. Look up DDL triggers in Books Online for more information.


--
Erland Sommarskog, SQL Server MVP, esquel RemoveThis @sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 >> Stay informed about: Tracking of changes 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
tracking "sa" - Is there a way to log the ip address of user "sa" and what changes "sa" makes? So if we have 3 people with "sa" and one makes changes to a db we can find out what IP did it? Thanks

Tracking Errors - Hi All, We are having an application from a vendor that, after some customization, will be deployed to our client. We don't want to change any any code/ stored procedure etc. But we still want to be aware of the errors that occurs. For example if a ro...

tracking columns value changes using triggers - Consider the following table; CREATE TABLE mytable ( keyvalue char(20) PRIMARY KEY, field1 char(10), field2 int ); I would like to create a trigger that would allow me to log changes to the field keyvalue AND I would like to be able to record the..

A couple of time-tracking questions - I have a potential client who tracks trucker employee time as a lump sum value for the day (transcribed from job tickets) and thus does not use a "time-in/time-out" scheme. Other employee time is tracked using time-in and time-out. It seems ...

Tracking the job status of another server - Hello, From ServerA, I want to track the status of a sql agent job 'FULL_db_Backup' in ServerB, because mail is not enabled in ServerB. The job is scheduled to run daily at 1am in ServerB and usually takes 1 hour. I am planning to create the monitor....
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]