How do I create a batch file for SQLPlus?

I need to create a batch file i.e. batch.bat

...

When we execute this file:

  • It will open SQLPlus
  • It will select a file named file1.sql

    .

file1.sql

contains user-specific create and insert scripts.

I have file.sql

, but I need to know, how do I create a batch file to perform this function?

+1


a source to share


1 answer


Small test script (stored in a file named test.sql

):

select 1 from dual;

exit;

      



... and execute it:

sqlplus user/password @test.sql

      

+5


a source







All Articles