Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open('tabledefinition.sql')
- full_sql = f.read()
- sql_commands = full_sql.split(';')
- for sql_command in sql_commands:
- curs.execute(sql_command)
- dsn_tns = cx_Oracle.makedsn('server', 'port', service_name='service_name')
- conn = cx_Oracle.connect(user='username', password='password', dsn=dsn_tns)
Add Comment
Please, Sign In to add comment