Re: [sqlalchemy] lockmode
On Jul 19, 2010, at 12:35 AM, Michael Mileusnich wrote: It's just a basic select statement I do not see any other parms. SQL Server doesn't support FOR UPDATE unless in conjunction with DECLARE CURSOR which is not typical DBAPI usage so this feature is not supported by SQLAlchemy with MS-SQL server. Stackoverflow confirms people can't really use FOR UPDATE with SQL server in any practical way: http://stackoverflow.com/questions/1483725/select-for-update-with-sql-server Thanks Michael Mileusnich On Sun, Jul 18, 2010 at 5:05 PM, Michael Bayer mike...@zzzcomputing.com wrote: What does your SQL output say? Do you see FOR UPDATE in the log? Sent from my iPhone On Jul 17, 2010, at 8:47 PM, Michael Mileusnich justmike2...@gmail.com wrote: Hello, I am running Python 2.6 SQL Alchemy 0.5.8 against MS SQL Server Express 2008 with pyODBC. When I issue something like: sess.query(job).with_lockmode(update) It does not seem to be locking according to the query I am getting back from my profiler. Is this the correct usage? Thanks Mike -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] lockmode
What does your SQL output say? Do you see FOR UPDATE in the log? Sent from my iPhone On Jul 17, 2010, at 8:47 PM, Michael Mileusnich justmike2...@gmail.com wrote: Hello, I am running Python 2.6 SQL Alchemy 0.5.8 against MS SQL Server Express 2008 with pyODBC. When I issue something like: sess.query(job).with_lockmode(update) It does not seem to be locking according to the query I am getting back from my profiler. Is this the correct usage? Thanks Mike -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en . -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] lockmode
It's just a basic select statement I do not see any other parms. Thanks Michael Mileusnich On Sun, Jul 18, 2010 at 5:05 PM, Michael Bayer mike...@zzzcomputing.comwrote: What does your SQL output say? Do you see FOR UPDATE in the log? Sent from my iPhone On Jul 17, 2010, at 8:47 PM, Michael Mileusnich justmike2...@gmail.com wrote: Hello, I am running Python 2.6 SQL Alchemy 0.5.8 against MS SQL Server Express 2008 with pyODBC. When I issue something like: sess.query(job).with_lockmode(update) It does not seem to be locking according to the query I am getting back from my profiler. Is this the correct usage? Thanks Mike -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.comsqlalchemy%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.comsqlalchemy%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] lockmode
Hello, I am running Python 2.6 SQL Alchemy 0.5.8 against MS SQL Server Express 2008 with pyODBC. When I issue something like: sess.query(job).with_lockmode(update) It does not seem to be locking according to the query I am getting back from my profiler. Is this the correct usage? Thanks Mike -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] lockmode-SA-error
Hi I am using oracle/mysql and sqlalchemy for a project I am working on. I have a query executed like this SELECT table_entity_id, table_entity_type, table_avail_state, table_monit_state, table_transient_state, table_transient__1, table_owner, table_timestamp, table_description FROM (SELECT table_entity_id, table_entity_type, table_avail_state, table_monit_state, table_transient_state, table_transient__1, table_owner, table_timestamp, table_description, ROWNUM AS ora_rn FROM (SELECT table.entity_id AS table_entity_id, table.entity_type AS table_entity_type, table.avail_state AS table_avail_state, table.monit_state AS table_monit_state, table.transient_state AS table_transient_state, table.transient_state_time AS table_transient__1, table.owner AS table_owner, table.timestamp AS table_timestamp, table.description AS table_description FROM table WHERE table.entity_id = d282-08a9-272a-458a22e93f74 FOR UPDATE) WHERE ROWNUM =1) WHERE ora_rn 0 This query uses FOR UPDATE in one of the select statements,where there am using a lockmode to a row in SA The query works fine with mysql but it fails in oracle with errorMissing right parenthesis. While I am excuting the single select command with FOR UPDATE it works fine for the given nested query it gives error,But with out the FOR UPDTAE syntax the query works fine with ORACLE I thing this an error for Lockmode using in a nested query. The error i have like this: DatabaseError: (DatabaseError) ORA-00907: missing right parenthesis Any help is appreciable Thanks -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.