Check database status using python
save this file as dbstatus.py
import cx_Oracle
db=cx_Oracle.connect("hr","hr","192.168.43.68/ind")
cursor=db.cursor()
cursor.execute(""" select name,open_mode from v$database """)
for count in cursor:
print(count)
Output:
"C:\Program Files\Python37\python.exe" C:/Users/ANURAG/PycharmProjects/phython_master/conn.py
('IND', 'READ WRITE')
Process finished with exit code 0
Usually I never comment on blogs but your article is so convincing that I never stop myself to say something about it. You’re doing a great job Man learn Oracle SOA Online Training
ReplyDelete