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.

As the question says, I'm having trouble starting the NodeJS/JavaScript external environment in SA17.

I'm following the help documentation instructions under "Installing the JavaScript external environment module".

The node executable is at

C:\Program Files\nodejs\node.exe

The path is in the PATH variable (the 'where' command finds it).

The NODE_PATH points to

C:\Program Files\SQL Anywhere 17\Node;C:\Users\twilkinson\AppData\Roaming\npm\node_modules

I've set the external environment with

LOCATION 'C:\Program Files\nodejs\node.exe';

However, when I try to start the external environment as instructed,

there is a long pause and then
Could not execute statement.
External environment failed to start and establish a connection within
the 45 second timeout
SQLCODE=-1556, ODBC 3 State="HY000"
Line 1, column 1

The system is Windows 7, SQL Anywhere Developer Edition and node v4.2.6. Both node and SA17 are the 64-bit versions.

I assume I'm missing something basic here, but can seem to see it.

Any suggestions?

asked 08 Feb '16, 15:34

Terry%20Wilkinson's gravatar image

Terry Wilkinson
accept rate: 25%

edited 08 Feb '16, 15:35

Just a wild guess: You possibly have to mask the backslashes in the path, such as

LOCATION 'C:\\Program Files\\nodejs\\node.exe';

'\n' is the new line character.

(08 Feb '16, 19:08) Volker Barth

Since you are running with the 4.2.6 version of Node.JS you might want to verify this behavior with the latest drivers available from GitHub Support for JS 4.x was added late last year.

If you are running the database server as a Windows Service then you will want to make certain that SYSTEM (or the account the service is running with) has permissions to scan and execute your node directories and binaries.

Do let us know if the symptoms change at all with either of those suggestions.

permanent link

answered 08 Feb '16, 16:08

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
accept rate: 32%

converted 09 Feb '16, 15:34

Volker%20Barth's gravatar image

Volker Barth


Thanks to both of you. The problem was indeed related to not having the drivers for node V4.2.6. I reverted my node installation to v0.10.40 and now I can start the external environment and execute JS code.

I don't really want to get into recompiling the drivers for node v4.x - is there anyplace from which the binaries can be downloaded?

(09 Feb '16, 10:40) Terry Wilkinson

Newer drivers (pre-built) are available with either of the next 2 patches that should help.

These appear to be available on the site:

SQLANYW170000P_3-71001031.ZIP EBF 25687: 17.0.0 SP0 PL3 Build 1328 SQLANYW170000P_4-71001031.ZIP EBF 25692: 17.0.0 SP0 PL4 Build 1358

permanent link

answered 09 Feb '16, 16:56

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
accept rate: 32%

Thanks. I'm using the Developer Edition, so I'll have to wait for the next update there (currently I think it is still

(09 Feb '16, 18:53) Terry Wilkinson
Replies hidden

To increase your "happy anticipation", here's what the "Node\sqlanywhere_jsextenv\bin64" directory looks in my case:

alt text

(10 Feb '16, 01:18) Volker Barth

Can't wait !!! :-)

(10 Feb '16, 10:16) Terry Wilkinson
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: 08 Feb '16, 15:34

question was seen: 2,671 times

last updated: 10 Feb '16, 10:16