Git Product home page Git Product logo

dba_scripts_02's Introduction

I plan to put about 20 scripts in this repository. Most of these scripts I'm using in production environment.
Most of the scripts are in Perl, some scripts are in Python and Shell.
All scripts write log files in directory ./log, and send e-mail to DBA in case of emergency.
We use Oracle DataGuard as disaster recovery. Almost all scrips check database role because supposed to run on
Primary database.

THIS IS WORK IN PROGRESS.

Directory structure
-------------------
WORKING_DIR - directory where all monitoring and statistics scripts are located (.sh, .pl, .py)
WORKING_DIR/log - all log files go into this directory
WORKING_DIR/config - Perl and Python configuration files live there.
WORKING_DIR/pictures - all charts generated by statistics scripts.

1. Oracle Alert Log Monitor Scripts
1.1. alert_monitor.pl
    This script connects to running Oracle instance and select alerts from table x$dbgalertext (for Oracle 11g and later).
    This table should be recycled in reqular bases because it can grow very fast and select statement will run for
    long time. Usualy it can be problem on Test/QA environments. Also this require database up and running.
    If your database crashs you will never receive alert, so there should be special script to monitor database.
1.2. alert_monitor_rb.pl
    This scrip read alert log file backward (from last line untill line with timestam stored in config file). In this
    case script execution time does not depend upon log file size. Also you will receive all alert, even if database is
    down, becase connection to the database is not requered.

2. Oracle Tablespace Monitor Script
3. Linux Disk Space Monitor Script
4. Perl library (my_library.pl) of common functions.
    4.1. sub CheckDBRole was added to eliminate query to database from each and every script to check current role
        (Primary or Standby). Some scripts should be run on Primary database only.
    4.2. All environment variables come from .bash_profile_cron
    

dba_scripts_02's People

Contributors

tolq15 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.