Guest User

Untitled

a guest
Jan 29th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. f = open('tabledefinition.sql')
  2. full_sql = f.read()
  3. sql_commands = full_sql.split(';')
  4.  
  5. for sql_command in sql_commands:
  6. curs.execute(sql_command)
  7.  
  8. dsn_tns = cx_Oracle.makedsn('server', 'port', service_name='service_name')
  9. conn = cx_Oracle.connect(user='username', password='password', dsn=dsn_tns)
Add Comment
Please, Sign In to add comment