Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Having successfully started the database using the following command:


$ /opt/sqlanywhere17/bin64s/dbsrv17 -ga -x tcpip(port=49153) -n ftnode_sa /home/sa/sqlany17/ftnode_sa.db
SQL Anywhere Network Server Version 17.0.4.2053

Copyright (c) 2016 SAP SE or an SAP affiliate company. All rights reserved. Use of this software is governed by the SAP Software Use Rights Agreement. Refer to http://global.sap.com/corporate-en/our-company/agreements/index.epx.

.. .. .. .. Database "ftnode_sa" (ftnode_sa.db) started at Thu Jul 13 2017 23:49 Database server started at Thu Jul 13 2017 23:49 Trying to start SharedMemory link ... SharedMemory link started successfully Trying to start TCPIP link ... Starting on port 49153 TCPIP link started successfully Now accepting requests Press 'q' to shut down the database server

The database suddenly shuts down whenever I close SQL Central on a client machine.

Finished checkpoint of "ftnode_sa" (ftnode_sa.db) at Thu Jul 13 2017 23:58
Database "ftnode_sa" (ftnode_sa.db) stopped at Thu Jul 13 2017 23:58
Database server shutdown automatically after last database stopped
TCPIP listener on IP address (::):49153 is exiting
TCPIP listener on IP address 0.0.0.0:49153 is exiting
Database server stopped at Thu Jul 13 2017 23:58

Is there anyway I can prevent this from happening. I prefer to explicitly stop the database using dbstop, something like this:

/opt/sqlanywhere17/bin64s/dbstop -c "Server=ftnode_sa;uid=sadb;pwd=sadb;"
Clients should be able to connect and disconnect as and when. I could hack it and open a dummy client, but prefer not to create such spurious connections.

asked 13 Jul '17, 19:06

bluefrog's gravatar image

bluefrog
183141521
accept rate: 0%


Remove the -ga switch from the database server command line - this option tells the server to auto-stop after the last connection has disconnected! See the -ga documentation

permanent link

answered 13 Jul '17, 19:56

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

2

Just as a general rule of thumb: Specify only the command line options that are required or are understood - SQL Anywhere usually has very reasonable defaults...

(14 Jul '17, 10:26) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×159

question asked: 13 Jul '17, 19:06

question was seen: 1,449 times

last updated: 14 Jul '17, 10:26