473,466 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Create 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 1197

<de*@euro-consult.dk> wrote in message
news:d3**************************@posting.google.c om...
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
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...
3
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">...
0
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...
7
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...
5
by: Manish | last post by:
The topic is related to MySQL database. Suppose a table "address" contains the following records ------------------------------------------------------- | name | address | phone |...
0
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 " &...
4
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...
4
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...
1
by: pattex007 | last post by:
Hi I have a database(acces) with tabel questions and answers. --> tblquestions questionId -> -> primary key question -> string tblanswers
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.