Notes
Slide Show
Outline
1
GEM

A Toolkit To Automate Database Infrastructure Administration
  • By Ed Barlow
  • www.edbarlow.com
2
What Is GEM
  • GEM is short for “Generic Enterprise Manager”
    • A Complete Set of Tools For Sybase and SQL Server Dba’s (oracle 3Q08)
    • A way to proactively manage your servers
    • Built on open source perl
    • Based on 15 years of database shareware software
    • Designed by and written for DBA’s
3
What GEM Does
  • Routine Maintenance (backups etc…)
  • Configuration Management
  • Enterprise Security Management
  • Monitoring and Alarming
  • Morning Review Reporting
  • Common Task Automation
4
GEM is a complete solution
  • GEM automates systems management as much as practical
  • 15 years of automating the solving of real world dba problems


5
Current Solutions
  • Individually designed and maintained
  • Incomplete
  • Non Existent / Unacceptable Vendor Tools


  • You can miss stuff allowing problems to arise
6
GEM is Low Risk
  • GEM uses a simple centralized architecture
    • no agents
  • Open source
    • you can see exactly what it does
  • Uses common best practices
  • Easy to install and use
  • Low Risk to Try It Out
7
GEM Introduction
  • Target Market
    • Small to Mid Sized Enterprises
    • 3-50 Databases
  • Low Cost - High functionality
  • Designed For DBAs
8
GEM Design Notes
  • GEM works on NT, Linux, and UNIX
  • Centralized information collection
    • System Monitoring
    • Event Logs
    • Maintenance Information
    • Configuration & Audit Information
  • Morning Review Process
    • Provides static and dynamic views of this information
    • Understand exactly what is going on
9
GEM Design Notes
  • Simplicity – GEM is composed of small simple self documenting command line programs
  • Open API – the power of GEM is in its extensive infrastructure libraries (perl modules)
  • Common directory structure
10
GEM Design Notes
  • Reporting Problems But Don’t Fix Them  GEM provides information about potential problems but does not fix them.  That’s your job!
11
Sample Target Architecture
  • All Windows Environment
    • Centralized monitoring of windows databases
    • Complements vendor tools
    • Much more flexible than vendor tools
    • New system Stored procedures
12
Sample Architecture
  • All Unix / Sybase Environment
    • Centralized monitoring of your databases
    • Excellent backup and log shipping solution
    • Configuration Auditing
    • New system Stored procedures
13
Sample Architecture
  • “Hybrid/Mixed” Unix and Windows
    • All the benefits of both environments
    • Single common interface
    • Seamless interface if installed on samba share
14
The GEM Solution
  • Perl Open Source
    • Tk and html User interfaces
    • DBI Database Access
    • Perl is THE systems administration language
15
Components of GEM
  • GEM Console:  a set of web pages that are frequently updated in place by batch jobs.  These pages contain an enterprise view of your systems and their state.
  • GEM Manager: The user interface
    • GEM Monitor: Dynamic Server Monitor
    • GEM Event Viewer: Enterprise view of your servers
  • GEM Installer: The installer for the other components
16
Components of GEM
  • GEM Batch Scripts: Semi custom scripts that collect information and monitor your environment
  • GEM Stored Procedure Library for Sybase and SQL Server expands the vendor provided system procedures (released separately as freeware)
  • GEM Database: stores monitoring information
  • GEM Utilities: numerous command line utilities provide you with new capabilities
  • GEM Sybase & SQL Server Backup Scripts: a flexible plan based set of server maintenance scripts. (released separately as freeware)
17
GEM Console
  • The console is the reporting interface for GEM
      • Information at your fingertips
      • Dynamic JavaScript navigation
  • Output delivered through static web pages
      • No web server needed
      • Pages updated by Gem Batch Jobs
18
GEM Manager
  • Flexible plugin driven user interface
  • Plugins Available:
      • System Monitor (includes Sybase MDA tables)
      • Event Viewer
      • More…


19
Alarm Viewer
  • 2 Versions
    • Web script
    • Stand alone application
  • Allow enterprise viewing of alarms
  • Filter To See only the alarms you care about
  • Full Alarm Routing Interface (operators, schedules, etc)
20
GEM Installer
  • Stores information in configuration files
    • hand editable
    • conf subdirectory
      • gem.xml: store for discovered data
      • Server password files (*.dat)
      • configure.cfg: maintenance plans
  • Discovers your configuration
  • Configures the software
  • Sets up the batch jobs
21
GEM Batch Scripts
  • Customized by installation process
  • Integrated with windows scheduler
  • Sample crontab file created for easy scheduling
22
Stored Procedure Library for Sybase and Microsoft Sql Server
  • Extend the system stored procedures
    • significantly more usable
    • Start with sp__ (2 underscores) instead of sp_
    • Many common procedures
  • 90 New Stored Procedures
  • New Formatting, Additional Features, Extend the internal system procedures
23
Database Utilities
  • A large number of simple, easily understood, automation scripts.
  • Command line interface
  • Several powerful tools
