Toad World® Forums

changing sql server authentication breaks automation


#1

My SQL Server DBA changed my password authentication type from NT authentication to SQL Server authentication. So I updated my Database connection in TDA, and can now connect to the database. However, now when I run an automatin script to produce some reports…I get an error that says TDA doesn’t recognize my SQL Server connection? Does changing the connection authentication break automation scripts? Can I manually change the connection name somewhere back to what it was before?


#2

Here’s the error in the log file:

– 1/31/2011 12:04:49 PM: ImpAetnaCases.log: Running Import template ImpACP.tim
– 1/31/2011 12:04:49 PM: ImpAetnaCases.log: Beginning Import.
– 1/31/2011 12:04:49 PM: ImpAetnaCases.log: Could not resolve connection for TRL: sqlserver://@UTX001DS011/
– 1/31/2011 12:04:49 PM: ImpAetnaCases.log: Import complete with errors.


#3

Hi Greg, The connections used by the Automation scripts are managed by the connection manager. It appears that the script is trying to use the original connection. If that connection does not exist there is code to look for a similar connection but this code can only go so far. So, first try deleting the original connection from the connection manager tree. That may trigger the connection resolution code and find the new connection. If that doesn’t work you will need to fix the scripts. For this I like to use the Find and Replace in files feature of TDA. Attached is a sample script where I have two SS connections, one using OS Authentication and one not. You will need to find and replace the whole Connection Trl line. It looks like this. Search for the work Trl. This is found on 2.7 scripts. I assume your scripts are upgraded to 2.7? Trl=“sqlserver://sa@alv208534/” Description=“alv208534 (sa)” IsNullPassword=“False” NodePath=“SQL Server\alv208534 (sa)” Make a back up copy of your automation scripts, then from the Edit menu use the Find and Replace in files window. Set the strings and use the *tas extension. Select find in subfolder. This should handle things quickly. Let me know how it goes. Cheers,
Debbie
Script_SS_ConnectionSamples.tas (6.03 KB)


#4

Hi Greg, The connections used by the Automation scripts are managed by the connection manager. It appears that the script is trying to use the original connection. If that connection does not exist there is code to look for a similar connection but this code can only go so far. So, first try deleting the original connection from the connection manager tree. That may trigger the connection resolution code and find the new connection. If that doesn’t work you will need to fix the scripts. For this I like to use the Find and Replace in files feature of TDA. Attached is a sample script where I have two SS connections, one using OS Authentication and one not. You will need to find and replace the whole Connection Trl line. It looks like this. Search for the work Trl. This is found on 2.7 scripts. I assume your scripts are upgraded to 2.7? Trl=“sqlserver://sa@alv208534/” Description=“alv208534 (sa)” IsNullPassword=“False” NodePath=“SQL Server\alv208534 (sa)” Make a back up copy of your automation scripts, then from the Edit menu use the Find and Replace in files window. Set the strings and use the *tas extension. Select find in subfolder. This should handle things quickly. Let me know how it goes. Cheers,
Debbie
FindInFiles.png