Python Programming | Connect to an Oracle database from python

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024

Комментарии • 71

  • @kennethbass1915
    @kennethbass1915 2 года назад +8

    This was a really good explanation. No extra information, just everything you actually need to know to start writing queries to access your DB from python.

  • @abhiseksenapati8018
    @abhiseksenapati8018 6 месяцев назад +1

    Awesome explanation. Just as you need. Keep it up man. Really helpful

  • @mithunchandra8221
    @mithunchandra8221 Год назад +1

    Very Very Nice Explanation,Sir. Needs More.

  • @adamdost7573
    @adamdost7573 3 года назад +2

    Nice, keep uploading

  • @pratik2617
    @pratik2617 10 месяцев назад +1

    this video is freaking amazing , thanks a lt for this bro

    • @KishanMashru
      @KishanMashru  10 месяцев назад +1

      Glad you liked it!

    • @pratik2617
      @pratik2617 10 месяцев назад +1

      @@KishanMashru also the way of talking is very relaxed , amazing

  • @robk4099
    @robk4099 2 года назад

    Very well explained thx

  • @user-zv2mc8hd9c
    @user-zv2mc8hd9c Год назад

    bro i am getting error like this while installing package ,
    ERROR: Could not build wheels for cx_Oracle, which is required to install pyproject.toml-based projects

  • @nasrullahturke4480
    @nasrullahturke4480 Год назад

    What is the difference between driver and connector. Also is there any difference between python libraries for database connection and the odbc driver itself.

  • @oracle_professor
    @oracle_professor 2 года назад

    Thank you, Amazing

  • @ABMA79
    @ABMA79 4 года назад +2

    what if you get message that says: we can't locate the 64 bit oracle client....
    I downloaded cx_Oracle package.... I thought it should match directly the operating system running?
    Can you please explain how to resolve this issue?
    Thanks.
    Great lesson and tutorial by the way.
    It was very clear and straight forward.
    best regards.

    • @KishanMashru
      @KishanMashru  4 года назад

      Make sure you have the same python env and cx_oracle as your os . Eg if os is 64 bit, install 64bit python and 64 bit cx_oracle version... maybe you have 32bit of python installed instead of 64. I face the same issue earlier in my career.

  • @gayak1383
    @gayak1383 2 года назад +2

    Hi Kishan, thanks for all your good video tutorials, one quick question: i'm not seeing suggestions/IntelliSense with cx_Oracle. This is making me to search for the syntax, any suggestions please?

  • @sairohitht5984
    @sairohitht5984 3 года назад +1

    Good work bro!!!

  • @ujwal9512
    @ujwal9512 4 года назад +3

    What is the structure of the string you pass into the connection function? In the video you had 'HR/HR@//localhost:1521/orcl" is this '{username}/{password}@//{hostname}:{port}/{SID}'?

  • @lavanyau4062
    @lavanyau4062 2 года назад

    In line cur.execute (sql _create) I am getting missing double quotes identifier wt shd I do plz help as soon as possible?

  • @yoseph6456
    @yoseph6456 2 года назад +1

    Hi I get the error no listener. What could be the problem?

  • @SonuSingh-sn8qg
    @SonuSingh-sn8qg Год назад

    When I try cur.execute(), there is no method of execute(). What would be the issue ?

  • @Sahil-xd5lv
    @Sahil-xd5lv 4 года назад +1

    cx_Oracle.DatabaseError: ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA error

  • @nachinam
    @nachinam 4 года назад +1

    You are doing an amazing job... Please keep up the good work...

  • @ashachikodi6136
    @ashachikodi6136 3 года назад +1

    Hello, this was useful, I just wanted to suggest, can u add how can we do the same when we need to put a password to connect to DB.

  • @manishshinde4954
    @manishshinde4954 3 года назад

    I'm getting getting DPI-1047 database error with DSN connection string. How do I solve it?

  • @Vattepollu
    @Vattepollu 4 года назад +2

    simple and clear

  • @amitabhsarkar8967
    @amitabhsarkar8967 3 года назад

    . i successfully installed pip install cx_Oracle but still got an error "ModuleNotFoundError: No module named 'cx_Oracle'" .... please help

  • @pravinshahapure2936
    @pravinshahapure2936 3 года назад

    Hello Sir, able to connect Oracle to python but while accessing time getting this error, pls help me to solve this " cx_Oracle.DatabaseError: DPI-1072: the Oracle Client library version is unsupported"

  • @gajjalanandu9192
    @gajjalanandu9192 3 года назад +2

    Hello , it is very helpful keep it up, and can we deploy the .sql scripts (pl/sql and Structure change requiest(SCR) and Data change request(DCR) files) in daily bases into oracle database by using python language.(for automating deployment process). if yes could you suggest the python script or link of website.

  • @mariogreco729
    @mariogreco729 2 года назад

    Kishan, thank you for your excellent content! Just one question: How can I execute a Select From Query and save it in a JSON?

  • @TomJerry-hp3iy
    @TomJerry-hp3iy 3 года назад

    the error is cx oracle database error dpi cannot locate the 64 bit oracle client library how can solve it plz help me

  • @asvlogs2288
    @asvlogs2288 2 года назад

    bhai i need your help related to how to insert stock price in database using cx_oracle

  • @skipa9906
    @skipa9906 3 года назад

    Hi, is it possible to create a script using python to connect to oracle SQL Developer and read a DDL script to a txt file on my pc? if yes, do you have a video on how its done or links to check out?

  • @Helpinghands1212
    @Helpinghands1212 2 года назад

    Hii sir it shows database error : DPI-1047 : cannot locate a 64-bit Oracle client library....I am facing this type of error sir....please give me solution

  • @papachoudhary5482
    @papachoudhary5482 3 года назад

    Thanks! Sir

  • @srikanthadepu9959
    @srikanthadepu9959 4 года назад +1

    How to connect as sysdba without password with python 'cx_Oracle' the way we do in shell script 'sqlplus -s / as sysdba' ?

    • @KishanMashru
      @KishanMashru  4 года назад

      Pass in the password as '' it will use the os authentication

  • @NewbieInForeignLand
    @NewbieInForeignLand 4 года назад +1

    Hello Amazing video i must say. Keep coming up with such more content. My one concern is what if i have Cutom JDBC URL, what should i do in that case to get HOST, USERNAME & PASSWORD. Please help

    • @KishanMashru
      @KishanMashru  4 года назад +1

      Try passing in the custom url in the connection object

    • @NewbieInForeignLand
      @NewbieInForeignLand 4 года назад

      @@KishanMashru cool Thank you, let me try 😃

  • @SanjayPradeepEngineer
    @SanjayPradeepEngineer 4 года назад +2

    Can someone help me for connecting oracle remote database with python? much appreciated.

    • @KishanMashru
      @KishanMashru  4 года назад

      It should be the same username/password@server

  • @prasadwants
    @prasadwants 4 года назад +1

    I am getting an error when I try to connect to the database saying " cx_Oracle.DatabaseError :DPI-1047 : Cannot locate a 32 but client library"

    • @prathameshkoyande8984
      @prathameshkoyande8984 4 года назад +1

      did you find any solution?

    • @KishanMashru
      @KishanMashru  4 года назад +1

      You need to have the same but version across OC, python interpreter and the cx_oracle package.
      If the os is 64 bit, install a 64 bit python and 64 bit cx_oracle package. If they miss match then you will get the mentioned error.

  • @gyanajyotipradhan4519
    @gyanajyotipradhan4519 3 года назад +1

    Sir I hv schemaname, password,hostname, service name and port. How to connect

    • @KishanMashru
      @KishanMashru  3 года назад

      user/password@hostname:port/servicename

  • @sparkans237
    @sparkans237 3 года назад

    I have a doubt. Connecting to already existing database is good but how do I create new database using python programming only like the way u created table. Please answer this it will be really helpful.

    • @carloseduardo-im4ss
      @carloseduardo-im4ss 3 года назад

      try using sqlite3, it allows you to create a local, flat file db

  • @jaimedpcaus1
    @jaimedpcaus1 3 года назад

    How are you able to configure your editor to display the tips after a component and a period (conn.???) Thanks

  • @safariihunt2184
    @safariihunt2184 3 года назад +1

    Awesome video!!!

  • @user-fg6mz1rh9b
    @user-fg6mz1rh9b 2 года назад

    Don't we need to close database connection in python like as in other languages?

    • @Imran20091990
      @Imran20091990 2 года назад

      We should close both connection and cursor. If we use with statement.. no need to specify explicitly..

  • @coucal
    @coucal 4 года назад +1

    Have you tried dumping pandas dataframe to oracle db?

  • @jmejias12
    @jmejias12 3 года назад

    Awesome video. Is it possible to pass the connection string from a config. file?

  • @bharaths3167
    @bharaths3167 3 года назад

    This python script is support for all versions or not?

  • @haris6080
    @haris6080 4 года назад +1

    Share similar one for Linux, does it requires Oracle Client

    • @KishanMashru
      @KishanMashru  4 года назад

      Irrespective of the OS the steps would remain the same!!!

  • @Gopal_Manda
    @Gopal_Manda 4 года назад +1

    I want to pass the username and password as parameters to cx_oracle.makedsn , how to pass them ?

    • @guravaiahe509
      @guravaiahe509 4 года назад +1

      Even I have the same issue. pls. let me know if you get any solution
      my property file like:
      host="hostname"
      user="username"
      password="passwd"
      I want to use these details in one of the python script to copy the data to remote server.

    • @KishanMashru
      @KishanMashru  4 года назад

      @@guravaiahe509 build the connecting string.
      username + '/' + password +'@' + database and then pass the same

  • @haris6080
    @haris6080 4 года назад +1

    cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found". See cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help

    • @KishanMashru
      @KishanMashru  4 года назад

      Make sure you have the same python env and cx_oracle bit version as your os bit version .
      Eg if os is 64 bit, install 64bit python and 64 bit cx_oracle version... maybe you have 32bit of python installed instead of 64 bit.

  • @nevcihant
    @nevcihant 4 года назад

    Thank you. It is really helpful video! After i applied all processes i got below error: May it occur because of firewall permissions? Do you have any suggestion about it?
    Traceback (most recent call last):
    File "", line 1, in
    cx_Oracle.DatabaseError: ORA-12170: TNS:Connect timeout occurred

  • @TomJerry-hp3iy
    @TomJerry-hp3iy 3 года назад

    error for connecting oracle database to python

  • @lax976
    @lax976 3 года назад

    Where is pwd