New utility Python scripts for DBAs

I pushed out three new Python scripts that might be helpful to Oracle DBAs. They are in my miscpython repository.

Might be helpful to some people.

Bobby

About Bobby

I live in Chandler, Arizona with my wife and three daughters. I work for US Foods, the second largest food distribution company in the United States. I have worked in the Information Technology field since 1989. I have a passion for Oracle database performance tuning because I enjoy challenging technical problems that require an understanding of computer science. I enjoy communicating with people about my work.
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to New utility Python scripts for DBAs

  1. radhirk says:

    Hi Bobby,

    How can I connect to the multiple oracle databases using python ?

    I am able to connect successfully for a single database with no issue !!!
    import cx_Oracle

    con = cx_Oracle.connect(‘pythonhol/welcome@localhost/orcl’)

    cur = con.cursor()
    cur.execute(‘select * from departments order by department_id’)
    for result in cur:
    print result

    cur.close()
    con.close()

    Thanks,

    • Bobby says:

      Thank you for your comment. You can have two connection variables and two cursor variables, one for each database. Here is an example:

      Bobby

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.