Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CX_oracle connection

771625May 13 2010 — edited Jun 1 2010
Hi

I am having a trouble with my cx_oracle,sqlalchemy and oracle

My test program is as follows:

import pkg_resources
pkg_resources.require("cx-Oracle>=5.0.3")
import cx_Oracle
import sqlalchemy
from sqlalchemy.sql import select

db=sqlalchemy.create_engine('oracle://ora:ora@localhost')
conn = db.connect()

result = conn.execute("SELECT * from dummy")

print "Hello"
print result
for row in result:
print row
conn.close()

I am in this trouble for create_engine,
.create_engine('oracle://ora:ora@localhost') Works fine and am geting result.

.create_engine('oracle://ora:ora@localhost'/ora)-----where ora i mean to my schema
does not works could you please help to know what is the problem and the resolution.

THANKS
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2010
Added on May 13 2010
6 comments
3,222 views