Skip to Content
avatar image
Former Member

SQL Anywhere 12 stop service

To stop a service we use the command "dbsvc.exe -x <name>".

In some cases the service won't stop (we checked after 4 hours).

Users can't log in anymore and in Windows we see that the service is trying to stop.

What exactly happens with users logged in when we try to stop the service?

Any other ideas what can cause this behaviour?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 21, 2014 at 11:56 AM

    You asked for "any ideas" so here is some anecdotal evidence: This symptom (becoming non-responsive but refusing to completely stop) may not have anything to do with the engine being run as a service, since I have seen it happen to foreground servers. Here is the pseudocode for a "suicide", er, "shutdown" stored procedure that helped:

    for each remote server
       EXECUTE IMMEDIATE 'ALTER SERVER ... CONNECTION CLOSE ALL';
    for each NEXT_CONNECTION value other than this one
       EXECUTE IMMEDIATE 'DROP CONNECTION ...';
    WAITFOR DELAY '00:00:01';
    EXECUTE IMMEDIATE 'STOP ENGINE UNCONDITIONALLY';
    

    In the past I have also launched a kill command from within a stored procedure,when the zombie server symptom was severe. No matter how you stop a server, it should be able to recover the data automatically when it restarts... after all, recovery works after a power failure.

    CALL xp_cmdshell ( STRING ( 'taskkill /FI "WINDOWTITLE eq ',
       PROPERTY ( 'Name' ), ' - *" /T /F' ), 'no_output' );
    
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 04, 2014 at 09:07 PM

    Hi Eric,

    It was possible for cancelled intra-query tasks to have internal tasks that never shut down and that oustanding internal task would then prevent the server shutdown.

    The intra-query parallelism issue should now be resolved as of CR #662248 in 12.0.1.4062 (there was also an adidtional fix in CR #762616 in 12.0.1.4105, but this was related to crashing).

    Which build of SQL Anywhere 12 are you using?

    Regards,

    Jeff Albion

    SAP Active Global Support

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks,

      We are using build 12.0.1.3797.

      We will try if build 4105 will solve this.

      Regards,

      Eric