Google cloud SQL login fails from Tedious

431 Views Asked by At

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:

  • login with a non-admin user
  • restart the database
  • recreate the database into a clean state (no users, no tables)

However connecting with Microsoft SSMS, JetBrains DataGrip and .NET application works just fine.

1

There are 1 best solutions below

0
On BEST ANSWER

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.