Re: [cx-oracle-users] ORA-28000: the account is locked - but it works
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2011-04-06 06:56:20
|
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? -- Amaury Forgeot d'Arc |