I am trying to script an odbc connection to multiple servers using odbcconf.exe and remote shell (rsh). I can't seem to make it work correctly. When I run the following script, it doesn't appear to do anything after it does the cmd.exe.
Any Ideas?
Dodge20
Code:
@echo off
setlocal
for /F %%G in (serverlist.txt) do (
rsh %%G cmd.exe
odbcconf.exe /Ln log.txt /a {CONFIGSYSDSN "SQL Server" "DSN=perfmon|Description=Perfomance Monitor on MyServer|SERVER=MyServer\sql1|Trusted_Connection=Yes|Database=MyDB"}
exit
)
Any Ideas?
Dodge20