Client terminates and SQL-Database corrupted?

fraiserfraiser Member Posts: 5
Hi,

I just want to restart a Navision Client automatically. For that I wrote a simple batch file which terminates the client process (finsql.exe) using a tool similar to taskkill.exe.
Does this have negative effects to the SQL-Server when the client terminates by killing the process?
I suppose the data will be lost which has been processed by the client at the moment when the client terminates … but does this produce any inconsistence/corruptions at the server side SQL-Database?

Thanks for your help!

Comments

  • krikikriki Member, Moderator Posts: 9,110
    If the C/AL code that is running on the client is OK, it will be no problem. The current transaction will be rolled back on the server.

    The problem can happen if there are COMMIT's in parts of a program that should be processed completely or NOT at all.
    E.g. : you change dimension 1 in a table and then you do a COMMIT and then you change it in the dimension table. This should happen in 1 go.
    If just after the COMMIT, there is a crash, the dimension 1 in your table will have changed but NOT in the dimension table.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • vikram7_dabasvikram7_dabas Member Posts: 611
    Dear Concern
    Put the filter of Ideal time in Session table of few seconds, then run ur code 4 termination.Then there will be no effect on SQL DB.
    Vikram Dabas
    Navision Technical Consultant
  • DenSterDenSter Member Posts: 8,304
    Put the filter of Ideal time in Session table of few seconds, then run ur code 4 termination.Then there will be no effect on SQL DB.
    No that is absolutely false. You run exactly the same risk, whether you kill the session at time x or time y. It all depends on what the sessions are doing at the time of terminating the process. The interval or the frequency in which you do it has absolutely zero to do with mitigating the risk of causing data issues. Well I suppose when you do it twice as many times, the risk is twice as big, but for each individual run of that batch process, the risk is exactly the same, regardless of the timing.
  • vikram7_dabasvikram7_dabas Member Posts: 611
    Dear Denstr
    I means that when session's Ideal time is more than some minutes than at that time no C/AL is running,means Line is clear thats y I gave that answer.
    Vikram Dabas
    Navision Technical Consultant
  • DenSterDenSter Member Posts: 8,304
    Oh you are talking about IDLE time. I see what you mean now, and it does make sense to restrict it somewhat with a threshold on idle time. You can't tell by looking at the Sessions view whether any C/AL is running though, so that advice still is not correct. You can start a report that runs for 2 hours, and you can't use your session for that time. The idle time will reflect that you are idle, but there's a lot of C/AL activity.
  • vikram7_dabasvikram7_dabas Member Posts: 611
    Dear Denstr
    U are saying "The idle time will reflect that you are idle, but there's a lot of C/AL activity" please explain me which type of C/AL activity run if there IDEAL time is more than 2 minutes.
    Vikram Dabas
    Navision Technical Consultant
  • DenSterDenSter Member Posts: 8,304
    Say you start a report that runs for 5 minutes at exactly 11 o'clock. At 11:03 the idle time will say 3 minutes, even though the report is still running. You kill that session, you also kill that session's report, which is executing C/AL code at that time. Idle time does not always mean there is nothing going on in that session.
Sign In or Register to comment.