How connect to an Oracle database from Python

Поділитися
Вставка
  • Опубліковано 16 гру 2024
  • Learn how to connect to an Oracle database from Python. Includes installation of packages, OS dependencies, connection configuration and troubleshooting.

КОМЕНТАРІ • 67

  • @ishanipaul4457
    @ishanipaul4457 4 роки тому +7

    This step by step tutorial is really helpful while setting the Oracle DB connection. Really appreciate your effort.

  • @danielgreenblatt1911
    @danielgreenblatt1911 5 років тому +1

    after 2 freaking days of trying to work this thing out and going through half the internet your video is what helped me!!! THANK YOU!!!

  • @mithunchandra8221
    @mithunchandra8221 Рік тому

    Very Nice Explanation,Sir.Needs More.

  • @pratik2617
    @pratik2617 Рік тому

    this errror shows when i use , pip intsall cx_Oracle ,,,,,,,,,,,,,,,,,,,,
    error : Could not build wheels for cx_Oracle, which is required to install pyproject.toml-based projects

  • @reetabhal9309
    @reetabhal9309 2 роки тому

    Mesej yang jelas, struktur yang jelas, mudah difahami, terima kasih

  • @ashokbanala9480
    @ashokbanala9480 5 років тому +2

    Hello, i am encountered with exception cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 32-bit Oracle Client library; wherein i have checked the python (3.7) 32 bit and instant client version(32 bit).
    any help would be appreciated.

    • @sasmalpayal
      @sasmalpayal 5 років тому

      you have to install cx_Oracle lib like pip install cx_Oracle

    • @umairshabi
      @umairshabi 5 років тому

      having the same problem and also have installed cx_Oracle but the problem is still unresolved. please help me out

    • @M.Alsharafi
      @M.Alsharafi 4 роки тому

      how Can I Fix This ????????????????

    • @M.Alsharafi
      @M.Alsharafi 4 роки тому

      @@umairshabi how can i fix? Help Me

  • @fabienperon3065
    @fabienperon3065 Рік тому

    hi, pip nstall cx_oracle doesn't work. Two errors : ERROR: Could not find a version that satisfies the requirement cx_oracle (from versions: none) / AND / ERROR: No matching distribution found for cx_oracle. Any Idear ? Python version 3.9.2rc1 AND pip version 20.2.3

  • @chandu_akula
    @chandu_akula 4 роки тому +5

    ORA-12541: TNS:no listener
    I got this error when I am trying to connect python to oracle database in python .... Can you please help me solving this ???

  • @Gelidely
    @Gelidely 6 років тому +1

    Thank you for your instructions, they were very helpful

  • @shaukhkhan4457
    @shaukhkhan4457 5 років тому +3

    please guide me.
    my oracle database is remote location please tell me how can i connect through python program
    i mean how can i implement ssh path in cx_Oracle() method

    • @razzsawhoney2818
      @razzsawhoney2818 3 роки тому

      Hey @Shaukh Khan! I hope you must have the idea to do that by now. Can you please guide me how can I achieve the same. Looking forward to your response. Thank you.

  • @hunainwali3717
    @hunainwali3717 4 роки тому

    numpy library can import in java(OAF)?

  • @FrankelDavid
    @FrankelDavid 3 роки тому

    Hurray! This video solved my problem.

  • @luvuday81
    @luvuday81 5 років тому

    I have oracle 12 c database I used your command pip install cx_oracle. after this command my oracle services from the service.msc has vanished. I cannot login to a connection in oracle. I am getting adaptor error. Can you please help?

  • @oracle_professor
    @oracle_professor 2 роки тому

    Nice tutorial, Good work

  • @SC-hp5dn
    @SC-hp5dn Рік тому

    At 4.08 where you didn't get error, I am getting cx_Oracle Database Error, cannot locate 64 bit client library, the specified module couldn't be found. I followed all previous steps. what did I do wrong?

    • @GustavoHenri777
      @GustavoHenri777 7 місяців тому

      The scripts I had working suddenly started giving this error. Have you found out?

    • @nannuuuuu
      @nannuuuuu Місяць тому

      How did you solve it

  • @talk2chandran
    @talk2chandran 5 років тому

    Very informative and crisp.

  • @anthonyalfaro2938
    @anthonyalfaro2938 4 роки тому +1

    after following the steps, I'm getting this error:
    >>> import cx_oracle
    Traceback (most recent call last):
    File "", line 1, in
    ImportError: No module named cx_oracle

    • @chetanreddy106
      @chetanreddy106 4 роки тому

      install cx_Oracle using this command:
      pip install cx_Oracle

    • @pratik2617
      @pratik2617 Рік тому

      @@chetanreddy106 its not able to install

  • @apolomachine
    @apolomachine 5 років тому

    YOU ARE THE MAN!!
    you save me! finally i can connect to oracle from python thanks to YOU!

  • @DR1CHECK
    @DR1CHECK 5 років тому

    You are my new hero !! Thank You !

  • @imran22
    @imran22 4 роки тому +1

    cx_Oracle error. DPI-1047: Cannot locate a 64-bit Oracle Client library
    i am getting error like this ...what to do now...,plz reply

    • @mr.niceguy5935
      @mr.niceguy5935 3 роки тому

      Had the same error. Not sure if still up to date, since 3 months ago.
      lib_dir = r"C:\...path...\instantclient_19_9"
      try:
      cx_Oracle.init_oracle_client(lib_dir=lib_dir)
      except Exception as err:
      print("Error connecting: cx_Oracle.init_oracle_client()5")
      print(err);
      sys.exit(1);
      worked for me. I also added the instant client path to PATH via enviroment variables, but didnt work out for me. I wasted a whole day finding this solution for me...
      Also credits go to stackoverflow.com/questions/56119490/cx-oracle-error-dpi-1047-cannot-locate-a-64-bit-oracle-client-library, which helped me to figure it out.

    • @imran22
      @imran22 3 роки тому

      Oh thanks buddy, i'll do also same

  • @sjk_88
    @sjk_88 4 роки тому

    What happens in the background of cx_Oracle? How does it connect to the database?

  • @mohammadRaddad-i5t
    @mohammadRaddad-i5t Рік тому

    how to downrange the versions ?!

  • @kata-manasse
    @kata-manasse 2 роки тому

    How can I add the name/pw to the tnsnames.ora default service file? Also is there an example of usage?

  • @dennisverhoeven9472
    @dennisverhoeven9472 5 років тому

    Hi, thank you for this. I am struggling to connect to my Oracle DB on a different Windows system. While I can connect with Oracle MySQL Developer from my computer (and the connection is working), the set-up in the video does not work. I get either an ORA-12514: TNS: listener does not currently know of service requested in connect descriptor' (when I add the host name as path) or a connection timeout error. Any idea what might be a solution? Thanks!

    • @smirkedShoe
      @smirkedShoe 5 років тому

      Facing the same issue. Tried handling with promise also. Not getting lead -_-

  • @PielogGames
    @PielogGames 3 роки тому

    Who has DPI-1047 error. Try reinstalling python with a different bit depth. For example, switching from 32bit to 64bit helped me. Only during installation, click the checkbox next to include to PATH.
    У кого ошибка DPI-1047. Попробуйте переустановить python другой разрядности. Мне например переход с 32bit на 64bit помог. Только при установке нажмите галочку возле include to PATH (вроде как-то так называется), это нужно, что бы в консоли у вас старая версия сменилась на новую (а то будете пытаться работать со старой версией)

  • @okerenciler728
    @okerenciler728 5 років тому +1

    I have an error when I import cx_Oracle. Do you know how I can deal with it?
    ModuleNotFoundError Traceback (most recent call last)
    in ()
    ----> 1 import cx_Oracle
    ModuleNotFoundError: No module named 'cx_Oracle'

  • @MohitBhagwani94
    @MohitBhagwani94 5 років тому

    Hi,
    I'm getting "cx_Oracle.DatabaseError: ORA-12154: TNS: could not resolve the connect identifier specified" error.
    I cross check the path(C:\Users\mohit\instantclient\instantclient_18_5
    etwork\admin) and tnsnames.ora file seems to be correct.
    I don't know where is my mistake, can anyone help?
    I'm using Windows 10 OS.

    • @JeroenKloosterman
      @JeroenKloosterman  5 років тому

      Hello Mohit. Can you double check your PATH? It should point to the Oracle Client directory, with a number of files e.g. DLL's in it. Also it could be because of a spelling error in tnsnames.ora. let me know if you require more help.

    • @ioannissemertzidis6873
      @ioannissemertzidis6873 5 років тому

      @@JeroenKloosterman Well, i was getting the same error. When i used the SERVICE_NAME value in place of "MYSERVICE" showing in the video, the error was no more...

  • @yashvanthav5652
    @yashvanthav5652 3 роки тому

    Can I get to know what a connectuon string is?

  • @akshayjoshi4106
    @akshayjoshi4106 4 роки тому

    Hi I am getting dpi-1072 error can you please help

  • @sachguru1
    @sachguru1 3 роки тому

    Brilliant Brilliant Brilliant!!!

  • @MohamedKamal-im2gm
    @MohamedKamal-im2gm 4 роки тому

    I always get this error "DatabaseError: DPI-1050: Oracle Client library is at version 11.1 but version 11.2 or higher is needed"
    I updated Path variable with instat client path also ld_liberary_path

  • @M.Alsharafi
    @M.Alsharafi 4 роки тому

    Thank you for Help me .
    but how can i fix this problem :
    cx_Oracle.DatabaseError: DPI-1072: the Oracle Client library version is unsupported....

  • @noothanprasadacharibogiswa1610
    @noothanprasadacharibogiswa1610 5 років тому +1

    Good bro

  • @xorben1981
    @xorben1981 5 років тому +1

    Die you try to hide the PW and Thema Just Show it? 😮

  • @jkhongy
    @jkhongy 5 років тому

    Real Nice and Big Thanks !

  • @danielkike2116
    @danielkike2116 5 років тому

    Thanks for the video, very helpfull :D

  • @C0ttageChees
    @C0ttageChees 2 роки тому

    Thank you very much for the help. =] I'm also very interested in knowing what other languages you know. I have a guess but do not want to say and potentially be offensive or something lol May I know?

  • @ahmetemirhancnar736
    @ahmetemirhancnar736 5 років тому

    You are the man thx a lot

  • @carolinarodriguez-yk8hx
    @carolinarodriguez-yk8hx 4 роки тому

    Hi. i have this error cx_Oracle.DatabaseError: ORA-01017 with the comand cx_Oracle connection... :(

  • @ЕкатеринаАлеткина

    You can choose for one of the above gifts

  • @shigri700
    @shigri700 2 роки тому

    connection=cx_Oracle("user","test","mycon") TypeError: 'module' object is not callable

  • @dhanashreewagh7931
    @dhanashreewagh7931 Рік тому

    Thank youuu!!!

  • @xorben1981
    @xorben1981 5 років тому +1

    _Oracle23456

  • @cybern9ne
    @cybern9ne 5 місяців тому

    No longer relevant.