473,769 Members | 4,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem unauthorize deleting of primary key in SQL

dev
Hej There.

We have a big problem. We have now for 4th years had a SQL Server
without problems. But sutnely some of the primary keys are deleted.
The subdata to the primary keys are not deleted. This is a big problem
because This is a billing system. Recently there was over 300 primay
keys deleted. Good that we have backup but still... NOOOT good

Can anyone help me to solve this problem!!! PLEASE

Best regards

Danni
Jul 20 '05 #1
1 1213

<de*@euro-consult.dk> wrote in message
news:d3******** *************** ***@posting.goo gle.com...
Hej There.

We have a big problem. We have now for 4th years had a SQL Server
without problems. But sutnely some of the primary keys are deleted.
The subdata to the primary keys are not deleted. This is a big problem
because This is a billing system. Recently there was over 300 primay
keys deleted. Good that we have backup but still... NOOOT good

Can anyone help me to solve this problem!!! PLEASE

Best regards

Danni


I'm not entirely sure whether you mean that 300 primary key constraints were
dropped, or that 300 rows in a table were deleted (rows, I guess). Either
way, the most obvious question is what changed? Did you roll out a new
version of a client application, for example? Or are there any new users
with DELETE permissions in the database? If you have transaction log
backups, you might be able to find out when the rows were deleted and by
whom with a third-party tool such as this one:

http://www.lumigent.com/products/le_sql.html

If not, then there's probably no good way to find out how this happened
after the event. You say that the "subdata" were not deleted - do you mean
the 'child' data in the referencing tables? If so, then adding foreign keys
(which you should have anyway) will prevent referenced primary key values
being deleted.

Apart from that, you may want to review your current permissions, and
perhaps consider running a trace on all DELETE statements in the database
for a while if you're worried about this happening again (and if there's no
performance problem with doing that). Or you could create your own audit
triggers to capture information about deletions.

Simon
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8670
by: XmlAdoNewbie | last post by:
Hi All, I am using Microsoft SQL Enterprise Manager version 8.0 and have created a view from a combination of 4 different tables. I would like to be able to go into sql and open the view and select a row and delete that row however this seem impossible right now. I am not sure if it's possible to delete a row from a view?? Or could it be that these tables are all interconnected and in order to delete a record that is joined to one or more...
3
1317
by: Edward Mitchell | last post by:
I have an app that requires the user to login before accessing a Register.aspx form. I am using Forms authorization so the lines in the Web.config file are: <authentication mode="Forms"> <forms loginUrl="Login.aspx"> </forms> </authentication> <authorization>
0
1734
by: ET | last post by:
We have two tables... one with primary key ID and second table with secondary key to the ID in the first table... Now, they query pulls records from both tables, looks like this: SELECT tblCell_Sat_Phone_Main.ID, tblCell_Sat_Phone_Main., tblCell_Sat_Phone_Main., tblCell_Sat_Phone_History.Location, tblCell_Sat_Phone_History.,
7
9782
by: Jon Maz | last post by:
Hi, I have a MySql problem I hope someone can help me with. I'm trying to run an update on a linking table, the update is running into a Primary Key constraint violation, and in my workaround I've got stuck trying to write a DELETE statement. Here's the table I'm working on: CREATE TABLE `articles_categories` (
5
3993
by: Manish | last post by:
The topic is related to MySQL database. Suppose a table "address" contains the following records ------------------------------------------------------- | name | address | phone | ------------------------------------------------------- | mr x | 8th lane | 124364 | | mr x | 6th lane | 435783 | | mrs x | 6th lane | 435783 |
0
1270
by: Owen Jenkins | last post by:
Hi, My application allows users to create a new back end for separate purposes. It does this by using Make Table Queries and Indexing via SQL. For example ... sqlString = "SELECT * INTO " & TableName & " IN '" & NewDBName & "' FROM " & TableName & " WHERE 1=2;" DoCmd.RunSQL sqlString 'The WHERE 1=2 ensures that no records are copied - only the
4
3266
by: Owen Jenkins | last post by:
Hi, No-one replied to this when I sent it last week. Any bites out there today?? ----- My application allows users to create a new back end for separate purposes. It does this by using Make Table Queries and Indexing via SQL. For example ...
4
3988
by: Adrock952 | last post by:
I am trying to create my tables where if i delete/update a record from one table, all the other tables are affected by deleting/updating any records that reference the original record. For example, if i delete/update a record from the employee table, the other tables that are referenced to it will be updated/deleted Here is the database create SQL i have CREATE TABLE Employee ( ssn NUMBER (4) PRIMARY KEY, salary ...
1
1126
by: pattex007 | last post by:
Hi I have a database(acces) with tabel questions and answers. --> tblquestions questionId -> -> primary key question -> string tblanswers
0
10219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.