lundi 24 mars 2014

How do I connect as sysdba for oracle db using SQLALchemy


Vote count:

0




I am using sqlalchemy with flask and I want to connect to oracle DB as sysdba



SQLALCHEMY_DATABASE_URI ='oracle+http://cx_oraclesys:abc@DBNAME[mode=SYSDBA]'


This doesnt work and gives me a



`from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)
from app import views,models`


and I use this db object later. But I am not able to figure out how to write the


SQLALCHEMY_DATABASE_URI to login as sysdba


I also tried



CONN = cx_Oracle.connect('sys/abc', dsn='DBNAME', mode = cx_Oracle.SYSDBA)
SQLALCHEMY_DATABASE_URI = CONN


But that also doesnt work



asked 1 min ago

gusc

38





Aucun commentaire:

Enregistrer un commentaire