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
abhijitsj
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: 59427
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.

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

exit;

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

M:\>test

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

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

M:\>
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: Sun Oct 26 01:23:16 CDT 2014

Total time taken to generate the page: 0.10714 seconds