Python programming | How to execute Oracle Procedure from Python Script

preview_player
Показать описание
This is the ninth video of Database programming with Python video tutorial series. In this video we will see how to connect to the Oracle database using the cx_oracle package and execute oracle procedures using the callproc method, we will see how we can pass parameters to the procedure from python script/

callproc(proc_name, parameters)

Steps performed:
================
Create Connection
Create Cursor
execute the procedure with callproc
close the cursor
close the connection

The cx_Oracle is a Python extension module that enables access to Oracle Database. It conforms to the Python database API 2.0 specification with a considerable number of additions and a couple of exclusions.

cx_Oracle 7 has been tested with Python version 2.7, and with versions 3.5 through 3.8. You can use cx_Oracle with Oracle 11.2, 12, 18 and 19 client libraries. Oracle's standard client-server version interoperability allows connection to both older and newer databases. For example, Oracle 19c client libraries can connect to Oracle Database 11.2.

Links to all videos related to Database programming with Python
=================================================================

Tools used in creating and executing the scripts:
==================================================
VSCode - Visual Studio Code
SQL Developer

Links used while creating the content:
=======================================

Content and video created by - Kishan Mashru
Рекомендации по теме
Комментарии
Автор

very Nice Explanation, Sir.Needs More TutorialFrom You.

mithunchandrasaha
Автор

Hi brother super video.
If we want to pass the multiple list at callproc.. What is the way?
I mean multiple record insert into database in dogle execution of the above program

shankarshiva
Автор

Hi Kishan, thanks for the helpful Python video. Can you share a similar one to execute a snowflake stored procedure? Thanks

hwlpxqj
Автор

Hi Kishan your database connection vedios really help me and explanation is superb
i want small advice from you i want to looking data analyst job so i know python and pandas matplotlib numpy seaborn
so should we learn django also for those who want to be a python data analyst profession

BHARATHEEYUDU.
Автор

it shows error, PLS-00201: identifier 'INS_CEO_DETAILS' must be declared
i see that INS_CEO_DETAILS has not been created

pratik
Автор

Thanks Kishan. Can you explain us how to do proc with out variable and if I have couple of out variables as ref cursors then how to handle that in Python 🙏

chetanpatil
Автор

Is there a good source example of getting back a ref cursor from an oracle sp using python

basildave
Автор

Hi, Can we create a procedure from python using cursor execution with SQL string??

SaiKrishna-xbhy
Автор

Hi, can you make a reverse video on how to make a function in python and then invoking the same function in one of our procedure in sql developer..For eng: I want to make a procedure and execute that in sql developer, in that procedure I call a python function to convert table data into excel ….can you make a video on same, it would be highly appreciated

akshayjoshi