How connect from AWS DMS to a remote Microsoft SQL Server using windows authentication as login method

Javier Rendon 0 Reputation points
2024-03-15T16:44:11.74+00:00

Hi I need to connect to a remote server, this server allows only windows authentication, when I try to connect usign python Im able to log in and run queries using pymssql from my computer on the company domain.

import pymssql
conn = pymssql.connect(
    host=r'serverIPaddress',
    port=r'1433',
    user=r'domain\user',
    password='.......',
    database='database_name'
)
cursor = conn.cursor()
cursor.execute('SELECT TOP 10 * FROM database table')

for row in cursor:
    print('row = %r' % (row,))

conn.close()

when try to access from AWS EC2 im able to connect using the above code, the VPC and security groups have been properly set up, but when I try to copy database by DMS or Glue I dont get access due to log in error, there is a way to provide windows credentials for ODBC driver i've tried already trustedconnection=yes,

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
SQL Server | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Greg Low 1,980 Reputation points Microsoft Regional Director
    2024-04-18T12:46:59.4566667+00:00

    When a SQL Server is configured for Windows authentication only, it will only allow connections from users who are authenticated on a machine that's part of the domain. That's by design.

    If you are using a version of SQL Server that can be joined to a Microsoft Entra ID tenant, you could probably make an Entra ID connection from your AWS box.

    But that's not using standard Windows auth.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.