1

Can anybody let me know how to execute the python script which is saved as .py file inside oracle sql*PLUS?

Thanks and regards, Santhosha

2
  • 1
    SQLPlus is a client tool for interacting with an Oracle database. What do you mean by a .py file "inside Oracle sqlPLUS"? Commented Mar 15, 2014 at 9:11
  • Oracle support Java, so perhaps you could use Jython, an implementation of Python for the JVM, to run your Python code. Commented Mar 15, 2014 at 14:27

2 Answers 2

1

Use the HOST command to execute an operating system command from within a SQL*Plus script:

host python your_script.py
Sign up to request clarification or add additional context in comments.

Comments

0

You can run external commands from sqlplus by preceding them with a !

Example:

$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Sat Mar 15 15:45:35 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> !python temp.py
which one do you like ? "run"
run

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.