June 17, 2003 at 7:32 am
Is there a way to find who modified the table, when the record had been deleted?
June 17, 2003 at 7:35 am
Hi tyang,
quote:
Is there a way to find who modified the table, when the record had been deleted?
are you looking for the user who deleted the record?
You can use CURRENT_USER or USER_NAME() to get this.
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 17, 2003 at 7:48 am
Basicly I am looking for the way to view the transaction log.
June 17, 2003 at 7:52 am
quote:
Basicly I am looking for the way to view the transaction log.
you can try log explorer from http://www.lumigent.com
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 17, 2003 at 8:03 am
Can T-SQL do it since third party tool is not possible for me now.
I tried DBCC log(DB name), I don't understand the result.
June 17, 2003 at 8:05 am
quote:
I tried DBCC log(DB name), I don't understand the result.
Welcome to the club!
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 18, 2003 at 2:25 am
This is something I've been trying to do for a while. The best solution I've come up with is an audit table.
I've looked at writing apps that don't actually delete records, rather they flag them as deleted so that the audit simply needs to store PK, user details, date/time and action but it becomes more hassle that it's worth.
Another option was to write the deleted record to an audit db, but again it became too much aggro.
June 18, 2003 at 4:09 am
LockwoodTech http://www.lockwoodtech.com/index_lognavigator.htm has an item in beta you can download. Might do the job. The output of DBCC LOG isn't extremely complicated just cryptic and takes quit a bit of time to work with. But ty the link and let us know what you think.
June 18, 2003 at 7:35 am
You could add a trigger to the table, that could log the deleted records to an audit trail table.
June 18, 2003 at 9:23 am
Again since my boss does not want to spend much money on the third party tools, I will try it on my own, but there are too many tables, so it is hard to set the triger on every table.
June 18, 2003 at 2:47 pm
Either spend a bit of money, or preferably a bit of time, or forget auditing changes to the data. Databases require administration and good design.
June 20, 2003 at 2:39 am
Hi tyang,
quote:
Again since my boss does not want to spend much money on the third party tools, I will try it on my own, but there are too many tables, so it is hard to set the triger on every table.
maybe you should tell your boss, to consider the implicit cost when things go wrong. These could easily outweight the money he thinks to save right now.
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 20, 2003 at 7:05 am
Triggers are 'free'. That's why I suggested it. I've never done it, but I assume that you could write a stored procedure that could add the triggers to every table in the db, loging all deletes (or whatever you wanted) to a table, for example.
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply