As the error message says, it's something in LibDB that is generating the error. Since we don't have the code for LibDB, we really can't answer the specifics based upon the code.
Here's my theory, though:
TC and TE are running on different machines with, potentially, different users. Connecting to SQL is being done via integrated security. So, either
1) The machine that TE is running on is not on the same subnet or unable to access the SQL server or
2) The user that is logged in to the TE environmnet does not have rights/access to run SQL queries or connect to the SQL server.
In short... diagnose your SQL connectivity on the TE environment, checking user access, machine access, firewalls, etc.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.