Here I use the DEMO that comes with the system, demo path is C: \ Users \ Public \ Documents \ SQL Anywhere 17 \ Samples \ SQLAnywhere \ HTTP

1.run web service : dbsrv17.exe -c 8m -n demo17  demo.db   -xs HTTP(PORT=8880) -zoc clientinfo.txt
2.CALL sa_server_option( 'WebClientLogging', 'ON' );
3.The data can be displayed normally on the web page:http://127.0.0.1:8880/getinfo
4. Blank when opening log file,no data in clientinfo.txt

asked 05 Feb '20, 10:21

mfkpie8's gravatar image

mfkpie8
273667075
accept rate: 12%

edited 05 Feb '20, 10:24


I don't know whether this is still relevant, but when you want to log the requests being received by the server use this:

CALL sp_start_listener('HTTP','127.0.0.1:8880','LOG=c:\temp\http.log');

Found it here http://dcx.sap.com/sqla170/en/html/3be336f56c5f1014a34cab0e812f9155.html

permanent link

answered 18 Jun '20, 10:24

Frank%20Vestjens's gravatar image

Frank Vestjens
1.3k354765
accept rate: 21%

edited 18 Jun '20, 10:24

To add:

To turn on web server logging permanently, you can do so by using the according -xs network protocol options like LogFile, LogFormat, LogMaxSize and LogOptions, such as

dbsrv17.exe -c 8m -n demo17 demo.db -xs HTTP(PORT=8880;LOG=C:\MyHttpServer.Log;LOPT=ALL)
(18 Jun '20, 11:45) Volker Barth

The web client log traces calls by SQL Anywhere as a web client, using web client functions/procedures. Do you have called one of those?

permanent link

answered 05 Feb '20, 11:40

Volker%20Barth's gravatar image

Volker Barth
40.2k361549822
accept rate: 34%

converted 05 Feb '20, 12:12

Thank you for your reply. Isn't it "http://127.0.0.1:8880/getinfo" in the IE or google chrome,


The web service client log file contains HTTP requests and transport data recorded for outbound web service client calls. The web service client log file can also be specified using the sa_server_option system procedure:

CALL sa_server_option( 'WebClientLogFile', 'clientinfo.txt' );Logging is enabled automatically when you specify the -zoc server option. You can enable and disable logging to this file using the sa_server_option system procedure:

CALL sa_server_option( 'WebClientLogging', 'ON' );Example The following command starts the database server so that it listens for HTTP web requests on port 80, and logs outbound web service client information to the file clientinfo.txt:

dbsrv17 web.db -xs HTTP(PORT=80) -zoc clientinfo.txt

(05 Feb '20, 11:50) mfkpie8
Replies hidden

No, you seem to call a SQL Anywhere web service via your browser, so SQL Anywhere acts as web server (i.e. answering a HTTP request).

As stated, the web client logging feature traces SQL Anywhere acting as a web client (i.e. raising a HTTP request).

(05 Feb '20, 12:11) Volker Barth
Comment Text Removed

Yes, that is the documentation on logging web requests by SQL Anywhere as a web client.

As stated, that will not log the requests SQL Anywhere gets and answers when used as a web server, and you are using it as a web server.

(06 Feb '20, 05:41) Volker Barth
Comment Text Removed

It turns out that I use asa as a client to access the work log function tracked by other servers. How should the server log be tracked? Browsing logs similar to windows IIS

(07 Feb '20, 01:40) mfkpie8

I found a related post https://sqlanywhere-forum.sap.com/questions/1221/is-this-how-i-have-to-trap-exceptions-raised-by-the-final-select-in -a-web-service. But would you like to inquire that the ASA as a server does not have its own log tracing function? Otherwise this will cause performance degradation.

Windows iiS has a built-in log trace function. Doesn't ASA have it? Do I have to use stored procedures or functions to solve this problem?

(07 Feb '20, 02:45) mfkpie8
showing 1 of 6 show all flat view
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:

×246

question asked: 05 Feb '20, 10:21

question was seen: 1,177 times

last updated: 18 Jun '20, 11:50