24
GEM Libraries
  • Alarming
  • Database Connectivity
  • Persistent Database Connectivity
  • File Retrieval / Log File Filtering
  • Password Management
  • Survey
  • RosettaStone (generic db administration)
25
GEM style
  • All programs and libraries self documenting
    • perldoc program.pl
    • Program usage summary: program.pl -?
    • GEM Documentation is built from embedded perldoc
  • If a program doesn’t work
    • All programs take -d or -–debug command line args
    • program.pl –DEBUG or program.pl -d

26
Sybase & SQL Server Backup Scripts
  • Complete server maintenance toolkit
    • for Sybase and SQL Server
    • Use command line scripts
    • Based on Maintenance Plans
    • Aim to exceed the Native Backup facilities for SQL Server by providing a command line interface allowings you greater flexibility and control.
27
Sybase & SQL Server Backup Scripts
  • All Normal Operations Supported
    • Full and incremental database backups
    • Log shipping
    • update statistics & recompile
    • audit configuration information
    • Dbcc
    • index rebuilds
28
Sybase & SQL Server Backup Scripts
  • backup compression, verification, removal
    • transaction logs AND full database dumps
    • use internal or external compression
  • Integrated with monitoring and reporting
  • commands run from central system
  • backup success verification (tripple check)
29
Sybase & SQL Server Backup Scripts
  • Output in standard directory structure
    • BASE_BACKUP_DIR/SERVER NAME/
      • errors (existence of file indicates error)
      • raw dbcc output
      • sessionlogs
      • dbdump
      • logdump

30
Sybase & SQL Server Backup Scripts
  • Command line interface
    • backup.pl –JJOBNAME [-t]
    • dump_database.pl, load_database.pl etc…
  • Define Maintenance Plans In configure.cfg
    • If your Job is named MYPROD
      • NUM_BACKUPS_TO_KEEP=1
      • MYPROD_NUM_BACKUPS_TO_KEEP=2
    • The above keeps 2 backups for Plan MYPROD
31
Sybase & SQL Server Backup Scripts
  • Summary
    • Complete Solution for Sybase and Sql Server
    • Use instead of sql server native facilities if you need log shipping, compression, or have a complex environment
    • Use for sybase
32
GEM Console
  • Morning Review
    • Checks logs and systems tables
    • Space monitoring
    • Allows you to proactively manage servers
  • Extensive Configuration Reporting
    • Statements needed to rebuild servers
33
GEM Console
  • Collects Information
    • Stored in a database, xml, and/or flat files
    • Error Logs (all of them)
    • Backup Server Log Contents (for backup check)
    • Server Configuration (from internal commands)
    • System Historical Information
    • Process blocks, connectivity issues…
34
GEM Console
  • Customization
    • Can add your own reports trivially
      • configuration file
      • External tools add reports by placing output in a directory
  • Everything looks like a single enterprise
    • Many reports span systems and servers
    • Alternate views for QA, Development, Production
35
GEM Console
  • Backup / Nightly Job Monitoring
    • Backup success report (with history)
    • DBCC success/fail (with history for transient errors)
    • Tripple checks backups and log shipping
  • Rules based server analyzer
  • Web Based (no web server required – a browser is required)
36
GEM Console
  • Individual reports on your systems & servers
  • Summary aggregate reports
    • side by side server comparisons
  • Space growth details
37
GEM Console Screenshot
38
GEM Console Screenshot
39
GEM Console Notes
  • Audit security & configuration
    • Logins & roles
    • Security and Configuration problems
    • Creates the DDL required to rebuild your server
    • Security – Cross server
    • Login Failures
    • Changed Object Report
40
GEM Alarming and Monitoring
  • Uses a central database
  • Use simple function library
    • Heartbeat represent the ‘state’ of your systems
    • Event are things that happened at a point in time
  • Full featured alarming
  • Simple To Use, Powerful, and Complete
41
Ad Hoc GEM Tools
  • Reverse Engineering
  • DB Wide Performance Tuning Using Showplan
  • Log File Filter
  • Compare DDL in 2 Servers/Databases
  • Object Dependency Analyzer
42
Where To Start
  • Documentation at www.edbarlow.com
  • GEM Documentation: www.edbarlow.com/gem
  • Read the Getting Started Guide
  • Contact us for a trial
43
Minimum Requirements
  • SQL Server or Sybase (preferred) Database
    • 100-200MB
  • Dedicated monitoring system
  • Perl 5.8 or later
  • Samba if using both unix and sybase
44
Summary
  • Full Featured, Perl, Open Source
  • Simple & Practical – designed for the working dba
  • Parts distributed as free software for 15 years
  • Well Designed (obvious directory tree, self documentation, embedded diagnostics)
  • Automation For Effective multi-server administration.
  • Satisfaction Guaranteed
45
Automation is the Key to Effectively managing large numbers of database systems

GEM is the Key to Automating routine DBA tasks