|
Tools for a Comprehensive Database Environment - Part 2
Published: September 1, 1998 In the second of two parts, this article addresses database tools that focus on the analysis, reporting, and utilities of database administration.
There are five major RDBMS products: Oracle, IBM DB2, Microsoft SQL Server, Sybase SQL Server, and Informix. Each is a complete, full-function RDBMS. An organization can install and use the DBMS as delivered, but will quickly recognize that the functionality needed to adequately support large-scale database development is not provided adequately by the RDBMS alone. The administration and maintenance of database applications is time-consuming if you use only the standard features of the DBMS. Fortunately, many tools that enhance the functionality of relational database management systems are available from third party vendors. These tools ease the administrative burden and reduce the possibilities of database error. The true need for these tools becomes apparent simply by reviewing the sheer number of products that are available. Most organizations implement at least one or more add-on tools for their DBMS. But, many varieties of tools are available that fulfill market niches not adequately supported the major RDBMS vendors. In the second of two parts, this article addresses database tools that focus on the analysis, reporting, and utilities of database administration. The first part of the article addressed database tools that focus on development. The following is a rundown of the categories of products. Covered in Article Part 1 - Development Tools
Client/Server Tools
Auditing Tools 1Auditing Tools - back to top An audit is the examination of a practice to determine its correctness. Database auditing software therefore should help in monitoring the data control, data definition, and data integrity in the database environment. Several RDBMS products provide limited audit mechanisms, but these features are typically difficult to implement, use, and maintain. Typical features that should be auditable include:
An audit tool should provide five important features:
If your shop has strict auditing requirements, an auditing tool is almost mandatory because of the weak inherent auditing capabilities of most DBMS products. Catalog Query and Analysis Tools - back to top The system catalog or data dictionary (depending on the DBMS) contains a wealth of information essential to the operation of DBMS. Information about all database objects, authority, and recovery is stored and maintained in the system catalog. The system catalog is composed of relational tables, and can be queried using SQL and/or vendor-supplied stored procedures. Some DBMS vendors provide system catalog views that are easier to query and monitor. However they are accessed, these tables provide a base of information for many monitoring and administrative tasks. But coding SQL can be a time-consuming process. Often, you must combine information from multiple catalog tables to provide the user with facts relevant for a particular task. And, for the most part, the DBMS vendors have made the tables difficult to understand and query by using odd naming conventions, denormalized structures, unused columns, poor data type choices, and little documentation. When stored procedures and views are provided querying these tables is easier, but sometimes crucial information is missing from these pre-canned "queries." Add-on tools can ease the burden of developing complex SQL queries to access the system catalog tables. The basic feature common to all catalog tools is the capability to request catalog information using a GUI (or panel-driven) interface without coding SQL statements. Analysts can obtain rapid access to specific facts stored in the system catalog without the burden of coding (sometimes quite complex) SQL. System catalog tools that provide only this level of capability are rudimentary tools at best. Most of these tools provide much more capability. Instead of merely enabling data access, many tools can do one or more of the following:
Database Analysis Tools - back to top Most RDBMSs do not provide an intelligent database analysis capability. Instead, a database administrator or performance analyst must keep a vigilant watch over each database and its objects using system catalog views and queries or a system catalog tool. This is not an optimal solution because it relies on human intervention for efficient database organization, opening up the possibility of human error, forgetting to monitor, and misinterpreting analyzed data. Fortunately, database analysis tools exist that can proactively and automatically monitor your database environment. This monitoring can
A repository stores information about an organization's data assets. Repositories are used to store meta-data, or data about data. They frequently are used to enhance the usefulness of application development. In choosing a repository, base your decision on the meta-data storage and retrieval needs of your entire organization, not just the databases you wish to support. Typically, a repository can
These are some of the more common functions of a repository. When choosing a repository for database development, the following features generally are desirable:
This section is a brief overview of repositories. An extended discussion of repository technology is beyond the scope of this article. Space Management Tools - back to top Most DBMSs provide basic statistics for space utilization, but the in-depth statistics required for both space management and performance tuning are usually inadequate for heavy duty administration. An typical example of a missing space management element is the capability to monitor the requirements of the underlying files used by the DBMS. When these files go into extents or become defragmented, performance can suffer. Without a space management tool, the only way to monitor this information is with arcane and difficult-to-use operating system commands. This can be a tedious exercise. Additionally, each DBMS allocates space differently. The manner in which the DBMS allocates this space can result in the inefficient disk usage. Sometimes space is allocated but the database will not use it. A space management tool is the only answer for ferreting out the amount of allocated space versus the amount of used space. Space management tools often interface with other database and systems management tools such as operating system space management tools, database analysis tools, system catalog query and management tools, and database utility generators. SQL Analysis Tools - back to top The development of SQL to access tables is usually the responsibility of an application development team. With SQL's flexibility, the same request can be made in different ways. Because many of these ways are inefficient, the performance of an application's SQL could fluctuate wildly unless it is analyzed by an expert before implementation. The EXPLAIN or "show plan" commands provide information about the access paths used by SQL queries by parsing SQL in application programs and placing encoded output into a PLAN_TABLE or producing a standard access path report. To gauge efficiency, a DBA must decode this data and determine if a more efficient access path is available. SQL code reviews are required to ensure that optimal SQL design techniques are used. SQL code walkthroughs typically are performed by a DBA or someone with experience in SQL coding. This walkthrough must consist of reviews of the SQL statements, the selected access paths, and the program code in which the SQL is embedded. It also includes an evaluation of database statistical information to ascertain whether production-level statistics were used at the time of the EXPLAIN. A line-by-line review of application source code and EXPLAIN output is tedious and prone to error, and can cause application backlogs. A plan analysis tool can greatly simplify this process by automating major portions of the code review process. A plan analysis tool typically can
Currently, no tool can analyze the performance of the application code in which the SQL is embedded. For example, consider an application program that embeds a singleton SELECT inside a loop. The singleton SELECT requests a single row based on a predicate, checking for the primary key of that table. The primary key value is changed for each iteration of the loop such that the entire table is read from the lowest key value to the highest key value. A plan analysis tool probably will not flag the SQL statement because the predicate value is for the primary key, which causes an indexed access. It could be more efficient to code a cursor, without a predicate, to retrieve every row of the table, then fetch each row one by one. This method might use parallel access, reducing I/O and elapsed time and thereby enhancing performance. This type of design problem can be caught only by a trained analyst during a code walkthrough. Although a plan analysis tool significantly reduces the effort involved in the code review process, it cannot eliminate it. There are two features that are required for any plan analysis tool:
Performance Monitors - back to top Performance monitoring and tuning can be one of the most time-consuming tasks for large or critical applications. Database performance monitoring and analysis tools support many performance-oriented requests in many ways. For example, database performance tools can operate
Each database performance monitoring tool will support one or more of these features. The evaluation of database performance monitors is a complex task. Often more than one performance monitor is used at a single site. Modern database performance tools can set performance thresholds that, once reached, will alert the DBA or perform another task to report on, or actually fix the problem. These tools are typically agent-based. An agent is a piece of independent code that runs on the database server looking for problems. It interacts with, but is not reliant upon, a console running on another machine that is viewed by the DBA. This agent architecture enables efficient database monitoring because the agent is not tied to a workstation and can act independently sending information to the DBA only when required. Most DBMSs bundle a simple query tool with the product. However, many shops find these tools inadequate for developing professional, formatted reports or complete applications. It can be inadequate also for inexperienced users or those who want to develop or execute ad hoc queries. Query tools address each of these deficiencies. The capability to format reports without programming is probably the greatest asset of these tools. Another important feature is the capability to develop data manipulation requests without using SQL. Many vendors provide table query and reporting tools that can be used to enhance ad hoc query capabilities. These products typically can
Database query tools typically use point-and-click, drag-and-drop technology to greatly ease the report generation process. Fourth-generation languages (4GLs) are also gaining popular for accessing relational data. These products provide more functionality than a report writing tool, but with the GUI front-end that makes them easier to use than 3GL programming languages such as COBOL and C. 4GL tools typically work in one of three ways:
Online Standards Manuals - back to top Products exists which provide "canned" standards for implementing, accessing, and administering databases. These tools are particularly useful for new database shops. By purchasing an On-Line standards manual these shops can quickly some up-to-speed with each new DBMS. However, mature shops can also benefit from these types of products if the third party vendor automatically ships updates whenever the DBMS vendor new version or release of their product. This can function as cheap training in the new DBMS release (e.g. for migrating from Oracle7 to Oracle8). A product containing database standards should:
Utility Enhancement Tools - back to top Most database utilities that ship free with the DBMS are notorious for their inefficiency, especially on very large tables. However, these utilities are required to populate, administer, and organize your databases. The typical utilities that are provided are load, unload, reorganization, backup, recover, and integrity checking. Several vendors provide support tools that replace the database utilities and provide the same functionality more efficiently. For example, one vendor claims that its reorganization utility executes six to ten times faster than the DB2 REORG utility. These claims must be substantiated for the applications at your organization (but the this claim is quite believable). Before committing to an alternate utility tool, be sure that it conforms to the following requirements:
Utility Management Tools - back to top One last category of database tool is the utility manager. This type of tool provides administrative support for the creation and execution of database utility jobstreams. These utility generation and management tools can
Miscellaneous Tools - back to top Many types of database tools are available. The categories in this article cover the major types of tools, but not all tools can be easily pigeonholed. For example, consider a database space calculator. It reads table DDL and information on the number of rows in the table to estimate space requirements. A space calculator often is provided with another tool such as a space management tool or a database design and modeling tool. Furthermore, new types of products are being announced quite regularly. For example, one vendor recently announced a product that analyzes all of the SQL that accesses a particular table and uses and set of expert rules to automatically recommend the most efficient indexes. Be sure to keep your eyes open for new and useful types of tools not mentioned in this article. Third party add-on tools can significantly improve the efficiency of developing applications that access relational data. When evaluating products, look for features important to your organization. Consider adopting checklists for product comparisons based upon the features discussed in this article. And remember, most RDBMS products leave quite a bit to be desired in the administration, data access, performance monitoring, and application development areas. Third party tools can help alleviate these pains. Go to Current Issue | Go to Issue Archive Recent articles by Craig S. Mullins
Craig S. Mullins -
Craig is a data management strategist and an executive with NEON Enterprise Software, Inc. (www.neonesoft.com). Craig has extensive experience in the field of database management having worked as an application developer, a DBA, and an instructor with multiple database management systems, including working with with DB2 for z/OS since Version 1. Craig is also an IBM gold consultant and is the author of two books:
You can contact Craig via his website at www.craigsmullins.com |