running tsql in a bat file

  • im creating a bat file that , when clicked will execute a sproc.

     

    the code behind the bat file is :

     

    @Echo on

    isql -Q"select * from table" -Sserver01 -dDatabase01 -E

    Pause

     

     

    this works fine on one database but not on another, it simply does nothing. the same security groups are on both machines, so do i have to change any settings in the server to allow sql to be executed from outside sql server ( like from a bat file)?

  • Do you have any text/ntext columns in the table?

    --Ramesh

    --Ramesh


  • no , only varchar columns. it runs fine on database A on server A, but database b, which is identical to database A, it wont run on ( database b is on a different server)

    it doesnt throw up an error, it simply does nothing when i execute the command

  • redirect the output to a text file which will let you know what exactly the problem is?

    isql -Q"select * from table" -Sserver01 -dDatabase01 -E -oC:\isqlerror.txt

     

    --Ramesh

     

    --Ramesh


Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply