|
Blue Forest http://www.lslnet.com at 11:08 on July 18, 2006
Oracle and IBM DB2 UDB V7.2 (for reference purposes only go up in smoke.)
PASS Consulting Group
Lyoner Str. 15
D-60528 FrankFurt/M
Contents
Authors : 1
2 outline 2
Scope 3
New Features Overview 5 4
IBM DB2 version 4.1 7 5 overall database
4.2 Oracle9i 8
Five more 11
5.1 Performance 12
15 5.2 Scalability
5.3 easily managed 18
21 5.4 Availability
5.3 23 fault accident
Backup and restore 560 25
5.7 connectivity / Interoperability 27
Security 30 5.8
5.9 32 with the Standard
Integrated 34 5.10
Authors :
Jacqueline Bloemen Jacqueline (e-mail : jacqueline.bloemen@pass-consulting.com) entered the IT industry in 1980 and 1986 as consultants. From 1988, she committed relationship and data management technology, and the main concern of peace platform heterogeneous DBMS data warehouse and decision support system. The theme will include an analysis of current research and knowledge management CRM (Knowledge Management). She is a member of IBM's data management team gold medal consultant.
Guido Brunner Guido (e-mail : Guido.Brunner@partner-pass-consulting.com) from the IT industry started in 1982 - has been working for nine years in the PASS. He is the main areas for the different fields mainly located in a bank customer data warehouse and data management consulting. He has a wealth of experience in the mainstream DBMS, such as Sybase, Informix, Microsoft SQL Server, DB2 (OS390 and NT) and Oracle-in the recent 12 months, he shall be elected for a five-main DB2 UDB 7.1 and Oracle.
William Miller, in the past 12 years, William has been the large number of German and international companies DB2 consultants. He is familiar with all aspects of DB2-from conceptual design to the bottom of database performance monitoring and adjusting. He is a member of IBM DB2 gold consultants, often in the world of DB2 lecture meeting.
Bjarne Nelson Bjame in the fields of DB2, particularly aspects of performance and distributed. DB2 for the time he has worked for 15 years, mainly in northern and central Europe, occasionally in Australia, Canada, Latin America and the Far East. In 1996 and 1997, he was President of the European IDUG and gold as IBM data management consultancy projects, an independent consultancy. Bjarne regular articles and reports on DB2, mainly through London Xephon publication. From 1992, Bjarne had numerous meetings in the light of DB2 performance problems and distributed a demonstration, for example, IDUG, PRDUC, 11995 and Xephon Briefings. He related the experience to a whole series of DB2, DB2 UDB EEE is mainly used to achieve large data warehouse, but he remains committed to DB2 for OS/390 and participated in numerous data sharing can be achieved.
Steffen Steffen Oliver Schulz has a master's degree in business administration (professional computer science). From 1987 to enter the IT industry, who work in a number of companies, including Microsoft (leading database PM DACH). From 1995, he started as an independent consultant working banks, industries and healthy environment in the database and data mining projects. As he Sybase/MS from Informix to Oracle, SQL Server database developers and managers to understand the numerous DBMS. He began using Oracle from Oracle version 7-Parallel Server 8.1.7 is now being managed.
Bernd Strohle Bernd has a master's degree in mathematics, up to now, has been working in the IT industry for nearly 25 years. He started in 1997 as an independent consultant working for IBM, was a member of QC Development Group. From the day-to-day work, and he understood that the major DBMS systems work-from the mainframe IMS DB to DB2 and Oracle's different platforms. He began using Oracle from Oracle version 6.0, working under the complicated environment, mainly banks and insurance companies in the Oracle data warehouse project.
2 outline
Analysts sends a clear message : Only three DBMS market competition from the winners of the past few years : Oracle, IBM DB2 and Microsoft SQL Server. MS SQL Server because of restrictions on the Windows platform, so the remaining competitors Oracle and IBM, fierce competition in the market is also very good proof of this point.
In June 2001, Oracle and IBM have released the latest version : Oracle DBMS and DB2 V7.2 overall database for Unix, Windows, OS/2 and Linux.
From a technical perspective on the new version of the database technology used for database professionals with their characteristics, functions and the achievement of system overview. After briefly described in the summary version of this paper from the following ten aspects to describe and compare these two products : performance, scalability, the management, availability, fault accident, backup and recovery, connectivity, security, standards, integration. Next, we will make a more detailed summary of the technical angle. However, in summing up our strengths and weaknesses, it is important to understand these differences are only caused by the difference is due to technical maturity, and may be beyond repair, or simply due to the different systems or concepts. Oracle and DB2 UDB mainly reflected in the different parallel system, query optimization functions and heterogeneous data integration strategies. On these aspects will be considered below.
From scalability, availability and fault accident perspective, Oracle and DB2 UDB is mainly embodied in their different parallel systems. Oracle support "shared disk" approach, similar to DB2 UDB for OS/390, DB2 UDB for UWO (and the realization of other DBMS) used the "non-sharing" solution. They resulted in the system is scalability and availability / fault accident in the area of the decisive factors most relevant difference. Because of the "non-sharing" has obvious advantages of scalability, and the "shared disk" seems to have a leading edge in usability.
From the point of view of performance, still has a leading-edge DB2. DB2 SQL optimization and the static is the realization of the concept has an obvious advantage over Oracle. Optimizer for DB2 applications to maintain full transparency, there is no need to optimize the "pointer" even allowed to use a "pointer" to optimize the device will need to be rewritten to receive inquiries. DB2 also provide a number of guides and other tools to simplify the performance of the adjustment. However, despite the new DB2 V7.2 has announced the results of benchmark tests, but so far we have not found any benchmark results can be compared with the 9i.
DBMS increasing the lead to the complex nature of the management of extremely efficient solution (DBMS its prospects for self-management), demand increases. In the previous version of DB2 has solved the problem, and further follow-up version of the 7 versions continue to strengthen. Oracle on this point a bit backward, but in 9i products to enhance its products.
Backup and restore are both rich and mature DBMS have the function of the fields.
IBM将 DB2 data sources are defined as any joint Gateway, whether internal or external data is stored in DB2. Connectivity is one of the features of DB2 UDB V7.2 is very convincing, and will be further strengthened. Although Oracle has a similar concept, but it can not be compared to the realization of the depth. DB2 is optimized for a particular integration of heterogeneous data sources, the difference between performance on this point very clearly.
DB2 is the concept of security in the exchange of signals, using the corresponding operating system and its user / group can be achieved. Oracle integrated solution without this characteristic. However, Oracle introduced a promising new concept for the Bank to achieve record levels of safety and security as an alternative view.
The standardization and integration, DB2 has a lot of advantages. Although Oracle support the latest SQL standard, but Oracle or optimization to achieve their purpose. For other functional integration (ie : BI, e-commerce, information, applications), but Oracle closed adopt an integrated approach on the "factory" for each component. IBM is the opposite strategy. IBM将 middleware providers to position itself in the position to encourage the creation of strategic alliances with other software providers. This method keeps the DB2 has recently become the first choice of many providers of standard software development platform.
In short, we get the following : Who is the victor in all aspects
Performance DB2 UDB V7.2
Scalability DB2 UDB V7.2
Easily managed DB2 UDB V7.2
Availability Oracle9i
Oracle9i fault accident
Backup and restore the beach;
Connectivity / DB2 UDB V7.2 Interoperability
Safety DB2 UDB V7.2
Meet the standards sexual DB2 UDB V7.2
Integration of DB2 UDB V7.2
3 areas
Oracle and IBM in June 2001 released the latest version of the DBMS : Oracle and DB2 V7.2 overall database for Unix, Windows, OS/2 and Linux.
From a technical perspective on database technology, is intended to provide a database administrator to assess the efficiency of the DBMS. Therefore, the report focused on the theme of scalability, availability, (autonomy) management, performance /VLDB field. Other themes, such as applications, business intelligence, data mining, e-commerce, will only provide an overview.
In this paper the authors of Oracle8i and have practical experience in the use of DB2 UDB V7.1, but Oracle and DB2 UDB V7.2 is a theoretical understanding of the increase. The comparison is not based on the actual benchmarks and testing of features and functionality from a theoretical comparison.
Here are sources of information, including the use of manual providers website, linked directly with providers and other relevant information on the Internet and DBMS.
The report was aimed at UNIX, NT and OS/2 platforms.
To be able to close two new DBMS version available for the dates of the files, and we will do our best to obtain the information in a very short period of time. Our goal is to provide accurate information to enable the reader to read the file efficiently.
Although a chapter specifically integrated, but there is one very important point, that is a very important aspect of the integration, e-business integration, not discussed in detail. To e-commerce integrated performance evaluation, application server and requires detailed information processing systems and products, as well as related standards (eg EJB). While we believe that this is very important, but it does not fall within the scope contained in this document.
Outlined four new features
IBM DB2 Database Version 7 overall 4.1
Background : DB2 product lines
DB2 product lines covered the handheld device from mainframe to a wide range of heterogeneous platforms.
. overall DB2 database for Unix, Windows, Linux and OS/2 (DB2 UDB for UWO) is divided into four editions :
N DB2 database overall personal version for the single-user mode (DB2 UDB PE)
N overall DB2 database version of the Working Group, a working group or department for the use and sharing of data (DB2 UDB WE)
N DB2 database whole enterprise edition, for the most from a single processor to the complex needs of large SMP configuration, and large databases (DB2 UDB EE)
N DB2 database whole enterprise version - extended version of the large-scale parallel processor (MPP), or clusters of large database environments (DB2 UDB EEE)
. DB2 for AS/400 overall database (DB2 UDB for AS/400)
. overall DB2 for OS/390 database (DB2 UDB for OS/390)
. Files & DB2 for VM
. handheld device operating environment for DB2 Everyplace.
As I have said earlier, this is the major DB2 UDB for UWO.
UNIX, Windows and OS/2 environment of the overall IBM DB2 database version 7.2
IBM's distribution strategy is the introduction of a major version every 18 months (that is, into Vx.1 Vx). Meanwhile, every three to four months, issued a FixPak amend the mistakes have been found, adding new functions to the engine. If the function has changed dramatically, a release issued IBM将 version (Vx.2), the digits after the decimal point plus one.
DB2 UDB 7.1 released in June 2000. DB2 UDB 7.2 released in June 2001, and from the database engine, it is the same with Version 7 FixPak three-engine But beyond all the increase (such as the new connector, warehouse manager for the improvement) is only provided in V7.2.
DB2 version 7 (7.1 and 7.2) are integrated :
. Integrated Business Intelligence functions
N Data Warehouse (Data Warehouse Center), the former "Visual Warehouse" integrated into DB2 Control Center (Control Center), providing a single user interface. It provides a built-in function to create, production, storage and maintenance of data warehouse and OLAP cube (cube).
N OLAP Starter Kit provides a core database engine integrated in the OLAP server functions.
N the new pre-defined Warehouse Management (Warehouse Manager) Connector expansion of SAP R/3, Guangxi University TradeMatrix applications such as BPI's visit. Other hits would flow of new data sources (clickstream) data, and OLE DB object to the introduction of MQSeries queue warehouse.
OMG now supports DB2 7.2 n the overall storage model (Common Warehouse Model, CWM)
. Integrated XML
N will be shown as a new XML data type to store
N XML will decomposition, different to the table in the store
. XML/SOAP/UDDI support on the Web
N DB2 data or stored in the form of Web services to provide
N visit to SQL data from the Web
. Integrated with IBM's MQSeries
N embedded SQL to access to or through marching into the function of MQSeries
N MQSeries as a source of data warehouse manager
N marching through MQSeries XML
N bundles together DB2 and MQSeries
. Integration with IBM DataJoiner common database
N visit all the data stored in the DB2 DBMS Series
N visit from other standard database support OLE DB data provider
N visit to Oracle, Sybase, Informix and MS SQL Server Data
N visit in the course of storage, heterogeneous data sources
. DB2 Life Sciences Data Link (Life Sciences Data Connect)
N transparent visit biotechnology data sources
. Extend DB2 Information Text (Text Information Extender)
N enhanced text file search function
. Integration with Windows 2000 Active Directory and Kerberos
However, the engine is not simply add the integrated function. Other aspects included :
. Stored Procedure
N support of the nest (nested) Stored Procedure
N follow the ANSI SQL99 standard, users can now create stored procedure, function and trigger "as a permanent storage module" - in DB2 as "SQL stored"
N Visual Basic support to the storage process
N use the same operating system in all the storage servers running process has been edited
. enhanced data management
N Identity out of the enhanced support, including tools LOAD
Will be limited to 32GB of log n
N external support preservation points (savepoint)
N renamed Table space
N AIX, HP-UX, and support for 64-bit Solaris-on Windows 2000 using AWE
N enhanced Unicode
N string data encryption and decryption
N Backup / restore function to enhance Done : log / Parallel restore / from the separation (split) mapping Backup / separation image processing / support named pipes / gradual and incremental backup / cross-platform backup and restore
N log archiving demand
N log catalog in full later, the blockade of business
N isolation grade language class
N the DB2 Everyplace products IBM将 its DBMS as the portable equipment such as PDA (Personal Digital Assistant) and HPC (with personal computers)
N UserID support more than eight characters
N combination of dynamic SQL
Trigger and SQL function of n variables and control flow
N Outline Key can be updated
The next version of DB2 UDB will include many improvements and enhanced, which is a major increase in the high availability (and plans to reduce the number of breakdowns accident), the management (reducing management), the performance and scalability (including large SMP and cluster environment) fields, and the application software development to provide better support.
Informix and IBM recently signed an agreement, IBM acquired Informix database business. IBM Informix's key technologies will be integrated into the next version of DB2.
4.2 Oracle9i
Oracle's product strategy is issued every 12 to 18 months a major version. The key in the PC version of the strategy followed by the naming of the field more common, it is no longer generally used in the version numbers, but using market version (version 8.1 into 8i, Oracle to reflect the focus on Internet). The next major version of Oracle 9i, which formerly known as Oracle 8.2.
Oracle 9i database server version is not the name, but around the core set of server software products supporting the family name. These products include :
. Oracle9i Application Server
. Oracle DBMS
. supporting Oracle9i software developers
Oracle9i the official announcement in June 2001 Oracle Open World, published in Europe, then immediately begun shipping. This report is just as DBMS products, it only considered the Oracle DBMS.
Oracle9i emphasized Oracle is the core of the Internet and e-commerce focus. It will strengthen Oracle's position in the key areas of services calculation. To confirm this, Oracle9i in the following areas : a new or enhanced functions
. enhanced usability
N Backup (stand) database support, such as initialization example, fault recovery, the main switching from each other, the log application delay.
N enhancing the complete re-organization and re-definition online system, and more complete online management actions, such as changing table or out in nature, will be moves to a new location, or branch, a table dynamic changes in the distribution of memory (SGA)
N block-oriented data in the table can be restored to restore the damaged pieces can be maintained while other forms of online block
After allowing damage to the point of adopting n Files (redo) was the acquisition and application
N inquiries grade history and the revocation of the functional use of the SQL version read more consistency
. Scalability and Performance Improvement
N enhance the transaction processing capacity of Oracle9i Real Application Clusters
N reduce the space occupied by each user, allowing more users
N careful optimization of the consumer group grades automatic resource management
N number of performance enhancement, such as prefetching, self-regulating direct I/O Virtual Adapter (Virtual Interface, VI), etc.
. enhance safety
N the three-strong security, including X.509 authentication and LDAP integration
N Based on the standard public-key system (PKI)
N meticulously detailed audit function
N enhanced user management and security strategy
N label data encryption and encryption (Label Security)
. Development Platform
N Enterprise Java engine (previously JServer)
XML type and n-th
N SQL enhanced support CASE example, the ANSI compatible connectivity, rolling vernier
N support all the SQL query syntax
O managed
N DBMS management revocation (undo) the Rollback Segment Table Space
N Dynamic Memory Management
N Oracle document management
N The phrase can resume operation
N There are several small pieces of a database
N restore support for automatic backup management
N Enterprise Manager (Enterprise Manager), a comprehensive Web-based management tool
. Integrated Windows 2000 (Active Directory, PKI, OLE DB providers)
. Business Intelligence
N complete integrated business intelligence platforms : ETL, OLAP analysis and personalized functions
N OLAP Server, Oracle OLAP calculation of the new engine
N support of external Table
N the engine core functions of ETL
N core functions of data mining engine (based on the Darwin)
. enhance e-commerce
N Advanced Queuing support XML and the Internet information transmission
N Gateway system and other specialized information, such as MQSeries, Tibco and MSMQ
N Improved Distributed Environment
. Globalization
N GB on Unix and the Unicode support
N support of the new format for dates and times
N Locale Builder can check and change the definition of the various regions and relevant data
. Internet content management
N storage, management and searching all kinds of content-documents, multimedia, e-mail :
N Joint content for Internet applications (Content Syndication)
N cooperation projects suited to the organization
N support various positions, and the mobile content
5 more
DBMS is not generally a relatively simple task, it is because :
. database functions is very extensive and complicated, time-consuming depth rather extreme
. The value of some properties only through practical experience and benchmark test before we can judge (the performance of)
O different because of the realization of the potential depth of the general philosophy and system methods and products, the characteristics resulting from the comparison very difficult
O detailed characteristics often difficult to compare directly
We must ensure that the work will affect the day-to-day caretakers of the 10 main areas. For each of these areas, and each gave a brief two products, systems and methods to achieve characteristics.
Next, a direct comparison of the two products, a clear difference between the two, similarities and strengths and weaknesses. However, we do not score any. Some of the characteristics described here are new, the need for baseline determination, and may need to mature further. We do not consider that a reasonable scoring model to encompass these areas.
This ten areas were described in separate chapters, based on their order of importance from the point of view of technical DBA topology structure. The important point is to realize the commercial and examples, this topology may be different. But, as Chapter III (author) mentioned in the paper is evaluated from the perspective of DBA technology. This also explains the paper that "integration" (paragraph 5.10), as the most important aspect, despite the many other occasions, this perspective may be the most important.
5.1 Performance
IBM Almaden Research Center under the Burce Lindsay's words, an effective database system, there are three key factors. They are performance, performance and performance. Although we believe that reliability, scalability, the management, use and function together constitute the second key factor, but performance is undoubtedly the most important database processing.
Performance is the measure of the efficiency of processing the database request. Database software applications require high performance to ensure their customer satisfaction. Data Warehouse users require high efficiency in an acceptable time frame to obtain the results of their inquiries complicated. In order to complete the application or database maintenance can not affect users, the database administrator needs of high performance. In this section, we discuss performance of the last one, it is more suitable for usability, we focused mainly on performance, because it is associated with the completion of data requests.
DB2 UDB V7.2
Performance is a core component of DB2 SQL compiler. It was received and confirmed the validity of SQL, SQL compiler will use advanced technology to receive numerous inquiries can better optimize the conversion of the equivalent format - query rewriting tools. In a joint operation (Operation Merging) (View merger, as well as other shared aggregation), DB2 through mergers, reducing the number of data for the operation. Operation-Transfer (Operatino Movement), query rewriting to reposition or remove function (DISTINCT operator to eliminate, the overall predicate pushdown, and eliminate associated) operation, to minimize the number of operations. Query Rewriting the last category is a major change predicate (Predicate Translation). In these technologies, add the implicit predicate, to take better connectivity strategy, and will be converted into OR IN predicate.
Optimization rewritten to receive inquiries and kept in use catalog (catalog), information (such as data distribution, binding, indexing), and system resources (such as CPU speed and available memory) to calculate the optimal access paths. To evaluate the feasibility of using a parallel mechanism, optimized for building part of subparagraph (subsection pieces SSP). SSP is a group of the operation can be executed in parallel. SSP costs (cost) has been used to determine the access path. DB2 always cost-based optimization; Inquiries can be used in accordance with all the resources to meet the candidates access path analysis, the final choice of the most effective path. DB2 is a large scanning, indexing strategy visit, predicate evaluation choice, and parallel connectivity technology.
From the beginning, in support of static DB2 SQL. In the preparation process, the SQL compiler calculated access paths, trails will be preserved. SQL for the future, will use the visit to advance the implementation of the road. Through this method to eliminate the overhead of dynamic SQL. Caching can also package (Package cache) to eliminate characteristics of dynamic SQL costs. When plots implementation of SQL, Access Path to read out from memory, and implementation. CLI, ODBC and JDBC programming model that is dynamic in nature. Use of DB2, you can use SQL Static Profiling will be converted into static and dynamic SQL. DB2 is a special tool so that you can capture application software running SQL. These remarks then were sent to the SQL compiler. CLI/ODBC/JDBC DB2 dynamic SQL call to identify and find the memory access path. DB2 so that you can use your favorite programming tool easy programming, you will also have static SQL performance.
Performance is a very important factor in the impact of parallel mechanisms. All DB2 SQL can be executed in parallel. Inquiries within parallel mechanisms (Intra-query parallelism) can be divided into a single database operation or the number of inquiries, some of these districts in a parallel implementation of the database. Sub-part system can be complicated their own, which means they can implement the same operation, but different parts of the data. SSP is based SMP parallel mechanism. EEE in the environment in which every district is part of the data. SSP can be used in each district, so that we can use the mechanism of MPP SMP parallel mechanism.
Use complex SQL data warehouse application can be called automatically summary sheet (automatic summary table) High characteristics. You can define a summary sheet, which contains a large facts (fact table), a summary of information from various angles. It could include connectivity, and accumulated a senior. SQL optimization can be identified in the request for a summary fact sheet information, the use of pre-calculated summary of the results table. CUBE or ROLLUP a function of making the senior one table DB2 can be used, rather than the use of multiple forms to obtain a summary of multidimensional information. Summary keep pace with the basic data, which can be used simultaneously REFRESH IMMEDIATE (always maintain a summary sheet with the foundation makes DB2 table synchronization), can also be used to optimize DEFERRED:DB2 orders will be based on a summary of all the information generated. So the fact that a large scale renewable only 12 summary sheet scanning data.
DB2 has global optimization function. In a number of joint database query (which deals with a number of database systems such as Oracle), DB2 data according to the location and optimization of the database system. DB2 will decomposition inquiries, and will minimize the cost to complete the work sent to the location, to consider factors such as the relative speed of the CPU, communication costs, and other system functions. DB2 data sources can be added to support functions. Global Optimization very thorough DB2, the database system to other inquiries will be better optimized, and the extent to DB2 database running inquiries, even more than in other local implementation of the system would be better query performance.
Oracle9i
Oracle9i addition to the standard cost-based optimization characteristics, it is also careful to optimize the query optimization that can dynamic collection system visit to the actual conditions in the calculation of the costs of customization. In addition, enhanced optimization will be more factors taken into account, such as the cost of CPU and network transmission costs, in order to provide the fastest response time. In support of all modern methods to enhance performance (for example, view the merger, predicate promotion lifting nested query, the use of multiple view rewriting inquiries), it will make more use of existing index. 9i introduced a new way of developing existing index, such as the use of the index jumped scan can not ignore where the conditions listed in the directory. In this technology, previously used now can be integrated into the index visit path. The Index types, such as allowing cross-indexing joint bitmap indexing table (or examples of joint) (bitmap is the foreign key value creation cited in the other table) can now implement high-performance business rules. Oracle permanent and dynamic bitmap indexing support for the use of this type of indexing. The poor performance in adjusting SQL, managers would like to visit historical path availability, which shows the path to a visit to the accurate implementation of the road language, and to provide all information in SQLTRACE.
Apart from the scope and hash zoning (combination of the two together as district), Oracle introduced a new zoning, called the list of district, it allows for a certain area (such as AK) Outline data, or inconsistent with the scope of district (for example, TX, NM, AZ, CA).
Will be inserted into the data in the table, insert multiple (based on the standard definition of a phrase select all the records would be inserted into various forms) to collect data only once, thereby saving the developer of the building, avoid unnecessary development, and overall performance.
Although examples of View (materialized views) can save the query time, but sometimes renewable time-consuming. In 9i, the introduction of incremental renewable function, and the balance of such consideration. View examples of indexes can be added to further accelerate the performance of inquiries. The use of optimized query rewriting functions stored in multiple view the results of the request was to speed up access to data, the plots to avoid the high cost of connectivity or polymerization.
Data collection itself not only with the performance-related inquiries, data storage area (CUBE and ROLLUP, and other RANK) analysis function will also help to reduce the time final results, which will be completed before the client is most suitable for the work sent to the server to accomplish the task.
The query processing-intensive packet can be translated to the local high-performance code, as this is a step toward getting high-speed response.
Prior to distinguish have records (updated) and the new record (insert key to the main conflict would not happen) to distinguish between the need for two-step operation, the new Merge operator will be able to fulfill this function in one step.
In order to implement the chosen plan, Oracle can access path storage, and storage complex with the outline to ensure stable performance.
Conclusion
Database performance is an attribute of the two providers are serious about this characteristic. The wide range of properties. Database performance because of the demand and use of the great difference in the conclusions should avoid empty. Under such circumstances, in some scenes (scenario), the component of performance comparison.
Essential for the performance of the index. Oracle owns many types of index-the expectations index chosen on the basis of the type of treatment, if treatment patterns change, the index could become a drag on performance. DB2 only have an index type-it can also create dynamic query execution necessary Bitmap and hash links (hash-join) Index.
Online, and the affairs of occasions, the need to quickly generate a SQL Result Set (often relatively small). Index and the buffer is a major component. DB2 and Oracle are providing the corresponding technology, a good performance. DB2 support for a long-term static SQL, with a slight advantage.
The data warehouse performance and transaction processing system is the opposite. For data warehouse or data center usually require complicated SQL scan, search and relatively large amount of data, and return the results enormous collection. Some of the findings can be automatically calculated and set in a transparent manner DB2 (automatic summary sheet-5 from the version provided) and Oracle (multiple view - which was first introduced in Oracle8i) use. Data Warehouse for the visit inquiries can be very complicated. Inquiries can be generated statements tools manual optimization. So the cost is based on the key outstanding performance optimization, because many potential access paths, but also to take into account parallel mechanism. Although Oracle in its Query Optimizer integration of a cost-based model, a major step forward in this regard, but still has an advantage of DB2. In addition, DB2 Static Profiling also made better use of the performance characteristics that can be automatically static dynamic SQL to SQL.
DB2的这一出色的优化器功能,使它在事务型和数据仓库环境中都领先。
5.2 可扩展性
可扩展性指的是DBMS在不同的硬件平台上,从手持设备到具有TB级数据和数千用户,无需应用重新设计或其它根本上的变化就能提供可相比较的服务的能力。可扩展性也包括在给定环境中根据构建者的业务需要进行扩展的灵活性等级。
DB2 UDB V7.2
DB2 产品系列涵盖了异构平台,从手持设备到大型主机。家族成员并不总是采用相同的代码,以便能够利用各种平台的特性更好地运行。尽管在在特性的提供方面有所差异,但是共同的特性一般相同,确保移植性。IBM的战略是根据客户的优先级实现特性,这些优先级在不同的平台上可能是不同的,从而导致针对每种代码具有不同的实施计划。有关产品家族成员的更为相信的信息,参看“前言:DB2产品系列”一章。
本文所关注的是DB2 UDB for UWO V7.2。在中型平台上,扩展所面临的一个主要问题是能够面对伴随OLTP和电子商务类型应用的数据仓库所提出的挑战。DB2 UDB 企业扩展版(即EEE)被认为是UWO系列中的“扩展型”,主要支持MPP,但也支持SMP和Numa。DB2 UDB企业版(即EE)支持SMP体系。
DB2 UDB EEE在SMP、Numa以及MPP上扩展。对它很多的研究成果被用于增强引擎本身,而且所有的操作或多或少是并行完成的。这并不是仅仅针对select操作,而且所有的insert、update和delete以及命令和实用工具也都是并行完成的。
DB2 UDB EEE在不同硬件体系上的扩展性的关键是数据库在一个非共享的环境中被分解为独立的分区。在一个非共享的群集中,每个分区都具有自己的资源,例如内存,CPU和磁盘。分区可以存在于SMP内,Numa内,以及群集内的服务器中。DB2 UDB EEE为一个群集添加节点的数量限制在1000个节点之内。
数据将通过散列分布到分区内。添加新的分区将通过数据重新分布来处理。分布是通过一个非常有效的散列的方法完成的 – 比关键范围查找方法更为有效。
除了在DB2 UDB EEE内的分区内提供系统之间的并行机制之外,DB2还在每个数据库分区内提供系统内并行机制。
当分区是在两个系统中间建立时,它们被认为是物理分区,通讯和数据传输是通过高速通讯链接(可以是RS/6000高性能交换机,共享内存通讯或基于VI的设备)完成的。当分区是在一个SMP环境中建立时,分区被认为是逻辑分区,通讯和数据传输是通过共享内存完成的。尽管其中涉及到多个DB2实例,但它们被看作是一个单一的数据库,它们共享相同的DB2编目。
为了在OLTP环境中支持大量的用户,DB2提供连接池、本地旁路和负载均衡功能。
DB2能够很好扩展的必要条件(也是关键的研究成果),是查询优化器。它可以逐个分析所有可能的检索方法,以便提供最快的答案。另一个关键领域是大规模的分析:引擎具有内置的、复杂的可以并行执行的SQL OLAP扩展以及通过自动摘要表提供的内置的聚合。
基准,例如TPC-C(OLTP)和TPC-H(Ad-Hoc Query),显示了DB2在扩展性方面的能力。在MPP和NUMA环境中,可以提供95%的扩展比,在SMP环境中,经SUN在64 CPU E1000上的测量,可达到90%的扩展性(详细信息参见www.tpc.org)。
Oracle9i
Oracle9i支持从手持设备到超级计算机的扩展。这是因为,根据Oracle的说法,除Oracle Mobile for handhelds之外(因为它的规模要小),所有的产品在所有的操作系统上和所有的家族成员中(从标准版,到企业版,到Real Application Cluster – 以前称为Oracle 并行服务器)都使用相同的基础代码。共同的代码使得Oracle可以在所有平台上提供近乎相同的功能,使得开发者可以将他们的应用缩放到适用于任何OS平台,而且不必进行应用的重新设计。一般说来,在实施一个多平台战略时,您可以使用Oracle的所有特性。采用共同的代码的另一个优势是可以在很短的时间内在最具吸引力的硬件平台上提供产品。
Oracle9i缩减了每个用户所占用的空间,从而可以在相同的硬件上,尤其是咱大型系统中可以提供更令人满意的响应时间。
为了实现这种扩展性,Oracle并行处理的实现与数据的分发无关(有时也称为数据分区分布)。这就意味着所有的实例都通过一个分布式锁管理器来访问所有的数据和同步数据的变化,从而可以无需应用分区即可透明扩展。因为所有的处理器都可以访问在共享磁盘环境中的所有数据,每个处理器都可以用来运行一个查询从进程。此外,对行或语句缓存的共同访问可以加速系统的访问,这是因为可以复用已经被另外一个资源(处理器或磁盘)完成的工作,避免了不必要的浪费资源。在使用来自不同应用分区的数据时,这种方法尤其有效。在DML的读写操作中都可以使用并行机制。此外,Oracle可以并行化DDL语句,例如CREATE TABLE表或CREATE INDEX。
在Oracle9i中,Oracle发布了第二代的“缓存融合(cache fusion)”,即Real Application Cluster(RAC)。RAC的目标是使得DBMS可以在多个节点之间扩展,这一特性往往不能被Oracle共享磁盘体系提供。RAC依赖于与操作系统相关的群件(Cluster Manager和进程间通讯),对于UNIX操纵系统,由OS-vendor提供,对于Windows NT和Windows 2000,由Oracle和Oracle OSD群件提供。群件中节点数量的限制取决于所使用的群件,当前在大多数情况下不超过8个节点。不幸的是,当前只针对Compaq Alpha和Compaq Linux具有一个认证 – 当前还没有公布其它的认证。
在RAC环境中,Oracle随附了共享磁盘体系。这一体系允许访问来自群集中每个节点的数据 – 无需为了优化性能而复制或重新配置数据。RAC的运行带有这一方式所固有的弱点 – 基于磁盘的并行控制 – 通过全局缓存服务和全局队列服务。这些服务放置在每个节点的内存中,可以通过消息进行进程间的通讯。
Oracle建议针对RAC仔细调整数据库和应用设计,以便达到最佳性能。这就意味着在向群集中添加节点的时候建议重新检查设计。
Oracle9i还引入了一个经过改善的动态内存的特性,它允许数据库引擎动态为进行分配内存,无需DBA的干涉。Oracle对行级锁的实现不会将锁升级到其它等级(块,表),配合多版本读取模型,可以支持扩展性,因为与重写无关的读进程将不会阻塞一个写进程。
结论
共享磁盘和非共享群集是多年来数据库行业的两个主要分支,但是电子贸易的工作负荷现在推动着这些机构主要针对扩展性进行设计。数据库提供商发展的趋势是向着非共享设计发展。只有Oracle和DB2 for OS390采用磁盘共享体系,但IBM解决了共享磁盘的扩展性问题,在专用的硬件中实现了全局锁和共享内存磁盘缓存,即Sysplex Coupling Facility。
围绕这两种体系的讨论的结果是:非共享提供了近乎无限的扩展性,如果数据库具有合理的设计的话。系统的配置和管理需要付出更多的努力。共享磁盘的一个特性是具有高可用性,但当扩展到超过8个群集节点时就会出现限制。
Oracle在9i中利用第二代的“缓存融合(cache fusion)”- Real Application Cluster来对抗这些劣势。这一体系具有与IBM的DB2 UDB for OS/390类似的特性,但是由于平台具体的实现,DB2 UDB for OS/390可以利用专用的硬件特性。利用的Oracle的RAC,会出现添加节点的限制 – 现在在大多数操作系统中是不能超过8个节点(DB2 UDB EEE限制在1000个节点)。当前,还没有提供一个在超过8个节点的环境中进行的基准测试 – 实际上没有基准、客户参考以及其它论据能证明Oracle9i在超过2个节点的环境中运行。因此,还需要确定这一实现是否能够成功地满足需求。
对于DB2 UDB EEE的“非共享”,不能太刻板地看待。也有一些部件需要在节点之间共享(或是复制):编目,主目录。为了能够在OLTP环境中提供最佳的扩展性,需要使用协调配置(collocation)和复制等概念来在所有的分区上复制数据。对大量用户的支持在两种系统上都类似 – 每个用户占用的空间缩小,特殊的软件部件部件减少了连接的数量,而且可以进行节点负载均衡。
可扩展性往往是通过基准来测量的,例如TPC – 基准。这些基准对DB2 的评测是90%(SMP扩展性)到95%(MPP扩展性)。针对Oracle的SAP基准证明了在SMP环境中的可扩展性(对于1到2个CPU是90%;从32个到64个CPU是86%),针对Oracle的MPP基准现在没有提供。
总之,我们看到DB2是扩展性方面的胜出者。它面向MPP的方法对于未来需要高扩展性的应用来说将更具价值。DB2已经展现了它在多节点环境中的经验和实力。Oracle所采用的改进磁盘共享体系以便减少劣势的方法有扩展的潜力。它进入多节点环境中的脚步应该是谨慎的乐观,它在引擎中集成了众多新的技术 – 这些技术DB2已经使用多年了(例如虚拟接口)。
5.3 易管理性
易管理性是根据数据库管理员和数据库本身之间的联系点的必要性来定义的。它可以根据DBA用来启动数据库、使其运行和保持合理性能所需的交互的数量(包括时间和复杂性等因素)的多少来衡量。
一方面,您有一些系统管理任务,包括数据库产品的安装和数据库的配置。在正常的工作流程中,DBA将定义数据库对象并将应用与数据库绑定。在应用启动并运行之后,DBA必须进行数据库的维护,并监视资源的耗用,以便获得可接受的性能。
DB2 UDB V7.2
IBM重点加强了最近发行的DB2中的易管理性。IBM认识到不是每家企业都拥有高度熟练的DBA来管理数据库并进行最优配置,IBM从两个方面来解决这个问题。DB2 包括了众多的向导、图形对话框,指导管理员完成各项工作。另一方面,IBM提高了DB2的自管理功能,不再需要DBA的干预。
开始使用DB2的最简单的方式是通过称为“控制中心”的图形用户接口。在这个接口中,您可以列出所有的数据库对象,对它们进行管理操作。它还是其它一些可视化工具的进入点。在命令中心和脚本中心,您可以输入命令和脚本,安排执行的时间,并可以监视它们的进度和结果。
数据库的配置是一件让人畏惧的工作。除了120独个注册项变量之外,还有88个数据库管理员参数和60个数据库参数。DB2利用性能配置智能向导(Performance Configuration SMART Guide),使您可以针对你的工作特性配置这些参数,获取最佳性能。您还可以在数据库定义完成并开始工作之后使用向导来交互更改参数。
索引顾问使用DB2强大的优化器来提出最佳索引建议。您可以为顾问提供一个工作负荷、SQL查询和它们的使用频率。工作负荷的来源可以是DB2自动捕捉的实际的语句,也可以是您定义的工作。DB2将把工作传递到查询优化器。最后,DB2将确定出针对这一负荷最佳的索引方法。
还有其它一些向导来帮助最终用户创建数据库对象,包括数据库,表空间和表。DBA可以利用这些向导来建立与MQSeries和OLE DB的连接。备份和恢复是DBA的一项必备工作,利用向导,这一工作将变得更为简单。利用这一向导,您可以创建并安排(schedule)备份。当需要进行恢复的时候,DB2将再次利用恢复向导帮助您恢复数据。
DBA任务的很大一部分是查询优化和性能调整。这两项工作的难度最高,也最耗时间。性能配置智能向导和索引向导能在许多问题出现之前将它们消除。您可以用查询巡视器(Query Patroller)来监视并更改有问题的SQL的执行。如果一个查询占用了太多的资源,您可以指定这个查询突然中断,或是为它分配较少的资源(延长执行的时间,但要为并行的查询释放资源)。但是,查询优化和性能调整的最佳方式是在运行时进行:最有价值的工具是优化器,它提供足够的功能来构建性能和资源最优访问路径。DB2配备了这样一个先进的优化器,更为重要的是,它的查询重写功能可以解决潜在的查询性能问题,在运行时重写查询。
作为DBA,一旦发现了有问题的查询,您可以使用可视化的解释工具来检查所选择的访问路径。DB2为您提供了广泛的确定访问路径的信息。在这个工具中,您可以发现DB2利用的统计数据是否反应了实际的数据。您也可以使用可视化解释工具来发现其它替代查询,并确定它们的成本。
查询巡视器只是帮助您监视数据库活动的众多工具中的一个。DB2内置了广泛的监视工具。查询巡视器还可以进行工作负荷管理,支持队列化用户的请求并复用现有的查询结果。事件监视器具有一个GUI界面,使DBA可以快速发现瓶颈和热点。利用监视工具,DBA可以设定数据库性能的所有方面的阈值,包括排序,锁定,死锁,内存,磁盘性能,和查询。当一个事件发生或是一个计数器达到阈值之后,DB2将作出反应。DB2响应的方式有多种,在报警中心中添加一条记录,或是启动一个程序或脚本(它们可以向DBA发送电子邮件),或是弹出一个窗口来提示用户。在Windows中,DB2完全支持Windows管理控制台(Windows Management Console)。
DBA的一项讨厌的工作是维护数据的物理组织。您的应用如果利用未经组织的数据,应用的性能可能会下降。reorg实用工具可以组织物理数据,以便进行有效的访问。但是何时才需要进行重新组织呢?reorgchk(重新组织检查)工具可以确定这一需求。它从DB2编目中读取当前的统计数据,或是它将收集统计数据。拥有当前的统计数据对于DB2来说很重要。没有精确的统计,优化器的运行将没有指导,可能无法确定最佳路径。您可以利用runstats命令来引导DB2刷新统计数据。
对于加载以及重新组织等一般需要长时间运行的任务,DB2支持重启功能。如果在加载数据的时候出现故障,您可以从最近的一致性点重启加载操作(利用RESTART选项)。对于重新组织工具,重启是隐含的,因为它将根据在故障发生之前完成的工作自动确定是撤销还是完成。
DB2自动均衡索引,这就意味着无需手动重新组织索引。DB2发现何时索引页面由于删除变得近乎空,并将把页面合并在一起。利用这种方式,您将不会拥有会降低性能的稀疏的索引。致命的磁盘问题对于索引来说未必是致命的。硬件的故障造成索引无效时,DB2会自动恢复。如果数据仍然可用,DB2将自动重新创建索引。
DBA的另一个头痛的任务是用户验证。DB2完全支持操作系统验证策略。在操作系统一级上,您可以定义组,并将用户分配到组。在DB2中,您可以为组授予权限。这将最小化数据库中用户管理的数量。
一个经验不算丰富的DBA将会快乐享有DB2提供的工具。所有管理数据库的重要方面都利用向导和可视化工具提供支持。这些向导消除了猜测,明确给出改进性能的建议。只要出现问题,监视工具就会立刻检测出来并予以显示。有经验的DBA将会享用可以实现的自动化操作。
Oracle9i
最佳的易管理特性是完全消除人工的干预,将控制权完全交给RDBMS。Oracle9i通过自动化先前需要人为干预的任务来满足此方面的需要,例如引入自管理的会滚或内存分段。
对于仍然需要DBA干预的问题,Oracle提供了一个中央图形化控制台来管理数据库:企业控制器(OEM)。OEM为管理员提供了一个集成的、高信息量、可定制的针对所有实例的所有方面的视图,并集成了向导来指导有些疑问的DBA完成复杂的任务,例如内存调整或容量评测和规划。永久性的init.ora特性允许OEM助理调整数据库,并永久保存结果。Oracle的备份和恢复功能已经增强,提供了扩展的报表功能(集成在OEM中),并支持恢复窗口,恢复窗口能够保持备份直到不再需要,然后释放空间。
为了不至于使信息淹没DBA的注意力,9i允许DBA定义实时监视的时间或阈值,当某些参数超出它的平均范围之后将触发。事件也转发到SNMP控制台。Oracle的用户定义角色模型可以在不同的人员之间分隔监视任务,不必使个人立即监视整个系统。为了提供完整的管理,其它服务,例如9i应用服务器也集成到OEM中。
尽管预防要好于治疗,但有时事情并不像它们所规划的方式工作。在这种情况下Oracle帮助管理员利用“可恢复运行的语句”来帮助管理员:这使得DBA可以维修故障的原因,然后从中断点恢复工作,这样就不必重复已经完成的工作,从而节省了时间。“Oracle管理的文件”进一步减少了管理员要在数据库之外做维护性工作的需要,它可以删除或移动文件。
尽管仍然需要DBA彻底了解他们的工作,但Oracle已经支持这一任务,在OEM中提供了工具来进行有指导性的专家级诊断和解决问题。另外,变动所带来的影响可以提前查看,例如虚拟索引向导允许在实际构建之前测试在SQL语句中的一个潜在的新的索引所带来的影响。为了为客户提供最佳解决方案,Oracle集成了外部工具,例如EMC的存储管理套件。
小结
要比较所提供的大范围的特性的确比较困难。在一些领域中,DB2拥有独有的特性,而在其它领域中Oracle提供无可比拟的功能。
DB2的管理性的强项在于能够调整并监视性能。性能智能向导,监管器和查询巡视器允许方便地进行性能优化,为数据库的活动提供了一个宽广的视图,并允许自动化管理、调整和纠错活动。
DB2的其它优势还包括索引管理(自动索引均衡),用户管理(操作系统级的用户验证)和精心安排的事件处理。
在9i中,Oracle引入了众多的工具来最小化与DB2在前面提到的领域中的差距:“Oracle管理的文件”,“在一个数据库中存在多种块大小”,“动态内存管理”,“基于Web的管理工具”,这些技术DB2已经使用多年了。他们如何来挑战DB2的优势需要在实际使用中确定。
Oracle9的一个独有的特性是“可恢复运行的语句”,这一特性允许DBA维修导致出现问题的原因,然后从中断点恢复应用工作,由于没有重复已经完成的工作,所以节省了时间。
综合考虑所有的优势和劣势,DB2 仍然在易管理解决方案方面领先。易管理性在以前版本的DB2中就已经得到体现,版本7又对它进行了加强。Oracle利用9i中的许多新的特性,在尽力缩小差距。
5.4 可用性
可用性必须从最终用户的角度来衡量。最终用户不了解(或不关心)在他们的数据不可用时找出一个整体解决方案中的复杂部件。
在本章中,我们将可用性定义为应用或服务提供最终用户所期望的功能的程度。它与任何必须的管理性工作最相关,例如索引的创建或表的重组织,这些工作将会导致停机时间,至少会有引起中断的可能。
可用性的另一方面 – 从管理意外中断来讲,就是意外故障,这可能是因为硬件故障、灾难等造成的 – 将在5.5章“意外故障”中讨论。
DB2 UDB V7.2
可用性的高低可部分地根据对重组的需要来衡量。在物理数据库中采用的参数会影响到对重新组织的需要。在创建表时,空余空间的百分比以及分配聚簇索引等选项将会帮助减少执行数据和索引重新组织的需要。
DB2 UDB for UWO现在还不支持在线重新组织数据(在下一个版本将具有这项功能)。在下一个版本之前,当数据需要重新组织时,表需要离线。但是对于索引,可以在线连续进行重新组织。
为索引页面的最大剩余空间提供一个用户可以定义的阈值,以此提供在线重新组织。当从一个页面中删除一个索引键时而超过阈值时,相邻的索引页面将被检查两个页面是否可以合并。
为了能使得数据管理过程更为有效,只在需要时进行重新组织,可以使用REORGCHK工具,它可以分析哪些表和索引会从重新组织中受益。
对于加载以及重新组织等一般需要长时间运行的任务,支持重启功能。如果在加载数据的时候出现故障,您可以从最近的一致性点重启加载操作(利用RESTART选项)。对于重组工具,重启是隐含的,因为它将根据在故障发生之前完成的工作自动确定是撤销还是完成。
更改配置参数需要考虑两个方面的问题。首先是改变配置参数不引起重大的故障,其次是这种变化是否可以在线产生效果(即不必停止和启动数据库或实例)。当前大多数配置参数可以在线改动,但直到数据库或实例停止并重启后才能有效。但是,这一领域随着DB2的发展正在进一步发展。DB2的一个特性是可以根据需要,简单地扩展和压缩在线日志的容量,尽管这一操作需要停止并启动数据库。
为了缩短计划内或意外停机之后的重启时间,DB2提供了DBA可以调节的检查点窗口。
备份工具可以在分离(split)的映象上在线和离线运行,不会影响到主数据库服务器的性能。在数据库级上恢复时,数据库不能提供服务 – 表空间级的恢复可以让其它表空间在线。总之,DB2提供了众多成熟的工具,它们都可以并行执行,减少了影响可用性的时间窗口。
Oracle 9i
Oracle9i特性支持众多可用性特性,从意外关机后的自动重启到群集环境中的一个节点出现实例故障时透明的应用故障恢复。
为了防止意外中断,Oracle9i已经接近了解决问题,因为模式(schema)变化(例如模式变更或索引创建) - 直到现在没有在线提供 – 可以在线执行,同时最终用户可以对表进行更新。Oracle声明,因为它所采用的体系结构,甚至不需要重新组织表。另一个可以达到高可用性目标的方面是可恢复运行的语句,这种方式允许DBA修正错误的来源(例如,通过向表空间添加磁盘),然后从故障点开始恢复被中止的语句的运行。
即使在出现错误时,在限定区域内的故障块也可以由DBA在线恢复,这使得用户可以不间断地使用在同一个表中的未受影响的区域内的数据。
为了在计划内或意外停机之后恢复服务的可用性,Oracle提供提示来帮助定义最大恢复时间段,直到服务再次在线。恢复过程中可以利用并行机制来最小化停机时间。
对于Oracle9i来说,内存参数的重新配置,例如大小或是SGA的布置,现在可以在线进行重新配置,无需重启即可立即生效。
即使是复杂的挑战,例如数据库/操作系统软件的联合升级,可以(需具有必须的环境)在不提供服务的情况下通过滚动升级来完成。这样,就可以方便地与待用数据库切换使用,并可以在群集内部实现故障恢复(已经针对所有的Oracle调用接口进行了测试:OCI/ODBC/JDBC/其它)。
在可用性方面,多版本读取模型支持不加锁读取,因此更新事务不会收到读取动作的影响 – 这对于具有永久实施的数据仓库来说很重要。
负载均衡确保因为资源的竞争不提供服务。
结论
两种DBMS都在挑战24*365的可用性。Oracle现在看来离这个目标更近一些。
这里最相关的问题是在线模式变化,即向表中添加或删除,或是创建索引。DB2支持在线索引创建,以及“Alter Table”功能。但是,“Alter Table”时,所影响的的表被排斥锁定。在Oracle中,模式的变化没有利用排斥锁,因为它采用的多版本读取模型。
在Oracle9i中,将高耗费的SQL语句标志为可恢复运行,使得系统管理员可以在执行过程中出现问题时能作出反应。语句将从故障发生时的点重启。DB2具有类似的概念,例如恢复和重新组织,但不针对更新或插入语句。
意外停机的时间潜在地被缩短,因为将恢复过程更加细化:Oracle9i在块级上恢复;DB2的细化是在表空间级上进行的。
Oracle9i的另一个优势是重新配置内存参数,这种配置将会无需重启即可立即生效。而在DB2中数据库需要重新启动。
5.3 意外故障
意外故障这一特性必须从两个不同的领域来检查。第一个也是最重要的一个是消除“单点故障”,确保数据库的连续可用性。第二个方面是一旦出现问题快速恢复。如果需要进行完整的恢复,不管故障的严重程度如何,都可以使用术语“灾难恢复”。对于绝对关键的事务服务,即解决方案跨越大的地理区域,对于地震等类似的灾难也可以进行恢复。
DB2 UDB V7.2
DB2利用了特定平台的故障接管战略。例如,当DB2运行在Windows NT和2000上时,将使用Microsoft Cluster Server(MSCS),作为故障恢复和共同接管的基础。在AIX上,利用的时HACMP(高可用性群集多处理)。在Sun Solaris,这个功能与Sun solstice和Verita集成,对于Linux,它将通过SteelEye提供,在HP-UX上,通过ServiceGuard支持这一功能。
HACMP的主要目的是消除单点故障。DB2对于本特性提供两种版本。标准版通常与AIX操作系统打包在一起,其目的主要是解决SP节点、电力资源、网络适配器、网络、磁盘适配器和磁盘等的资源。
更为先进的选择是HACMP ES(增强扩展性)。除了标准特性之外,它支持更大的HACMP群集,其扩展性可达每个群集16个节点。对于其它的故障,如果需要的话,可以通过用户定义的事件,包括事件前和事件后,都可以添加到标准故障恢复过程中。基本上使得HACMP简便地进行扩展,满足单独的需求。它还包括客户监视和检测状态变化的工具。
在规划阶段需要考虑的一件事情是需要开发的HACMP的等级。有些情况下,在DB2 UDB EEE配置实例时,只要涵盖了DB2编目节点,解决编目的单点故障就足够了。但在有的情况下,所有的节点都用于分区数据,我们可以认为每个分区都可能出现单点故障,单个数据库节点的影响可能会导致整个数据库停止工作。因此,在这种情况下,在使用HACMP配置可能出现的接管时需要包括所有的数据库节点。
故障恢复过程包括三个主要的动作,这些动作通常自动完成:
1. 错误检测
2. 将磁盘拥有权切换到故障恢复节点
3. 在故障恢复节点上重启DBMS
节点再次启动所使用的时间取决于必须要配置的多个属性:错误检测的频率,检查点频率,原始或操作系统文件。这些属性的配置将需要根据应用的目的来配置 – 有时考虑的是可用性,有时考虑的是性能。针对可用性进行的配置将会加速故障恢复的进程,不到1分钟即可完成。
在另外一些高可用性的场合中,DB2可能需要与一个分立的镜像一起使用,存储解决方案提供的分立镜像是作为备用数据库。
通过挂起对主数据库的I/O写,可以以I/O一致的方式将镜像与主系统分离开。在恢复对主数据库的I/O写之后,镜像数据库现在可以连接到另一个实例,并进行前向滚动。通过从主数据库中连续拷贝数据库日志,并前向滚动到镜像日志的末尾,就可以以事务一致的方式保持数据库的内容最新。
OS/390面向高可用性设计,DB2 for OS/390必须追求连续可用性(超过99.99%)。DB2 for OS/390使用“共享磁盘”的方法,并结合使用特别设计的硬件部件。
Oracle9i
高可用性不仅仅是在软件或应用的基础上进行。因此Oracle 紧密地与硬件和操作系统提供商的不同产品集成。群集解决方案来自多个供应商,在硬件出现故障时进行故障恢复,Oracle是位于这些操作系统之上的一个应用。对于没有提供足够功能(或者说到现在还没有提供)的场合,例如NT平台,Oracle提供了自己的解决方案,从而具有与其它平台类似的产品。Oracle Fail Safe on NT就是这样的一个例子,它对一个空闲的节点提供一个冷的故障恢复。不幸的是,现在只存在对于Compaq Alpha和Compaq Linux的Real Application Cluseter认证。
在Oracle的Real Application Cluster体系中,许多实例共享访问一个数据库,其优势就是避免了单点故障。当然,数据文件只有一个,需要通过硬件或操作系统镜像防止数据损失(例如RAID解决方案)。Oracle还支持来自多个提供商的允许分立镜像的解决方案,例如EMC2。此外,Oracle可以进一步镜像重要的文件,例如控制文件或在线和打包的重做日志,增加更多的保护,或是为没有提供这样功能的平台提供这样的功能。
在Oracle的高可用性模型中,某些服务或节点可能出现故障,但是(与Internet不同)只要一个节点还可用,就可以访问服务,并能够访问所有的数据。当然,性能会受到影响,因为原有分布在不同实例上的工作负载现在完全在一个节点上。利用透明应用故障恢复,Oracle甚至可以使得实例故障完全对最终用户透明,所有在故障发生时正在进行的查询都将自动重新运行。不同的查询的结果集的状态被保留,已经返回到调用应用的行记录将从新的结果集中删除。
为了保护没有使用群集环境的较小的解决方案,或是防止地理上分布到各地的解决方案遭受重大的灾难的危害,Oracle提供了一个备用的数据库解决方案。这是一个位于一台独立的机器上的第二个数据库,它始终处于备用状态,并自动接收所有主数据库的变化,进行保护。这个数据库可以与主数据库不同,例如可以采用不同的OS和不同的硬件平台以及不同的Oracle版本。同步的频率可以设定为从零数据损失到每5分钟或每小时同步一次。在检测到主服务器出现故障之后,备用数据库自动接管服务,并响应服务请求。同时对主服务器进行维修,并在重启主服务器之后,服务将轻松切换到主服务器上。逻辑备用服务器(相对于物理备用数据库)通过从日志中得到的SQL语句进行同步,而不是仅仅处理日志,因此它可以进行读写。这就意味着这个数据库可以用于决策支持等任务,并可以拥有实例化的视图和针对决策优化的主数据库的表索引。这使得客户可以最有效地利用没有使用的硬件。
结论
非共享支持近乎无限的可扩展性,高可用性是磁盘共享方法的优势。
在磁盘共享环境中,故障恢复无需切换磁盘拥有权。这使得故障的恢复更简单,更可靠,更自动化。从理论上说来,Oracle的解决方案自动处理故障恢复,并在故障切换到另一个节点成功结束之后利用重新调用事务和SQL语句来保持对用户透明。
在非共享的环境中,故障恢复较为复杂。DB2也提供了一个具有良好优势的解决方案 – 但故障恢复持续的时间要比Oracle的故障恢复时间长。
Oracle是这一领域的胜出者。IBM的答案是可以提供99.999%的可用性的是DB2 UDB for OS/390 - 这种DBMS采用共享磁盘方法,并得到专门设计的硬件部件的支持。
5.6 备份和恢复
随着数据库逐渐增大,对连续数据库服务器可用的需求的提高,用于进行备份和恢复的时间段却变得越来越少。因此,即便是在非关键事务的环境中,也几乎不选择完全关闭数据进行离线完全备份 – 这就需要增强的在线备份和恢复功能。
“实际”的VLDB,数据库仓库,他们变得更具“操作性”,向基于OLTP的应用反馈数据,对于它们来说,备份和恢复功能就更为重要了。对于许多大型组织来说,确保数据仓库的可用性越来越成为关键事务。
DB2 UDB V7.2
当打开连续日志时,DB2能够进行在表空间一级上进行在线备份和恢复(在恢复一个表空间时,另一个表空间可以保持在线;表空间的属性在恢复的过程中将发生变化)。新的日志数据集将被连续创建。因此需要具有一些日志归档过程。DB2的一个优势是日志的配置可以随时更改,而且DB2用必要的动作来保证可以根据所作出的变化来恢复数据库。为了纠正用户的错误,DB2能够在前滚时跳过某些语句(例如删除表 - drop table)。
缺省状态下,DB2采用环形日志方式,将一些日志数据集分配到数据库中,并且DB2将环形使用这些日志。这将使得DB2可以进行灾难恢复(即在发生故障时撤销未提交的事务的更新),并支持应用程序所提出的事务会滚的请求。在这种模式下,备份和恢复工具只能在数据库级上进行,而且数据库必须离线。
DB2能够从磁盘,磁带,命名管道(UNIX),Tivoli存储管理器(TSM)或其它提供商的产品中恢复。
为了防止意外删除数据库的活动日志或由于硬件导致的数据毁坏,可以通过打开双日志模式,将活动日志文件镜像到不同的物理磁盘上。
现在提供的存储解决方案增强了数据的可用性,允许分立镜像拷贝数据,并使镜像拷贝提供给其它类型的处理或是提供给其它的服务器。为了利用存储设备的这一功能,DB2提供了两个新的特性。挂起I/O支持连续的系统可用性,同时还可以在线分离镜像数据库。通过立即挂起对磁盘的I/O,DB2将确保分离的镜像拷贝保持自己的完整性。db2inidb工具对镜像拷贝的操作,提供了如下使数据可用的方法:
1. 创建事务一致性数据库拷贝,用于报表
2. 维护一个镜像拷贝,与主数据库同步
3. 使用数据库的镜像拷贝创建一个离线备份
当数据的容量与正在更新的实际的页面相比很大时,DB2提供了选择,可以只更改涉及包含在一个称为增量/变化备份内的数据,这种方式类似于可以在线或离线进行的备份。除了更改的数据页面之外,备份的内容还包括完全备份镜像之内的数据库元数据(即数据库的配置,表空间的定义和数据库历史)。
利用多个代理来进行备份、灾难恢复和数据库前滚恢复,只要处理器的资源可用,SMP机器的性能将会大幅提高。
DB2将数据链接(data link)作为表的列类型,这一概念集成到备份中 – 这些列所引用的文件也将通过DB2 备份命令进行备份。
Oracle9i
对于不同等级的错误严重程度,Oracle提供了不同的方法,确保快速、可靠地进行数据库服务的恢复。
利用日志挖掘器,Oracle允许管理员轻松纠正用户错误(例如,删除,提交记录,或是删除表语句)。图形化工具为系统管理员提供了易于使用的接口来生成重做语句,反向操作数据(在删除记录时)或是确定错误语句的精确时间(例如删除表),根据时间进行恢复(前滚到指定的时间点或是特定的事务)。
而且Oracle还提供多版本读取功能,使得用户可以进行基于时间的查询(在某一个时间点上的数据状态),允许他们在管理员不干预的情况下重做变动操作。历史数据的可用性取决于重做表空间的大小。
在数据库重启之后,Oracle可以自动从任何与介质无关的数据故障中恢复。
Oracle的缺省状态采用不存档日志模式,在这种模式下所有的重做信息都保存在重做日志文件中,并采用循环使用的方式写,直到最后一个文件写满。此后,第一个重做文件中的信息将被覆盖。这种模式只建议在定期完全备份的时候使用。归档日志模式做的工作相同,但是一个特殊的进程(归档进程)自动在文件被覆盖之前将所有的重做信息传输到一个指定的位置。这些文件可以传输到多个地点以避免由于磁盘故障所带来的数据损失,也可以传输到一个备用服务器上,这个服务器将所有的变化转换为它自己的数据库 – 从而可以立即恢复服务。Oracle还提供一个方法,简便地将重做日志信息复制到不同的物理磁盘上,避免数据库损失。这一特性也适用于控制文件。控制文件中保存着数据文件的文治和其它与系统相关的信息。
Oracle的数据恢复方法使得管理员可以更改数据文件的分布,通过将数文件恢复到一个不同的位置,而不是原始的位置,直到毁坏介质被更换,从而最小化停机时间。
缺省的,Oracle可以在磁盘,磁带,命名管道(UNIX),Tivoli存储管理器(以前称为ADSM)或其它提供商的产品中进行备份和恢复。
数据库备份和恢复既可以在线进行(热备份),也可以离线进行(冷备份)。热备份可以是全部备份,也可以是增量备份,增量备份是只被备份对数据块的变动。
此外,Oracle还提供了恢复管理器(recovery manager),它紧密地与数据库服务器集成在一起,可以利用用户创建的脚本进行自动备份。它集成在企业管理器中。
管理员可以定义数据库毁坏后最大的恢复次数(MTTR),Oracle用这个数值来确定数据文件清空的次序。
另外,多版本读取模型存储并提供不同版本的数据,因此可以查看某些变动提交之前的数据。在确定用户的错误和生成撤销变动文档时,可以将这一特性作为工具使用。
结论
Oracle9i和DB2 UDB 7.2 都非常谨慎地考虑了数据的完整性。两种系统的功能都足够满足需求,都提供了自动备份和恢复过程的机制。因为两种解决方案近乎是等价的,我们不能说哪种DBMS在这一领域领先。
5.7 连接性/互操作性
异构系统之间的无缝连接是许多组织面临的问题。宝贵的数据存储在运行在众多操作系统中的不同的数据库系统中,而且这些数据可能是拥有不兼容的数据结构的不同应用提供的。
因为有价值的信息大多来自不同系统的数据连接中,因此与多个DBMS相连的需要也就日渐提高。这会在不同领域中带来问题:数据库系统可以具有不同的访问界面,不同的SQL语法,支持不同的数据类型,不同的功能和不同的处理错误的方法。
解决互操作性的最为出色的方法是将互联工作交给DBMS去做,DBMS应当理想地将所有不同的数据源之间的差别为最终用户掩藏起来,并为最终用户提供一个透明的接口,作为所有信息来源的网关。
但是,在这个问题上,重要的是了解下面所描述的每种产品中绑定的特性和功能。您应当利用这里所描述的功能,认识到这些不是“免费”的,并从TCO的角度来评价这个解决方案。
DB2 UDB V7.2
DB2随附了多种产品和解决方案,来满足这些连接性请求。
与关系型数据源集成的选件是:
(1) DB2 Relational Connect是IBM集成战略的一部分:IBM的DataJoiner的功能将逐渐集成UDB引擎中。在集成的第一步中,DB2 Relational Connect提供了对Oracle、Sybase和Microsoft SQL Server数据库的native读访问。DB2 Ralational Connect使得数据源访问对调用它的应用完全透明,并支持DB2的全部SELECT API特性。DB2与其它数据源之间的功能的差异与应用相隔离,功能上不会有任何损失,因为DB2内部集成了自动补偿功能。为了在不同的DBMS上获得最佳的性能,能够利用该种DBMS最佳的SQL重写对Oracle,Sybase或Microsoft SQL Server的查询。
(2) DB2 DataJoiner
Ø 对Oracle,Oracle RDB,Informix和Sybase提供完全native的SQL支持,包括DML和DDL查询;
Ø 集成多供应商数据库复制;
Ø 对IMS和VSAM数据源提供连续支持
(3) DB2 Connect这个工具用于通过DRDA连接主机数据库
(4) DB2 Life Sciences Data Connect支持DB2 联邦系统集成分布在不同地点的基因、化学、生物和其它研究数据。
也可以集成非关系型数据源:
(1) DB2内置支持OLE DB。一个OLE DB提供者可以通过OLE DB访问DB2。此外,可以定义OLE DB表功能,透明读取访问OLE DB表,异构的分布式查询可以跨越多个DB2表或视图以及OLE DB数据源。
(2) DB2大对象数据类型,即BLOB,CLOB和DBCLOB
(3) DB2用户定义数据类型允许基于DB2提供的关系型类型来定义特殊的数据类型和匹配功能(用户定义)(例如基于decimal类型定义dollar数据类型)
(4) DB2 Extender,是对DB2数据库的扩展,它允许集成非关系型数据类型,即,文本,音频,视频,Video Charger,图象,空间,XML,文本信息和智能挖掘器评分。实际的数据可以放置在数据库的内部或外部,这称作数据链接(Data Links)管理一致性。
DB2 XML扩展器允许在一个列内存储XML文档(数据类型是XML),或是将组件部件分解为多个表的列。在两种情况中,索引都可以针对XML文档的元素或属性来定义,以便加速检索。此外,文本查找和章节查找可以使用文本扩展器针对XML列或是解开的部分来进行。DB2能够根据现有的DB2表构成XML文档,以便在企业到企业环境中进行数据交换。XML文档可以从文件中读取或是通过MQSeries消息中读取,反过来也一样。
在DB2版本7中,MQSeries集成到了DB2中:现在可以操作MQSeries的队列 – 发送,接收,发布,读取 – 以及将队列作为一个表来读取。但是队列操作功能的当前实现还没有支持2阶段提交协议。
Oracle9i
Oracle可以访问几乎所有存储了感兴趣数据的通用数据源。对这些数据源的访问打包在4个不同的包中,以更为“经典”的数据格式与其它数据库交换,此外还提供了一个“集线器”的体系来支持不同关键事务管理应用之间的数据交换(现在通常称为B2B或电子商务数据交换)。可靠的2层体系是快速和可靠的数据访问的基础。
所有的包都具有一个共同点,那就是对外部数据源的访问是通过异构服务模块来处理的,这个模块是数据库引擎的一部分。
(1) 开放系统网关 – 这些网关提供对最常用的标准RDBMS的访问,并可以访问以下平台上的数据:MS SQL Sever(NT),Informix(Solaris,HP-UX),Sybase(Solaris,HP-UX),Ingres(Solaris,HP-UX),Teradata(Solaris,NT,HP-UX),RDB(Alpha OpenVMS)和RMS(Alpha OpenVMS)。
(2) 主机集成网关 – 这些网关提供对保存在IBM世界(在纯的主机或混合IBM主机/中型环境)中的数据的访问。透明网关通过DRDA提供对MVS上的DB2和AS/400上的DB2/400中的数据的访问, DRDA含盖了Unix、NT和OS/2上的DB2实现。Oracle Pure Extract允许访问存储在IMS、VSAM和其它以前的遗留(legacy)格式(例如顺序文件)中的数据。
(3) 企业集成网关允许Oracle集成到信息交换体系中,例如IBM MQSeries(通过Procedural Gateway to MQSeries),或是通过APPC进行进程间应用过程调用(使用主机中的CICS或IMS/TM)
(4) 通用连接代理使用第三方ODBC或OLE DB驱动程序提供对任何ODBC、JDBC或OLE DB(带有或不带有SQL支持)兼容的非Oracle系统的访问(不支持分布式交易,存储过程或DDL)。
Oracle 9iAS InterConnect(即集成服务器)是新的“集线器”体系产品,允许Oracle在几乎所有的应用(例如SAP R/3)和Oracle Financials之间交换数据。因为内部体系是完全基于XML的,客户可以方便地创建任何新的转换说明,或是使用任何兼容XML的数据源所预先构建的模板。另外,所有经过集线器的数据都可以被保存下来,例如用于归档。
Oracle Catridges(即上下文,音频,图象,空间,时间序列,可视化信息检索)允许扩展关系型数据类型。此外,Oracle还允许用户定义数据类型。
结论
这里的战略非常明了:将DBMS作为企业信息数据源的入口 – 不同数据源之间的用法的不同将被透明处理。两种DBMS都在向着这个方向发展 – 两者的体系结构不同。
本领域显然是DB2的优势,因为它提供集成异构数据源的高级功能。DB2优化器甚至可以针对联合数据源优化查询 – 甚至可以获得更好的性能,尤其采用DB2作为其它非DB2 DBMS的入口时。对数据进行充分的处理,以及面向文档的XML数据源可以利用一个特殊的数据类型来保存XML文档,或是分解到关系型表中,这为DB2又提供了一个优势。
DB2可以从MQSeries队列中读取。而且其它功能也支持对队列进行操作。Oracle的到MQSeries的过程网关是基于一个利用PL/SQL脚本的“旧”的体系。它未来的发展方向是根据应用服务器在应用之间交换数据 – 但这不属于本文档调查的内容。
5.8 安全性
同时为客户和员工提供对业务数据的灵活访问,而且不会影响必需的安全标准,这句话充分描述了现代的安全解决方案所必须要进行的权衡。安全分为几种:
Ø 保护客户机和服务器之间的数据传输
Ø 防止数据库中的数据遭受非法访问(水平和垂直)
Ø 审核对数据的访问,发现任何违反安全性的访问。
DB2 UDB V7.2
DB2不需要用户在数据库中定义用户,它依靠的是DCE或LDAP等安全机制,或是基础的操作系统的安全机制,来进行用户的验证。在逐渐扩展的数据库环境中,这是一项很大的优势,特别是针对大型组织来说就更为明显,因为用户只需要定义一次,用户也只需要记住一个密码。这些用户标识以及已经定义的任何分组,都可以用于授权或是取消他们对数据库的授权,这是由数据库本身完成的。
一旦一个用户经过验证,所有的认证将放置到数据库内。这个用户可以通过主UserID获取访问,主UserId是实际的验证的UserID,也可以通过任何从UserID进行验证,从UserID是与主UserID相关的组的标识。所进行的授权可以与对象相关,例如数据库,表空间和表,也可以与可执行文件相关,例如程序,存储过程,或用户定义的函数。对数据的访问权限,其细化程度可以是对整个表进行某些操作(例如,查询,插入,更新列,或删除),也可以细到只能对某一行的某一列操作。这是通过定义视图来实现的。
在用户认证的过程中,可以配置数据库在传输时对密码进行加密,而不是采用明文的形式。这是一个很重要的安全机制,因为公司的标准往往将密码划归到非常机密一类。
在很多情况下,当配置了一个中间层,例如一个Web应用服务器,数据将被加密,作为这一层提供服务的一部分。但是,当数据需要也以加密的形式存储在数据库中时,数据库也需要提供这样的支持。对于这种类型的需求,DB2提供了一组内置的加密和解密函数。
Ø ENCRYPT函数使用基于密码的加密算法对数据加密。加密函数还允许保存一个密码提示,提供另一个函数来在没有密码时获得提示。
Ø DECRY_BIN和DECRY_CHAR函数使用基于密码的解密算法进行解密。
Ø GETHINT函数返回一个打包的密码提示,这个密码提示是数据拥有者定义的。
DB2还在产品中内置了广泛的审核功能。这个工具基于事件监视数据,对它可以进行定制,以便以自动化的方式满足特定的需求。
Oracle9i
Oracle允许DBA为每个用户定义需要进行检查的访问权限:外部用户由操作系统进行检查,内部用户无需本地操作系统帐户,只存在于数据库内(可以作为无模式用户存在)。
通过Oracle Internet Directory(OID)支持LDAP。可以方便地集成外部的验证适配器,例如RADIUM ,DCE ,RACF(在MVS上),Kerberos,CyberSage或第三方生物解决方案。DBA还可以定义一个定制的密码校验函数来检查用户的密码是否于公司具体的规章相一致。除了密码加密之外,Oracle还提供了另一种选择,可以利用加密包,根据DES算法(高达128位)加密数据。
虚拟专用数据库支持(VPD)是利用精心细化的访问控制实现的,这种访问控制提供了一个方便的管理访问控制的方式,将标准与自动连接到每个数据访问的用户账号联系在一起。对于更高的安全性需求,Oracle Label Secuity(以前称为Oracle Military Security)可以提供更好的访问控制,在允许访问数据内容之前,它将与行记录相关联的标志或标签与当前用户的标签验证配置(安全管理员定义的)相比较。
除了系统定义的角色(SYSOPER,SYSDBA)之外,Oracle还可以根据用户的角色进行权限分组。用户自动继承他们所属的角色的所有权限。只需简单地为角色授权,就可以迅速将权限授权给用户组。
除了访问权限设置之外,Oracle审核能力允许DBA控制几乎所有针对数据库对象和数据库本身进行的活动。这种方式可以进入数据库,或是根据登录的用户的权限来操作数据。
结论
DB2完全以来DCE,LDAP和其它基础操作系统的安全机制来进行用户的定义和验证。这种方式对于大型的组织尤其有效,这将会在可扩展的数据库环境中带来相当大的优势。因为用户只需要被定义一次,也只需要记住和维护一个密码即可。
Oracle9i所提供的标签和精心细化的安全性在DBMS世界中是独一无二的。它首先尝试提供行级的安全性,这在以前都是通过视图来实现的。以前的管理方式很难管理,管理得也不充分。Oracle的方法看起来很智能,但需要相关标准的认可。如果缺少标准,这种方法将不会获得认可。
我们看到DB2以其业已证明和需要更少管理的用户定义和管理仍然在这个领域中领先。但是Oracle9i引入可一个很有前途的新的概念来实现行级安全性,替代原来的视图方式。
5.9 符合标准性
符合标准性对于数据库这个团体来说很重要。以下各种不同类型的标准对于数据很重要:
(1) 编程接口:这些标准用于程序与数据库的通讯,例如JDBC,ODBC
(2) 标准化的SQL允许应用程序独立于存放数据的数据库访问和操作数据对象
(3) 元数据标准简化了异构工具之间的解决方案集成
DB2 UDB V7.2
IBM是在DB2旗帜下编写“标准”的。IBM作出了战略合作决策,广泛地支持并领导标准的创建。DB2符合所有重要的编程接口标准。DB2 CLI基于X/Open和ISO调用等级接口标准,它基于ODBC。许多CLI程序在ODBC下无需修改。DB2包括了一个ODBC和一个CLI驱动程序。在Java应用方面,可以使用JDBC或SQLJ,两者都已经是行业标准。DB2 支持Microsoft数据对象标准DAO,RDO,ADO 和OLE DB。如果您的编程语言是Perl,您将可以使用标准数据库API – Perl DBI。
SQL99标准是一个巨大的长卷,尽管没有一个重大的数据库提供商符合整个的标准,DB2的SQL符合这个SQL标准。DB2包括CASE语法以及其它各种形式的外联接。DB2与其它数据库的不同之处在于DB2 的存储过程语言,它与ANSI的SQL99标准的永久性存储模块相一致。
DB2支持Object Management Group的通用仓库元数据交换。在V7.2中,您可以导入和导出通用仓库元模型XML对象。
XML是电子商务环境中交换数据的标准,自从它进入DBMS就得到支持,标准支持已经增强到UDDI和SOAP,这两种标准都支持电子商务的需要。
Oracle9i
Oracle在标准化方面具有悠久的历史,它与IBM一起,是众多不同标准的主要贡献者。
Oracle 9i现在在很大程度上符合ANSI/ISO SQL1999。这个包括以前所没有的功能:
Ø Coalesce
Ø Case
Ø 永久存储模块
Ø 时间戳(带有时区)
Ø SQL99 联接语法
Ø 全外联接
Ø 对象关系扩展中的继承
而且Oracle支持所有主要的编程接口,例如ODBC,JDBC(胖和瘦实现)以及其它接口,大多都是它们的最新版本。
此外,Oracle还支持WebDAV – 基于web浏览器的文件访问标准。
与IBM一样,Oracle还完全支持通用仓库元数据交换(CWMI)。
结论
Oracle9i和DB2 UDB 7.2现在都支持大多数和DBMS通讯的标准。
但是,在实现这些标准的时候,它们采用的是不同的战略。Oracle的方法基于历史实现,对标准的支持采用补充以前的专用实现的方法。它的首选是Oracle的专用实现。IBM将标准看作是唯一的DBMS通讯的途径。这就意味着在大多数情况下,从DB2向其它DBMS移植要比从Oracle向其它DBMS移植容易。
IBM对开放型和标准化方面的更大承诺表现在它总是从战略上首先支持标准,这方面的一个很出色的例子就是SQL99和基于XML/SOAP/UDDI的Web服务。我们从这些事实中可以看出IBM的DB2在这一领域具有相当大的优势。
5.10 集成
DBMS集成是一个核心的方面,它与开发的效率以及投资保护相关。尽管通常总是强调应用和DBMS独立,但实际的实现却是另外一回事了。随着数据和用户的增加,以及功能复杂性的提高,独立的工具和应用提供商已经认识到紧密地与一个优选的数据库集成非常重要。
此外,在决策支持应用中对企业数据集成的需要已经越来越高。利用数据库提供的其它数据管理功能是适宜的,尽管这将意味着依赖DBMS引擎,因为这些特性几乎是“免费”提供,并允许快速开发。对于商业智能功能,尤其是ETL,调度,OLAP和挖掘功能来说,这种需要已经变得非常明显。
最近的“集成”方法解决的是电子商务体系、应用服务器集成和消息功能。电子商务集成从本质上来说意味着当启动某些业务过程时确保数据集成。因此将业务功能和实际的数据存储集成,DBMS的作用至关重要。此外,这种集成可以降低应用的复杂性,为企业带来更多的优势。但是,电子商务集成的特性还将意味着处理应用服务器和消息体系和产品,以及相关的标准(例如EJB)。这些不在本文的讨论范围之内。
集成的一个重要方面,但不是最后一个方面,就是DBMS提供商使用的合作战略:提供商是希望自己的解决方案涵盖所有的领域(“单提供商解决方案”),还是希望依赖核心能力并与其它“最佳组合”解决方案提供商合作?
DB2 UDB V7.2
DB2 在三种不同的集成级别上向DBMS中集成软件:核心数据库引擎,扩展器和来自多个公司(包括IBM自己)的独立的产品。
IBM的中心是将当前分布在单独的产品中的功能集成到数据引擎中,即
Ø 商业智能功能
Ø 通过SQL提供OLAP服务
Ø OLAP服务器功能集成在OLAP启动套件中
Ø 集成数据仓库中心,来支持数据仓库的整合和发布,并涵盖ETL和调度功能
Ø 集成信息编目,支持仓库知识库(repository),用于浏览和交换仓库的元数据
Ø DataJoiner将逐渐集成到核心引擎中:在V7.2中可以读访问Oracle,Sybase和MS SQL Server
此外,DB2通过扩展器来集成非关系型数据类型。这些功能现在已经存在(文本,视频,音频,地理空间),并将进一步增强:
Ø 数据挖掘功能(Inteligent Miner Scoring);
Ø 通过XML类型的列或是分解到多个关系数据表中,集成对XML的支持,支持导入和导出XML文档。
在应用集成方面,IBM正采取最佳组合的方法,在战略上与领先的应用提供商合作,一起提供解决方案套件(例如SAP AG, Siebel Systems Inc., Ariba Inc., i2 Technologies Inc., PeopleSoft Inc.)。作为交换,这些公司利用DB2作为它们首选的DBMS。这种合作方法包括前端和后端办公解决方案以及对复杂的数据管理和数据仓库功能的支持(例如与Informatica,ETI,Vality Technology,Evoke Software的合作)。
Oracle9i
Oracle采用的方法与IBM相类似,将以前不被认为是DBMS的功能添加到核心数据库引擎中。例如商业智能功能 – Oracle现在提供集成的OLAP服务(Java OLAP API,计算引擎和分析工作空间);多表插入和upsert(如果存在则更新,否则插入)降低了ETL过程的复杂性。
数据仓库被单独的工具进一步利用:Warehouse Builder for ETL和Workflow Builder for scheduling。
为了支持Internet集成,集成了XML数据类型和功能来填写和查询内容。
在提供完整的软件方案方面,Oracle的战略是为客户提供一个完整但却紧密集成的软件包 – Oracle软件中囊括了企业用以管理它的金融、制造、销售队伍、后勤、电子贸易和供应商的所需的所有应用。
结论
IBM和Oracle都将他们的DBMS同时定位在业务系统(关系型和对象型)和决策支持应用领域。数据仓库领域更是其中的焦点,提供了丰富的功能:DB2从7.1版开始集成数据仓库中心和OLAP启动套件;数据仓库管理器已经拥有众多适配器,并将逐渐提供更多的外部数据适配器,当前提供的适配器包括SAP,i2和Websphere 站点分析器。从7.2开始,DB2通过DB2扩展器提供集成的挖掘功能。在最近的DB2版本中,还添加了SQL的OLAP扩展(根据SQL3标准 - ISO99)的支持。现在提供的功能颇具吸引力,并与MDBMS解决方案竞争。Oracle最近只利用OLAP功能丰富了它的数据库引擎。ETL功能是利用Warehouse Builer提供的,Workflow Manager提供调度安排。
在这个领域,DB2适配器稍稍领先Oracle。OLAP扩展以及ETL工具之间的功能差别需要实际进行评测和比较,这项任务比较复杂,所以本文没有进行评测。当OLAP工具提供商开始使用这些扩展时,这些功能的好处仍然需要进行测定。
双方也关注电子商务应用的集成。其特点是XML,消息服务和应用服务集成。
DBMS的定位为单点访问企业数据(结构化和非结构化,关系型和非关系型),本文在“5.7 连接性/互操作性”进行了详细说明。
从用户的角度来看,Oracle紧密集成软件包的做法是有益的。但只有很少的企业是从原始状态开始的 – 对于其它企业来说,DBMS集成其它提供商的应用和工具的能力更为重要。IBM的战略是成为中间件提供商,并与最佳组合的应用和工具提供商进行开放性的合作,这一战略更适合于用户自由选择解决方案的需求。
总之,我们可以看出DB2在这一领域占据领先地位 – 原因并不仅仅是IBM的合作战略。 |
IBM DB2 UDB V7.2 与 Oracle9i(仅供参考!!)
好文!!! |
IBM DB2 UDB V7.2 与 Oracle9i(仅供参考!!)
大牛,从哪里找到的? |
| |