How to pass `enableArithAbort` to Tedious?
See original GitHub issueExpected behaviour:
I would like to pass the “enableArithAbort” config option value to Tedious, it makes a lot of difference in my case: the query takes 1 second when it’s on, 1+ minute when it’s off.
Actual behaviour:
I tried the following:
await this.sqlClient.connect({
...
"enableArithAbort": true
});
But it doesn’t work, enableArithAbort
seems to be absent from the config object when it’s checked.
If I manually edit connection.js
like this:
if (true) {
options.push('set arithabort on');
} else if (this.config.options.enableArithAbort === false) {
options.push('set arithabort off');
}
The option is set correctly and the performance goes through the roof.
Configuration:
Not sure what to put that’s relevant here.
Software versions
$ node --version
v10.15.1
mssql@^5.1.0:
version "5.1.0"
Issue Analytics
- State:
- Created 4 years ago
- Comments:13
Top Results From Across the Web
Node.js mssql error: tedious deprecated The ... - Stack Overflow
How do I fix it? tedious deprecated The default value for `config.options.enableArithAbort` will change from `false` to `true` in the next major ...
Read more >API - Connection | Tedious
Tedious supports an authentication type: azure-active-directory-password . ... enableArithAbort: Ends a query when an overflow or divide-by-zero error ...
Read more >Nodejs mssql tedious deprecated message v3.9.7
tedious deprecated The default value for config.options.enableArithAbort will change from false to true in the next major version of tedious ...
Read more >Creating an Express API using SQL Server - Jamie Phillips
I initially thought I needed to use tedious, which turned out to ... We will call the connect method passing in the configuration...
Read more >Tedious Promise - Google Groups
I am new with node js. i am using tedious promise to connect with my sql server. i am connected successfully, My question...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is kinda an issue:
For those of us trying to use this module on azure, a big ol warning stuffed into our logs every startup is not … thrilling. 😃
this worked for me