I'm going to make a batch script to do some basic troubleshooting. Among other things, I want to test 32-bit MySQL ODBC's for connectivity. This script will run locally on each workstation. There doesnt appear to be any option in odbcconf.exe for this.
Asked
Active
Viewed 972 times
0
-
Maybe see http://serverfault.com/questions/450557/migrating-odbc-information-through-a-batch-file/451009#451009 – Ryan Ries Feb 20 '15 at 22:34
-
Not quite what i'm looking for. I simply want to test the connection, not create a new odbc. – Ken Ash Mar 27 '15 at 20:11
1 Answers
0
Something like:
sqlcmd.exe -U MyLogin -P MyPassword -S ComputerName\InstanceName | find "connected"
If the connection succeeds, then you know your ODBC connection is good.
Also, check out this big article on scripting with sqlcmd:

Ryan Ries
- 55,481
- 10
- 142
- 199