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_connection_string => "microsoft:sqlserver://;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?


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:

Microsoft ODBC docs:

Thanks yaauie
I had tried


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:


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