ODBC connection error while running the script using eggplant manager

The script has ODBC connection string. I am using eggplant manager to run the script and the script fails with below error.
“STDatabaseConnectionError Failed to connect to ODBC database odbc:1 Reason: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQLSTATE=IM002”

Not sure what the reason is. If I run the script directly from eggplant functional tool it works fine (DB connection is established). The eggplant server has the ODBC data source setup so does the machine where the Agent is. I am confused what is that I am doing wrong.
please advise.

Hi Prasad,

When I have seen this before, the issue was that the DSN was not added to the machine that is functioning as the Agent.

Hope this helps,

Hi Dave,
Thanks for the response.
The DNS was added to the machine where Agent is running. Still having the same error.


Found the solution. I am adding User DNS instead of System DNS. Defining User DNS is fine if the script is running from eggplant functional tool. but to run the script from eggplant manager we should define System DNS.

1 Like