MSSQL jdbc jdbc_user with DomainName

Hi everyone
in Logstash pipeline I have the following connection string:
jdbc_user => "DomainName\UserName"
But looks like using "" is not working

input {
jdbc    {
    jdbc_validate_connection => true
    jdbc_driver_library => "/opt/sqljdbc41.jar"
    jdbc_driver_class => "jdbc:com.microsoft.jdbc.sqlserver.SQLServerDriver"
    jdbc_connection_string => "microsoft:sqlserver://10.91.18.56:1433;DatabaseName=master"
    jdbc_user => "myDomain\myDBUser"
    jdbc_password => "myPwd"
    statement => "select 1"
    schedule => "*/1 * * * *"
    }
}
  filter {
}
output {
        stdout { codec => rubydebug }
}

The Error it throws is as following:

Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: Login failed for user 'myDomain\\myDBUser'. ClientConnectionId:

I have no way to get ride of Domain as the logstash is running on a different domain.

Can anyone come with a way to fix this?

Regards,
Ginu

I believe that the double-backslash may be just a display artifact (sending String#inspect to a string will output a form that escapes literal backslashes with backslashes).

I'm seeing references in other projects that use the MSSQL JDBC Driver that the ODBC driver it is based on only supports Kerberos authentication.

See: unrelated python ODBC library: https://github.com/mkleehammer/pyodbc/issues/272

Microsoft ODBC docs: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/using-integrated-authentication

Thanks yaauie
I had tried

myDomain\myDBUser

which gives the following failure:

Java::ComMicrosoftSqlserverJdbc::SQLServerException: Login failed for user 'myDomain\myDBUser'. ClientConnectionId:ce4a007d-f53f-4c58-9d82-e1d691e302af

apart from that I had also tried the followings without success:

myDomain/\myDBUser
myDomain.myDBUser
myDomain@myDBUser

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.