SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


User permissions Related


User permissions Related

Author
Message
sam king
sam king
SSC-Enthusiastic
SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)SSC-Enthusiastic (129 reputation)

Group: General Forum Members
Points: 129 Visits: 130
Hi friends,

user need access to check which user has executed delte/drop queries.
for this which access we need to give to that user..

need help asap..


Thanks,
SAM

Regards,
SAM
***Share your knowledge.It’s a way to achieve immortality----Dalai Lama***
anthony.green
anthony.green
SSC Guru
SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

Group: General Forum Members
Points: 62576 Visits: 8594
Unless your tracing all your queries you wont know about deletes, for drops if your quick enough you could look inside the default trace, but that gets overwritten quite quickly so you would need a process to load in the trace files before they get overwritten.

Easiest option is to put a DDL trigger on the databases in question for the DROPs and then put DML triggers on the tables you want to know who's deleting from to farm out the username and a timestamp when a record is deleted. But this will be a going forward audit, not a back in time audit.



How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


AppSup_dba
AppSup_dba
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1332 Visits: 716
Create a trace and filter all keywords (insert/update/dete etc) and log to a table....

Cheers
Gianluca Sartori
Gianluca Sartori
SSC Guru
SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)SSC Guru (56K reputation)

Group: General Forum Members
Points: 56489 Visits: 13367
The easiest tool for this job is an audit.
More information can be found here: http://msdn.microsoft.com/it-it/library/cc280386.aspx

--Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
kevaburg
kevaburg
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10603 Visits: 1211
You could give the user the ALTER TRACE permission and let them run the Profiler when they need it.

Just be sure to tell them how NOT to use it first though!
sqldriver
sqldriver
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5138 Visits: 2578
I picked up this technique from a Kalen Delaney article that I can't seem to find now. Might not help if it was not a recent transaction.


DECLARE @a NVARCHAR(MAX) = N''
DECLARE @b VARBINARY(MAX)
SELECT @a = [Transaction ID] FROM fn_dblog(NULL, NULL) WHERE [Transaction Name] = N'DROP'
SELECT @b = MAX([Transaction SID]) FROM fn_dblog(NULL, NULL) WHERE [Transaction ID] = @a
SELECT SUSER_SNAME(@b)


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search