SQL Server Password Change by TK Expect

To create a new TK Expect password change configuration, follow these steps:

1. Access the Executions ➔ Settings ➔ Templates and click on the action button, as shown in the image below:

2. Fill in the “Content” with the following script:

use tds

set-prompt “>”

set-new-line-mode “windows”

env “TDSVER” “8.0”

#Troca de senha


exec “go”

expect “1>”

After filling in the fields, the template will look like this:

3. In the device settings, add the following connections to change the password:

4. Access the credential configuration and add the created template to the password change, as shown in the image below:

5. After completing the configuration, perform the password change for the credential. Go to Executions ➔ List operations, click on the magnifying glass icon to check the logs.