How do I modify a sql.ini file with a script to change the name of the SQL server to a new server?
Posted on 2006-06-30
I have a script to add a server to the sql.ini file:
SET SQLINI=%userprofile%\Application Data\(App Name)\SQL.INI
findstr /I (new server name) "%SQLINI%"
If errorlevel 1 goto :AddLine
Echo remotedbname=(new server name),DSN=(app name here) (new server name here)>>"%SQLINI%"
I need to find a server name, and either delete the line with the server name, or change the server name to "DO NOT USE". How would I script this??