I write a python code to check mysql service open or close. It is simple and you can change service_name parameter in the code to check another services. You can download from here check_service_status.py Below code maybe can not run because of python language format is tab structure. You can use with download original code…
Category: Python
Oracle 11g Data Guard Failover With Python Script
I wrote a python script to perform failover steps and to take product database IP addresses when product database is down. If you dont use data guard broker or other application for failover operations, you can use this script for failover. My scenario is that I have Oracle 11gR2 2 nodes RAC product database and…
Python Commands and Functions
Take value from user. input(“Enter a number : “) raw_input(“Enter a character : “) Counters range(100) # write from 0 to 100 range(100,200) # write from 100 to 200 range(100,200,2) # write from 100 to 200 as 2 by 2 len(“Fatih”) # character count result 5 File and Directory Operations listdir(“/home”/) # list all file…
Mail Send With Python
Mail Send Function | File name : sender.py import string import smtplib from email.mime.text import MIMEText def mailSend(subject,content): mailserver = “192.168.5.2” # Mail Server IP Address mail = MIMEText(content) mail[“From”] = “fromaddress@example.com” mail[“To”] = “toaddress@example.com” mail[“Subject”] = subject gonder = smtplib.SMTP(mailserver) gonder.sendmail(mailfrom,mailto,mail.as_string()) gonder.quit() Notification Example for Disk Status Check | File name : diskcheck.py from…
Python Programing Language Structure
Python supports multiple programming paradigms, including object-oriented, imperative and functional programming styles. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts….