I have a script which runs fine on my SQL Server Management Studio, but when I run it from a bat file I get a Error message
Change Database Context to VBScanWDB
Msg 7202, level 11 , state 2, Server MASChiCK\SQLExpress, line 2
Could not find server 'ChickRWJ in sysservers. Exe sp_addlinkedserver to add the server to syservers.
The CHICKRWJ is already linked into the Server so why would I run the addlinkserver Attached is my SQL Script
sqlcmd -S 220.127.116.11,9998\CHIEF -l 65534 -U sa -P golf -i C:|name.sql