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.

I need to verify using the SQL Anywhere 16/17 functions that the database is "registered with the SQL Anywhere Volume Shadow Copy Service module". I created and started the following Windows service:

dbsvc -as -s Automatic -t vss -w SAVSSWriter "C:\Program Files\SQL Anywhere 17\Bin64\dbvss17.exe"
To find out if the database is ready to interact with the VSS-service, I use "exotic" (from my point of view) functions:
select * from sa_server_messages() where msg_text like '%writer%'
select xp_cmdshell('NET START | find "SAVSSWriter"', 'no_output' )
Q1: Are there more "natural" functions?
And one more question.
Q2:How to find out the value of -vss database server option without analyzing the ASA-log message (like '24: -vss-')?

asked 25 Jun '20, 06:59

Ilia63's gravatar image

accept rate: 44%

edited 25 Jun '20, 07:00


I don't know an answer for Q1, but for Q2:

select property('CommandLine')

lists the full command line option, no matter whether the database server was started normally or as a service. So parsing for -vss should be doable.

(25 Jun '20, 07:15) Volker Barth
Replies hidden

Besides that, on Windows, you may use service dependencies to assure that VSS is running with the SA server and vice versa. See dbsvc -rg resp. -rs

(25 Jun '20, 07:22) Volker Barth
Replies hidden

Vielen Dank, Volker.

(25 Jun '20, 07:27) Ilia63

Many clients start the database as a server without using service (for example via ODBC Data Source where Action = Start and connect to a database ...).
In my opinion, in this case we cannot synchronize the start of the VSS-service after starting the database. So I assumed that the VSS-service will be running 24/7.

(25 Jun '20, 07:46) Ilia63

Otherwise you might use a DatabaseStart event to check whether the VSS process is running and otherwise start that? (If the database engine is allowed to start dbvss, that is...)

(25 Jun '20, 08:55) Volker Barth

"–°heck whether the VSS process is running"-sentence brings us back to Q1.
Windows user rights and SA Windows services is a separate issue. For example, recently for SQLANYs...-service I was not able to change the local system account to the admin account in Central (not enough rights), but managed to do this in services.msc.

(25 Jun '20, 09:14) Ilia63

You might also check the output of "vssadmin list writers".

(25 Jun '20, 10:46) Volker Barth

select xp_cmdshell('vssadmin list writers | find "SQLAnywhere VSS Writer"', 'no_output' );

(26 Jun '20, 05:18) Ilia63

Nice solution, particularly as this is independent of the (individually different) DBVSS service name...

(26 Jun '20, 06:54) Volker Barth
showing 2 of 9 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 25 Jun '20, 06:59

question was seen: 1,531 times

last updated: 26 Jun '20, 06:55