Search code examples
sql-serverdbeaverrunas

Connect to SQL Server Windows Authentication using DBeaver


Currently, I'm using SQL Server Management Studio (SSMS) to connect to remote SQL Server. And we are using command-line to connect to that server.

$ path\to\runas.exe /netonly /user:DOMAIN\USERNAME "path\to\Ssms.exe -S ip.xxx.yyy.zzz"

How can I connect to the same remote database using DBeaver ? I kept getting

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

Other info :

  1. Authentication method : Windows Authentication
  2. SQL Server Version : 12.0.5000 SP2
  3. DBeaver Version : 6.2.2.x
  4. There is a prompt for password when we use the command-line.

Solution

  • For DBeaver, you may need to do the same thing as well into something like this :

    $ path\to\runas.exe /netonly /user:DOMAIN\USERNAME "C:\Users\user\AppData\Local\DBeaver\dbeaver.exe -nl en"
    

    Then, from DBeaver New Connection change the SQL Server authentication to Windows Authentication. It will use the username that we pass from runas.