Changing scripts from using isql to sqlcmd - global replace?
Posted on 2013-10-29
I'm upgrading a sever that runs SQL server batch jobs. (The databases are actually on a different server, but SQL server is installed on this "Scheduling" server.) The server I'm upgrading is SQL Server 2000 and on it's replacement server I will be installing SQL Server 2008 R2 (to be like the servers where the DBs reside).
The batch jobs on the server currently run scripts like this:
isql -Usa -Ppw -dDBname -iD:\SQL\OrderHist.sql -SserverName
We also run BCPs in them that look like this:
bcp DBname..TableName in H:\download\txt\file.txt /fD:\bcp\fmt\file.fmt /Usa /Ppw /SserverName /r\n /m100
Should I be able to do a search and replace on these bat files and replace all the "isql" with "sqlcmd" and the bat jobs run just fine on the new server?
What about the BCP - will the same command format for it work on 2008?