On Wed, Apr 06, 2011 at 08:56:13AM +0200, Amaury Forgeot d'Arc wrote:
> Hi,
>
> 2011/4/6 <prz...@po...>:
> > Hello,
> >
> > I have the following code running on CentOS 5.5 + cx_Oracle-5.0.4-1:
> >
> > ...
> > for DB in config['main']['databases'].split():
> > try:
> > con = cx_Oracle.connect(<user>/<pass>)
> > cs = con.cursor()
> > cs.execute ("select 1 from dual")
> > con.rollback ()
> > con.close()
> > except cx_Oracle.Error as ex:
> > tmp_ex = ex
> > # log tmp_ex to file ...
> > ...
> > STR = DATE_TMP.strftime("%Y-%m-%d %H:%M:%S"), STATUS[DB], str(tmp_ex).rstrip('\n'), DB
> > LOG.debug (' '.join(STR))
> > ...
> >
> >
> > This code was working for a few months.
> > Just recently I get "ORA-28000: the account is locked" (logged to a file using tmp_ex) while connecting to the database
> > but I still get a result from 'select ...' (!!!).
> > When I try to connect to this database using sqlplus I am also able to connect and get
> > a result.
> >
> > Can anybody explain what is going on ?
>
> Your code has a loop to connect to several databases and perform the same query.
> Surely the result you get comes from the previous iteration of the loop?
You are right - thank you :-)
Regards
Przemyslaw Bak (przemol)
--
http://przemol.blogspot.com/
-------------------------------------------------
Wygraj 300 zl na paliwo!
Sprawdz » http://linkint.pl/f2960
|