I try to connect to a Microsoft SQL Server hosted in Google Cloud with Tedious 9.2.1 library, but I keep getting this error:
Logon failed for login 'sqlserver' due to trigger execution.
The code is as follows:
var Connection = require('tedious').Connection;
var config = {
server: 'localhost',
authentication: {
type: 'default',
options: {
userName: 'sqlserver',
password: 'password',
},
},
};
var connection = new Connection(config);
connection.on('connect', function (err) {
if (err) {
console.log('Error: ', err)
}
executeStatement();
});
I did not set any logon trigger, not even a single saved procedure.
What I tried:
However connecting with Microsoft SSMS, JetBrains DataGrip and .NET application works just fine.
It is an opened investigation on this issue:
Logon failed for login due to trigger execution
The Google Cloud Sql Engineering Team is working on solving the issue.
It is well worth to ‘star’ the thread to ensure that you receive updates about it.