Re: [cx-oracle-users] Connecting to database without a password
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2007-11-15 02:41:09
|
Sure, I think I can help. In Linux, assuming you type the following in SQL*Plus connect / as sysdba then with cx_Oracle you would use connection = cx_Oracle.Connection(mode = cx_Oracle.SYSDBA) There is no need to specify any username, password or tnsentry since you are connecting directly (the environment variable $ORACLE_SID has been set). If in SQL*Plus you type instead connect /@mydb as sysdba then you would instead use connection = cx_Oracle.Connection(dsn = "mydb", mode = cx_Oracle.SYSDBA) There is still no need to specify the username or password as those are implied. If that doesn't help, feel free to ask again. I do this sort of thing regularly so I know it works. :-) Anthony On Nov 14, 2007 5:23 PM, Farkas, Chris <cf...@ma...> wrote: > > > > > When logged in as oracle in Linux, I'm able to log into my database as sys > without a password. > > > > However, when trying to do so using cx_Oracle.connect('sys', '/', '<SID > name>', cx_Oracle.SYSDBA), I get the following error: > cx_Oracle.DatabasError: ORA-01017: invalid username/password; logon denied > > > > If I change to, cx_Oracle.connect('sys as sysdba ', '/', '<SID name>', > cx_Oracle.SYSDBA), I get the following error: cx_Oracle.DatabasError: > ORA-01031: insufficient privileges. I get this error even if I replace '/' > with the correct password. Yet, I have no problem logging in "sys as > sysdba" in sqlplus. > > > > I've tried changing the '/' to '' and eliminating it altogether. None of > that seems to work. We're trying to make it so that this script can run > without the password because that makes our project much more complicated. > Can anyone suggest anything? PLEASE? > > > > Thank in advance, > > > > Chris > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |