On 6/25/14, 5:50 AM, Ofir Herzas wrote:
> Sorry to barge in, but I'm having the exact same issue and I'm pretty
> sure no one altered the sequence manually.
> I'm using sqlalchemy 0.8, python 2.7.6, rhel 6.5, oracle 10g,
> cx_oracle with the same connection string as above
>
> This issue started just recently after running ok for more than a
> thousand times.
> I should also say that my application is installed at several
> customers, and I have this issue only at the one using Oracle.

I'm open to possibilities for how this could happen, short of the "ALTER
SEQUENCE" command being emitted, in which case feel free to grep
SQLAlchemy's codebase for this clause (it's not there).   From my
vantage point, if there is actually an issue that is implicitly making
this happen outside of application code, it would have to be on the
driver or server side somehow.



>
>
> On Tuesday, June 3, 2014 1:18:42 AM UTC+3, Michael Bayer wrote:
>
>
>     On Jun 2, 2014, at 1:17 PM, Scott Koranda <skor...@gmail.com
>     <javascript:>> wrote:
>
>     >
>     > I investigated and found that the sequence seq_admin_groups_id
>     > was now at the value 68 after having been used previously to
>     > insert rows with IDs in the 500s.
>     >
>     > I stopped the code and used sqlplus to change the sequence
>     > back to a value in the high 500s. I then restarted the code
>     > and the exception no longer occurred.
>     >
>     > I am unable to explain how the sequence seq_admin_groups_id
>     > went from in the 500s and working fine to suddenly being 68.
>     >
>     > The only place in the Python code where the sequence is used
>     > explicitly is in the definition of the AdminGroup() class.
>     >
>     > I would be grateful for any insights on how the sequence might
>     > have become out of sync or anything I can change in the code
>     > to prevent it from happening again.
>
>     there’s nothing on the Python library side that could do that,
>     someone had to have run an ALTER SEQUENCE on the database side in
>     order for that to happen.
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqlalchemy+unsubscr...@googlegroups.com
> <mailto:sqlalchemy+unsubscr...@googlegroups.com>.
> To post to this group, send email to sqlalchemy@googlegroups.com
> <mailto:sqlalchemy@googlegroups.com>.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to