After starting the database in a bash shell, the dbstop is either denied access in another shell or the database is stated as being Is there a way top stop the db on the command line? $ /opt/sqlanywhere17/bin64s/dbsrv17 -ga -n ftnode_sa /home/bxxxx/sqladb/ftnode_sa.db SQL Anywhere Network Server Version 17.0.4.2053But when I attempt to stop the database the following message appears: $ ./dbstop -d ftnode_sa -y SQL Anywhere Stop Server Utility Version 17.0.4.2053 Unable to stop database server -- Specified database is invalid. I can connect to the database using SQL Anywhere Central. |
You are running a network server (dbsrv17) in contrast to a personal engine (dbeng17). As to the docs:
So you need to supply -c with an appropriate connection string to stop the database and/or network server, without specifying the server name additionally on the command line. Thanks, I found my answer in http://sqlanywhere-forum.sap.com/questions/27948/stopping-database-server question.
(12 Jul '17, 09:22)
bluefrog
|
dbstop can be used to stop either an individual database or the whole database engine/server . Your start command line is creating a server called ftnode_sa and a database called ft_node_sa (you aren't specifying the database name so it is defaulting to the file name.) -d is used to stop a specific database only - not the engine. If you want to do that you have to specify a connection string for the database (use -c "keyword=value;..."). You can stop the whole engine unconditionally (-y) by ommitting the -d and just putting the server name at the end eg dbstop -y ftnode_sa There are issues about permissions etc which are discussed in the docs - look for "Stop Server utility (dbstop)" I did specify I tried what you suggested.
(12 Jul '17, 08:58)
bluefrog
Replies hidden
Comment Text Removed
apologies that's a typo by me - your database will be called ftnode_sa (ie the file name without the extension). It is now saying it can't find the database server, rather than the database is invalid. I don't know anything about Linux (which I think you are using) - is this command being run in the same "context" as the one that starts the database engine - ie will it be able to see the service? Also you are specifying -ga which means the engine will stop if there are no connections - could that be the case? You could also try stopping the database specifically using the -d option and supplying a connection string: dbstop -d ftnode_sa -c="ServerName=ftnode_sa;dbn=ftnode_sa;UID=dba;PWD=****" Replacing your password as appropriate. Also - I'm not sure if it is a problem here but in order to stop a server you need to set appropriate privileges when you start it. By default only the user DBA can stop the network server (which you are using) unless you specify -gk all when you start it. see the docs for details.
(12 Jul '17, 09:24)
Justin Willey
|