Job queue got SQL ERROR INSERT DUPLICATED KEY

Hi , I just created a job queque entry,let it to run a codeunit to alert a message. I know nas is a back-end server, It can not give us any message which alert in the codeunit. What I am getting the confusion is that in the job queue entry the status displayed as ‘In-Process’, and I can see some records in the ‘Job queue log entries’ with the success status.But I didn’t get any message which should generated from the Event Viewer(Nas status normaly, I can get the information for the parameter in the event viewer) . And I got such a warning:

The following SQL Server error or errors occurred when accessing the Job Queue Entry table:

3604,“23000”,[Microsoft][ODBC SQL Server Driver][SQL Server]Duplicate key was ignored.

SQL:
INSERT INTO “UNFTNAVDB4”.“dbo”.“UNFT$Job Queue Entry” (“ID”,“User ID”,

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

What I don’t Understande is why there is a warning and no get the right result But in the rtc it shows us a ‘Success’ status? And how can I resolve it? In fact there is just only one job queue entry existed in the Job queue entry table.Why it show me can not insert the duplicated key?

Any suggestion will be warly appreciated.

Thanks in advance

Gary.

Hi Gary,

did you try to restart the NAS-Service? Because when you change objects which are used by the NAS without restarting it the event viewer shows some very strange error messages sometimes.

Regards Jan

Hi Jan.

Thanks for you kindly reply. Yes, I did. Every time when I change the settings of the job queue entry records, I restart the NAS service again. When I done, I can see the status was shown as ‘IN-PROCESS’ But at meantime I got the error message I marked in the question.

Thanks again.

Hi Gary,

ok, next try :-). Did you try to run the codeunit ourselve or even try to run the job queue using the client so that you can see the code is actually running?

Regards Jan

yep, I run the codeunit in the classic, It gave an alert message , So I think it should be right. and what do you mean run the job queue using the client? you mean rtc ? or soneother else? Could you show me some details about this troubleshoot? I am a newbie about job queue.

Thanks in advance.

You can try to run the Codeunit 448 Job Queue Dispatcher, but I’d stop the NAS first. That will make it easier to debug. Did you change any object concerning job queue? Especially the tables?

I never changed the the object concept of the job queue. I just newed some records in rtc. I just tested the cu 448, I found it is no response(No errors and no results) when I ran it after stopped the nas service.

So it didn’t insert any job queue log entries? In my test it did. Did you wait long enough so that the job queue dispatcher should have done something?

Hi Jan

Thank you for your kindly reply again.

In fact there are many log entries with the status ‘SUCCESS’ ,But I can not see the message I alert in the codeunit from the Event Viewer, And there was a warning said the same with my question.

So I am very confusion about why did that happen? If there is any error it should display in the log entries and with the error message.

So when you started the codeunit 448 you got the same error message you posted first? On screen? Because if yes then I’d start the debugger to see at which point the error is raised.

HI Jan

Thanks for all your replies. I have resolved it . It seems there is any problem with my database, So i try this function using the demo database,It works. I see what I want.

Hi Gary,

you’re welcome :-).

Regards Jan