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.

does anyone have experience how can i create node js and sql anywhere in docker for windows? I've sqlanywhere17 and is already installed in node but I can't perform in docker. i've erorr. Error: Code: -2004 Msg: Can't initialize DBCAPI". There is less information in net. Thanks in advance

asked 02 Jul '19, 05:16

salwa's gravatar image

accept rate: 0%

You have to Provide the SQL Anywhere Client in the Docker Image to be able to use the npm module! I Suspect that you want to use a Linux Image ?

As there is no Silent Install for SQL Anywhere Client available I had to use a work around.

  • Install the SQL Client in a compatible Linux System
  • Stuff the Contents of the /opt/sqlanywhere17 Folder in a tar File that you need when you generate the Docker Image.

In your Dockerfile add theses Lines

FROM node:8

COPY sqlaclient/**sqlanywhere17.tar.gz** /opt
RUN cd /opt && \
    tar xfz /opt/**sqlanywhere17.tar.gz** && \
    rm /opt/**sqlanywhere17.tar.gz**

ENV SQLANY17="/opt/sqlanywhere17" \
    LD_LIBRARY_PATH="/opt/sqlanywhere17/lib64:/opt/sqlanywhere17/lib32:${LD_LIBRARY_PATH}" \
    NODE_PATH="/opt/sqlanywhere17/node:${NODE_PATH}" \

With this preparation I could connect from a Node App in the Docker Image to my Database.


permanent link

answered 02 Jul '19, 06:29

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
accept rate: 17%

thanks Thomas, how can i the SQL Client in Linux System install . i've windows System.

(02 Jul '19, 08:44) salwa
Replies hidden

You need to get a Linux Based Installer for SQL Anywhere. You could probably get a free Developer Version for Linux. Or ask you Software Supplier for the Linux installation files.

(02 Jul '19, 10:59) Thomas Dueme...

As to "How to install a SQL Anywhere client on Linux", you might also have a look at that question.

(02 Jul '19, 11:13) Volker Barth

Thanks for your tips, my program is ok now

(09 Jul '19, 08:27) salwa
Your answer
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: 02 Jul '19, 05:16

question was seen: 1,906 times

last updated: 09 Jul '19, 08:27