This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
from tabulate import tabulate | |
if __name__ == '__main__': | |
report_headers = [] | |
data = [] | |
with open('data.csv','r') as f: | |
reader=csv.reader(f,delimiter='\t') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import the wb module | |
from wb import * | |
# import the grt module | |
import grt | |
# import the mforms module for GUI stuff | |
import mforms | |
# define this Python module as a GRT module | |
ModuleInfo = DefineModule(name="Refactor", author="mjlmo", version="0.1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Information about the server | |
select @@hostname as 'host',@@version_compile_os as 'OS', | |
@@version as 'Server Version',@@collation_server as 'Default collation', | |
@@version_compile_machine as 'Server Binary', | |
@@basedir as 'Binaries Folder', @@datadir as 'Data Folder'; | |
#Information about the databases | |
#Number of databases | |
select count(schema_name) as 'Number of DB' from | |
INFORMATION_SCHEMA.schemata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
plist.id, plist.user, plist.host, plist.db, | |
plist.command, plist.TIME, plist.state, | |
plist.info, trx.trx_state, | |
trx.trx_wait_started, | |
trx.trx_query, blockerw.blocking_trx_id, | |
(CASE | |
WHEN (blockerw.blocking_trx_id IS NOT NULL) THEN 'Blocked' | |
WHEN (lockedtr.trx_id IS NOT NULL) THEN 'Locked' | |
ELSE '' |