31 Dec 2025 02:02 AM - edited 31 Dec 2025 02:56 AM
Hello,
I created a generic custom extension using Dynatrace Python Extensions SDK to extract some data from MS SQL Servers - database tables.
Below are some specs:
conn_str = (f"DRIVER={{ODBC Driver 17 for SQL Server}};"
f"SERVER={self.sql_server};"
f"DATABASE={self.sql_database};"
f"UID={self.ad_username};"
f"PWD={self.ad_password};"
"Encrypt=yes;"
"TrustServerCertificate=yes;"
"Connection Timeout=5;"
)where UID is provided from the extension UI as "domain\username".
It looks like the MS SQL servers consider the username and password as SQL Authentication, and not as Windows Authentication.
I have tried other properties defining the connection string conn_str, but still the code fails due to the exception.
Error fetching data from SQL Server for feed 'poc_mssql_extract': ('28000', "[28000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user '<domain>\\<username>'.")where <domain>\<username> are the AD domain and username, provided by the extension UI, along with the password.
On the other hand, I tested the domain, username and password, by creating a SQL Extension from, Custom Extensions Creator, using NTLM Authentication. I executed successfully this SQL extension that connected to MS SQL Server and retrieved the expected dataset from.
Please let me know if you have any suggestions or workaround to my custom extension, created with Dynatrace Python Extensions SDK, connecting to MS SQL Server and getting data from.
Regards,
Chris
| The UI configuration of my custom extension (SDK) | The UI configuration of Dynatrace SQL extension |
|
|
Featured Posts