I am trying to run a build.xml with apache ant. All the targets are runing successfully until dbstop is hit. Whenever the target for dbstop is hit, it hangs. Task Manager shows both dbstop.exe and dbsrv16.exe processes running. However when I hit the same command for dbstop manually, it stops the server successfully.

The command for dbstop being used is: dbstop -y -c dsn=<dsn name="">

What can I check to see what is blocking dbstop in the build.xml?

asked 17 Jan '17, 04:35

rohinibasuu's gravatar image

rohinibasuu
567813
accept rate: 0%

I guess you could add the "LOG=Debug.txt" connection parameter to the connection string in order to find out whether DBSTOP really does connect to the server.

Are you sure the DSN you are using when running DBSTOP manually is the same one in your build process (system DSN vs. user DSN...)?

(17 Jan '17, 06:03) Volker Barth

Yeah, the DSN are the same for both the cases.

Here is the excerpt from the debug file. Shows that dbstop is connecting to the server.

05:32:05 IP=172.30.7.15;HOST=SAPDOC02;OSUSER=Administrator;OS='Windows 2008R2 Build 7601 Service Pack 1';EXE='C:\Program Files\SQL Anywhere 16\bin64\dbstop.exe';PID=0x19dc;THREAD=0x1738;VERSION=16.0.0.1324;API=DBLIB;TIMEZONEADJUSTMENT=-360 05:32:05 Connected to the server, attempting to connect to a running database... 05:32:05 [ 35] Connected to database successfully

After this, there's no entry in the log file.

(17 Jan '17, 06:52) rohinibasuu
Replies hidden

Hm, then you might also add the -z option (in addition to -o console.log) to the database server command line to display debug messages on the server side...

(17 Jan '17, 07:55) Volker Barth

If the user in your data source has no DBA privilege, it can not stop a dbsrv16 with default settings. Check the documentation of the -gk dbsrv16 command line option.
- with -gk none, it is impossible to stop the server with dbstop
- with -gk dba (default for dbsrv16), a user with DBA privilege is required
- with -gk all (default for dbeng16), every user with the permission to connect can stop the server
So if this is the cause of your issue, either provide a non-default or less restrictive value with -gk or use a database user with DBA privilege.

HTH
Volker Stöffler
DB-TecKnowledgy

permanent link

answered 20 Jan '17, 12:27

Volker%20DB-TecKy's gravatar image

Volker DB-TecKy
5453715
accept rate: 25%

Hi Volker,

The user had dba privileges. When I was using the same dbstop command manually from command line, it was stopping the dbsrv16. If there was some issue with dba privileges, then shouldn't the server return some error messages?

However, I uninstalled SQL Anywhere 16 and deleted all the related registry entries. Then again reinstalled SQL Anywhere16 and tried to run the build file. This time it went through.

Thanks

(20 Jan '17, 23:33) rohinibasuu
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:

×11
×4

question asked: 17 Jan '17, 04:35

question was seen: 2,503 times

last updated: 20 Jan '17, 23:33