In my utility using SA against MS SQLServer I'm trying to properly
disconnect from a database and connect to another one. I can't seem to
find an easy way to do this. Closing a connection just puts that
connection back into the pool. I don;t want to do that.

I have many (100+) databases on several SQLServer servers that I want
to connect, do stuff, disconnect and move onto the next one. I don't
want to accumulate hundreds of connections until the program quits.

Currently I'm doing this to connect to a database:

    db = create_engine('mssql://sa:[EMAIL PROTECTED]/she9832')
    connection = db.connect()
    metadata.connect(db)
    session = create_session(bind_to=db)

where metadata is a DynamicMetaData instance.

What's the recommended way of doing this sort of thing?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sqlalchemy
-~----------~----~----~----~------~----~------~--~---

Reply via email to