Home » Infrastructure » Windows » Executing script using bat file (10g)
Executing script using bat file [message #431656] Wed, 18 November 2009 23:19 Go to next message
Messages: 6
Registered: September 2009
Location: Pune
Junior Member
Hi All,

I want to create a bat file on oracle client machine. Which will login in to oracle and execute a sql script.

Re: Executing script using bat file [message #431663 is a reply to message #431656] Wed, 18 November 2009 23:39 Go to previous messageGo to next message
Michel Cadot
Messages: 62206
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And what is your problem in doing so?

There are many examples in Windows forum.

Re: Executing script using bat file [message #431680 is a reply to message #431656] Thu, 19 November 2009 02:06 Go to previous message
Messages: 20493
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Something like this:
select * from dept;


REM test.bat
sqlplus -s scott/tiger@ora10 @test.sql


M:\>sqlplus -s scott/tiger@ora10 @test.sql

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

Previous Topic: Encount ORA-00600 when setting audit_trail parameter
Next Topic: How to call stored procedures by batch file (merged)
Goto Forum:

Current Time: Thu Nov 26 04:54:23 CST 2015

Total time taken to generate the page: 0.22240 seconds