Skip to content

Instantly share code, notes, and snippets.

@mayaracsferreira
mayaracsferreira / oracle_survival_tips.md
Last active April 9, 2021 23:59
Oracle sql statements to get quick information about database state and get daily things done.

Oracle Survival Tips

SQL statements to get quick information about database state and get daily things done. Statements were tested on 12c Release 1 and 2 environments, but most of them also apply to 11g.

Summary

Database management
import logging
import os
import time
class Logger:
FORMATSTR = '%(asctime)s\t| %(levelname)-6s | %(message)s'
TIMESTR = time.strftime("%Y%m%d")
def __init__(self, log_folder, log_file):
self.log_file = log_file