If it's sqlserver

Set rowcount 100

But even if you do this your data will get polluted over time. Do an audit
of the stored procedures and the triggers. Lock down access on the tables
and only allow SP's to access them.  Then see where the code is failing and
for why.

Davy


Sent from my starfleet datapad.

On 25 sept. 2013, at 07:24, GregAtGregLowDotCom <[email protected]> wrote:

Another option would be to add a trigger that refuses to allow you to
modify large numbers of rows. However, you really need to carefully see if
that would upset the application.



Regards,



Greg



Dr Greg Low



1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913
fax

SQL Down Under | Web: www.sqldownunder.com



*From:* [email protected]
[mailto:[email protected]<[email protected]>]
*On Behalf Of *[email protected]
*Sent:* Wednesday, 25 September 2013 1:17 PM
*To:* 'ozDotNet'
*Subject:* RE: Restricting Data Chnages



It’s a db I inherited so there are many sp that may be doing ‘naughty’
things



Anthony

Melbourne StuffUps…learn from others, share with others!

http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/


----------------------------------------------------------------------------------
NOTICE : The information contained in this electronic mail message is
privileged and confidential, and is intended only for use of the addressee.
If you are not the intended recipient, you are hereby notified that any
disclosure, reproduction, distribution or other use of this communication
is strictly prohibited.
If you have received this communication in error, please notify the sender
by reply transmission and delete the message without copying or disclosing
it. (*13POrtC*)
-----------------------------------------------------------------------------------



*From:* [email protected]
[mailto:[email protected]<[email protected]>]
*On Behalf Of *GregAtGregLowDotCom
*Sent:* Wednesday, 25 September 2013 1:01 PM
*To:* 'ozDotNet'
*Subject:* RE: Restricting Data Chnages



You can add a TOP clause into data modification statements to limit how
many rows are affected but I suspect that isn’t your real issue.



The first question that needs to be addressed is why anyone has access that
allows doing that in the first place. That’s the real problem.



Regards,



Greg



Dr Greg Low



1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913
fax

SQL Down Under | Web: www.sqldownunder.com



*From:* [email protected]
[mailto:[email protected]<[email protected]>]
*On Behalf Of *[email protected]
*Sent:* Wednesday, 25 September 2013 11:26 AM
*To:* 'ozDotNet'
*Subject:* RE: Restricting Data Chnages



Is it possible to restrict the number of records that can be modified in
one query?



We had a database that had all its records updated by accident ie 30,000
rows..how can we avoid this in the future?   What techniques are
suggested?  How can we see who\what changed the records?





Anthony

Melbourne StuffUps…learn from others, share with others!

http://www.meetup.com/Melbourne-Ideas-Incubator-Stuffups-Failed-Startups/


----------------------------------------------------------------------------------
NOTICE : The information contained in this electronic mail message is
privileged and confidential, and is intended only for use of the addressee.
If you are not the intended recipient, you are hereby notified that any
disclosure, reproduction, distribution or other use of this communication
is strictly prohibited.
If you have received this communication in error, please notify the sender
by reply transmission and delete the message without copying or disclosing
it. (*13POrtC*)
-----------------------------------------------------------------------------------

Reply via email to