I am working on SQL2000. Lately I find some users repeated executing INSERT
OR DELETE on SQL2000 remotely. May I disconnect these users when they
execute Insert operation 5 times? How can I relize it? Or may I disconnect
specified user by user name?
thanks
hui
Linchi Shea - 03 Jul 2008 22:46 GMT
You can terminate a user with KILL. Look up the KILL statement in SQL Server
Books Online. But that should be the last resort. It's better to find out why
the users were doing and perhaps a procedure change is in order.
Linchi
> I am working on SQL2000. Lately I find some users repeated executing INSERT
> OR DELETE on SQL2000 remotely. May I disconnect these users when they
[quoted text clipped - 4 lines]
>
> hui
hui - 05 Jul 2008 09:02 GMT
OK, I got it, thanks
"Linchi Shea" <LinchiShea@discussions.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:6208EDA4-57B2-436F-B970-2DE49CF20993@microsoft.com...
> You can terminate a user with KILL. Look up the KILL statement in SQL
> Server
[quoted text clipped - 14 lines]
>>
>> hui
William Vaughn [MVP] - 03 Jul 2008 22:58 GMT
Yes, you can do just about anything you want in a Trigger. Yes, see why they
are doing this before cutting them off. My first question would be, however,
why do they have direct table access?

Signature
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
> I am working on SQL2000. Lately I find some users repeated executing
> INSERT
[quoted text clipped - 5 lines]
>
> hui
Eric Russell - 10 Jul 2008 19:25 GMT
It sounds like more of a security and/or declarative data integrity issue.
#1 Do not grant access to users who don't need it. If an unwanted user has
access to the database due to their windows group membership, then instead
only grant access to specific accounts or deny access to specific accounts as
needed.
#2 Implement a primary key that would prohibit inserting duplicate data.
#3 Implement stored procedures to perform the inserts which includes
additional logic to prevent inserting unneeded data.
#4 Rather than granting users insert / update / delete permission, instead
grant them execute permission on the specific stored procedures they need.
> I am working on SQL2000. Lately I find some users repeated executing INSERT
> OR DELETE on SQL2000 remotely. May I disconnect these users when they
[quoted text clipped - 4 lines]
>
> hui