Database error: The INSERT statement conflicted with the FOREIGN KEY constraint

Viewed 0

I am getting the following error:

System Error Detected: Database error

SQLExecDirect failed with [[ODBC Error: state=23000, nativeErr=547, err=[Microsoft][SQL Server Native Client 10.0][SQL Server]The INSERT statement conflicted with the FOREIGN KEY constraint "FKStatDataStatID__0F975522". The conflict occurred in database "poweradmin", table "dbo.Statistic", column 'StatID'.]

[ODBC Error: state=01000, nativeErr=3621, err=[Microsoft][SQL Server Native Client 10.0][SQL Server]The statement has been terminated.]
] for SQL=[SET NOCOUNT ON;
BEGIN TRAN;
INSERT INTO StatData (StatID, Value, Date) VALUES (1355, 15.076154, {ts N'2015-04-17 10:20:06'});
INSERT INTO StatData (StatID, Value, Date) VALUES (1359, 0.000272, {ts N'2015-04-17 10:20:06'});
INSERT INTO StatData (StatID, Value, Date) VALUES (1361, 0.000466, {ts N'2015-04-17 10:20:06'});
INSERT INTO StatData (StatID, Value, Date) VALUES (1358, 340.039094, {ts N'2015-04-17 10:20:06'});
INSERT INTO StatData (StatID, Value, Date) VALUES (1360, 582.079437, {ts N'[Trimmed]]

Anyone know how to fix this?

2 Answers

Hi alvinh,

Would you please zip up and send us your Service_Log.txt log file. I'll take a look to see what is causing the error. support@poweradmin.com

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Hi alvinh,

In the rare case that this error happens, it seems to happen when Satellites are involved (the statistic IDs get out of sync). Restart any Satellite services you have (you can do this from within the Console -- right-click the Satellite) and that should resolve it.

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Related