Help required for Running SQLPLUS command from Bat file

Hello All,

Good Afternoon.

I am new to this platform and I need one small help regarding running a SQL file from Bat file. Below is what I am doing,

  1. I placed the below command in one Bat file.
start putty.exe -ssh user@host -pw pwd -m C:\2.txt
  1. In 2.txt, I have below command.
sqlplus u/u@host @/root/home/sql1.sql
  1. Sql1.sql has simple sql commands.

When I am invoking the bat file, its logging into putty and logging off and not doing any thing. :frowning:

If I run separately 2.txt by logging into putty then its running properly.

Please help me out. If I posted wrongly then, please guide me.

Any log files?

No Sir, I don't have log file.

Have putty write one.