#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2017
    Posts
    3
    Rep Power
    0

    Cannot connect to Oracle database


    Hi,

    I am facing same Problem, wherein - after exporting ORACLE_HOME & ORACLE_SID, i am able to open the SQL> prompt by using following command
    # $ORACLE_HOME/bin/sqlplus / as sysdba

    But i want to connect to the oracle database as SYSDBA & i am not able to make connections to the database.

    <snip>

    #!/usr/bin/python
    import cx_Oracle
    import os

    os.environ['ORACLE_SID']="oradb2"
    os.environ['ORACLE_HOME']="/oracle/12102/app/dbbase/dbhome/"

    conn = cx_Oracle.Connection("mode=cx_Oracle.SYSDBA")

    </snip>

    After running this python code :

    # python oracle_conn.py
    Traceback (most recent call last):
    File "oracle_conn.py", line 34, in <module>
    conn = cx_Oracle.Connection("mode=cx_Oracle.SYSDBA")
    cx_Oracle.DatabaseError: ORA-01005: null password given; logon denied


    I did search this a lot over web, i couldn't find any help.

    Seeking urgent help..!!

    Thanks in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2009
    Posts
    652
    Rep Power
    39
    cx_Oracle.DatabaseError: ORA-01005: null password given; logon denied
    The error message says that the DB is password protected.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2017
    Posts
    3
    Rep Power
    0
    @dwblas : Thanks for response.!

    Actually i could find the cause & the problem was that my user (sys) was not having an password & I think - cx_Oracle connection method/class is not built for passwordless users.
    Hence when i did put a password to SYS user, it worked fine.

    So - my connection has gone ahead & it did fetch few details from my database.

    But I had run one command to stop the IO on DB (alter system quiesce restricted) & it's not working as it's giving following error :

    cx_Oracle.DatabaseError: ORA-25510: quiesce not supported for the root container


    Any thoughts on this ?

IMN logo majestic logo threadwatch logo seochat tools logo