Toad DB2 LUW DBA suite and IBM Data Studio Comparison

60 downloads 13636 Views 5MB Size Report
DBAs and developers working with IBM® DB2 often use. IBM® Data Studio®. ... The Data Studio product used in this comparison is IBM Data Studio – Full.
How Toad DBA Suite for IBM DB2 LUW Complements IBM Data Studio ™

® ®

®

Written by Jeff Podlasek, Dell Software

Abstract DBAs and developers working with IBM® DB2 often use IBM® Data Studio®. Toad™ DBA Suite or IBM® DB2 LUW complements Data Studio with advanced features that make DBAs and developers much more productive. This document explains some of these features and compares them to Data Studio’s functionality.

Introduction Toad™: focused on the needs of its users Toad is the most widely used database management solution on the market today, with more than two million users. Toad brings operational efficiency and best practices to DBAs and development teams working through the database lifecycle. Toad for IBM DB2 was introduced in the market to solve challenges in IBM DB2 LUW and z/OS development and administration. From the very beginning, Toad’s development team has collaborated with the user community, and many of

Toad’s advances over the years have been derived directly from that community. Today users can submit suggestions and vote on the ideas of others at the Toad Idea Pond, so that the best ideas make it into future releases. Toad users also want to become more proficient at the tasks they perform on a daily basis, and to share their expertise with others. Toad World connects the community of users together to discuss, share and learn more about IBM DB2 and Toad through videos, blogs, white papers and more. Through this collaboration, Toad users can get the most out of the product. About this document This technical brief will help you understand how Toad DBA Suite for IBM DB2 LUW v5.5 complements and extends the basic features available in IBM Data Studio. The Data Studio product used in this comparison is IBM Data Studio – Full Client version 3.2.0.0.

Figure 1. IBM Data Studio’s SQL Editor

Data Studio has a SQL Editor component that offers code completion and outline features.

With the Toad DBA Suite, you can improve operational efficiency to lower costs by managing your DB2 LUW database environments through a systematic approach that assures maintenance, performance and change management. The Toad DBA Suite for DB2 LUW allows you to simplify common database administration tasks and become more proactive in solving database-related performance issues. Toad DBA Suite for IBM DB2 LUW is comprised of the following components: • Toad for DB2 LUW Expert Edition (Includes SQL Optimizer for DB2 LUW) • Toad for DB2 LUW DB Admin Module • Benchmark Factory™ for Databases (DB2 LUW Edition) • Toad™ Data Modeler • Spotlight™ on DB2 LUW

We will explore how Toad DBA Suite extends the capabilities of IBM Data Studio in these key areas: • Developing SQL and working with DB2 data

Figure 2. Toad’s SQL Editor

Share: 2

• Maintenance—Managing database objects and users, task automation and scheduling • Performance management—Real-time performance diagnostics, database and SQL optimization • Change management—Configuration changes, schema changes, database level object changes testing

Developing SQL and working with DB2 data Developing queries Developers and DBAs create new DB2 queries every day, so they need a tool that help them work quickly and efficiently. Both IBM Data Studio and Toad for DB2 have features for developing SQL. Data Studio has a SQL Editor component (see Figure 1) that offers code completion and outline features. Toad offers a very powerful and featurerich SQL editor (see Figure 2) for fast and efficient SQL development. Features

Figure 3. You can easily run the same scripts against multiple databases using Toad’s Group Execute function.

such as script map, advanced code completion and code snippets make you more productive in developing queries. Running the same scripts against multiple databases Users often need to run the same scripts against multiple databases. You can easily do that in Toad with the Group Execute feature of the Editor, as shown in Figure 3.

Exporting and saving data with Data Studio Many times developers and DBAs need to export and reload data from their tables, and they need many different file formats to be supported. With Data Studio, you can export data directly from a table into a few delimited formats, as shown in Figure 4.

Figure 4. When extracting data using IBM Data Studio, you are limited to a few file formats.

Share: 3

You can easily run the same scripts against multiple databases using Toad’s Group Execute function.

With Data Studio, you can export data directly from a table into a few delimited formats.

Figure 5. IBM Data Studio offers a limited set of formats for saving query result sets.

With Data Studio, you can also save query result sets, but your choices of format are limited there too (see Figure 5).

Figure 6. Toad’s Data Export Wizard

Share: 4

Exporting and saving data with Toad With Toad, you can export data from tables into many different formats using the Export Wizard, shown in Figure 6.

Figure 7. Exporting data from a data grid in Toad

Toad also enables you to quickly save query result sets to many common formats, including Excel files or instances, as shown in Figure 7.

Importing data Toad’s Import Wizard allows you to bring data from various file formats into your DB2 tables, as shown in Figure 8.

Figure 8. Toad’s Data Import Wizard

Share: 5

Toad also enables you to quickly save query result sets to many common formats, including Excel files or instances.

Toad’s Data Report Wizard walks you through the steps to create a professional report.

Figure 9. Simply right-click to send data to Report Designer.

Creating reports With Toad you can also easily create reports. From any data tab or results grid, you can send data to Toad’s Report Designer (see Figure 9).

Toad’s Data Report Wizard (Figure 10) walks you through the steps to create a professional report.

Figure 10. Toad’s Data Report Wizard makes it easy to create professional reports.

Share: 6

Figure 11. Previewing a report in Toad

Once the wizard completes, you can preview and further customize your report (see Figure 11).

easily and quickly generate test data by right-clicking and choosing Generate Test Data (see Figure 12).

Generating test data Toad has additional data features not found in Data Studio. In Toad, you can

Figure 12. Right-click to generate test data in Toad.

Share: 7

Once the wizard completes, you can preview and further customize your report.

The Data Generation Wizard allows you to customize the data generation by specifying generation actions and options.

Figure 13. The Data Generation Wizard

The Data Generation Wizard allows you to customize the data generation by specifying generation actions and options, as shown in Figure 13.

The wizard completes by generating a script that can be run in the SQL Editor (see Figure 14).

Figure 14. A script generated by the Data Generation Wizard

Share: 8

Figure 15. Right-click to invoke the Data Compare feature in Toad.

Comparing and synchronizing data across database objects Toad has the ability to compare and sync data across your database objects—a feature is not found in Data Studio. For example, you might want to keep your test or staging data in sync with your production data. To start a data compare

and sync, select the objects, right-click and select Data Compare, as shown in Figure 15. The Data Compare wizard will walk you through specifying your target database and schema (see Figure 16).

Figure 16. Specifying a target database in the Data Compare Wizard

Share: 9

Toad has the ability to compare and sync data across your database objects—a feature not found in Data Studio.

If your tables have unique key columns they will be mapped automatically; otherwise, you can specify the columns to be used as keys.

Figure 17. Specifying the columns to be used as keys

If your tables have unique key columns they will be mapped automatically; otherwise, you can specify the columns to be used as keys, as shown in Figure 17.

You can specify various options to customize your comparison, as shown in Figure 18.

Figure 18. Customizing your comparison in Toad

Share: 10

Figure 19. Toad’s Data Compare report

The Data Compare report (Figure 19) highlights the data differences, and the Synchronization Wizard will generate a script to sync the data in your tables. Viewing and editing data in related tables It can be difficult to understand and view the relationship of data in related tables.

Another advanced data feature in Toad that is not available in Data Studio is the ability view and edit data in related tables. You can invoke the Master Detail feature by right-clicking on a table and selecting Send To | Master Detail, as shown in Figure 20.

Figure 20. Right-click action to invoke the Master Detail feature in Toad

Share: 11

The Data Compare report highlights the data differences, and the Synchronization Wizard will generate a script to sync the data in your tables.

Toad’s Master Detail feature allows you to select columns and relationships and to view and edit the data of the related tables.

Figure 21. You can select columns and relationships, and view and edit the data of the related tables in Toad.

Toad’s Master Detail feature allows you to select columns and relationships and to view and edit the data of the related tables, as shown in Figure 21.

Maintenance Toad makes it easy to manage database objects and users, automate and schedule tasks, and more.

existing objects. To do that in Data Studio requires you to take the following steps: 1. 2. 3. 4.

Generate DDL for an object Send the DDL to a SQL Editor as a script Manually make modifications in the script Execute the script

Cloning an object in Toad, on the other hand, is easy. First, right-click a table and choose Create Like (see Figure 22).

Cloning database objects Database users quite often need to create new objects that are similar to

Figure 22. Right-click action to clone an object in Toad

Share: 12

Figure 23. Toad makes it easy to create a new table that is similar to an existing one.

Toad will open a pre-populated object editor where you can easily tweak object properties and attributes to create your cloned objects. For example, you can easily add or modify column definitions and table properties, as shown in Figure 23.

Reverse-engineering database schema into a physical data model To understand the relationships of data, DBAs often need to reverse-engineer database schema into a physical data model. Toad Data Modeler makes this process easy, as shown in Figure 24.

Figure 24. Toad Data Modeler

Share: 13

To understand the relationships of data, DBAs often need to reverse-engineer database schema into a physical data model. Toad Data Modeler makes this process easy.

With Toad, you can easily create, alter, drop and manage DB2 event monitors.

Figure 25. Data Studio provides only a basic relationship viewer.

Data Studio (Figure 25) has only a basic relationship viewer that does not show the details available in Toad Data Modeler. Using DB2 event monitors One common way for DBAs to obtain performance metrics for your DB2

systems is to use DB2 event monitors. Data Studio does not display DB2 event monitors or allow you to manage them. With Toad, you can easily create, alter, drop and manage event monitors within the Database Explorer (see Figure 26).

Figure 26. Toad right-click actions for event monitors

Share: 14

Toad supports all WLM objects and attributes. Figure 27. Managing WLM objects with Toad

Managing WLM objects It is common for DBAs to use the WLM features of DB2 LUW to govern their environments. Data Studio does not display or allow you to manage WLM objects. With Toad, examining and defining WLM objects is easy. Toad supports all WLM objects and attributes, as shown in Figure 27.

Scheduling jobs Many users run certain scripts on a regular basis. With Toad’s Automation feature, you can easily create and schedule jobs. You can open the Automation feature using the Tools | Automation menu item, as shown in Figure 28.

Figure 28. Access Toad’s Automation feature from the Tools menu.

Share: 15

With Toad’s automation feature, you can create simple or complex scripts and schedule it to run as a job.

Figure 29. Toad’s Automation feature

With Toad’s automation feature, you can create simple or complex scripts and schedule it to run as a job (see Figure 29).

With Data Studio, you can also schedule scripts to execute—but you must first install the Data Studio Web Console.

Figure 30. Scheduling scripts in Data Studio requires Data Studio Web Console.

Share: 16

Figure 31. Partition analysis in Toad

Analyzing objects DBAs need to monitor the health of their database objects to ensure the integrity of their systems. Toad provides advanced Space Management features that make analyzing objects a breeze. Several key space management features only found in Toad include:

you to easily modify partition ranges to balance data (see Figure 31). • Compression analysis—Toad shows the potential savings that can be gained for non-compressed objects and the actual savings for compressed objects (see Figure 32).

• Partition analysis—Toad identifies the data distribution of partitioned tables and allows

Figure 32. Toad shows the potential savings that can be gained for non-compressed objects and the actual savings for compressed objects.

Share: 17

Toad shows the potential savings that can be gained for noncompressed objects and the actual savings for compressed objects.

Toad identifies tables, indexes and tablespaces that could be in need of maintenance and allows you to quickly take corrective actions.

Figure 33. Toad identifies tables, indexes and tablespaces that could be in need of maintenance and allows you to quickly take corrective actions.

• Identifying objects with space exceptions— Toad identifies tables, indexes and tablespaces that could be in need of maintenance and allows you to quickly take corrective actions (see Figure 33).

• Storage group analysis—Toad enables you to easily determine the space usage of your DB2 LUW v10 storage groups (see Figure 34).

Figure 34. Toad enables you to easily determine the space usage of your DB2 LUW v10 storage groups.

Share: 18

With Toad, DBAs can view space usage for tablespaces rolled up to the database level or by partition. Figure 35. DBAs can view space usage for tablespaces rolled up to the database level or by partition.

• Space details from the database level— With Toad, DBAs can view space usage for tablespaces rolled up to the database level or by partition (see Figure 35).

• Table partition management—Toad makes managing table partitions simple, including attaching and detaching partitions (see Figure 36).

Figure 36. Toad makes managing table partitions simple, including attaching and detaching partitions.

Share: 19

Spotlight on DB2 LUW visualizes performance metrics to enable quick identification and resolution of issues.

Figure 37. Toad enables DBAs to capture, maintain and view historical space information for tables, indexes and tablespaces. • Historical space display—DBAs need to define the space requirements for their databases and determine which database objects increase in size and which remain static in size over time. Toad helps you determine your future space requirements by enabling you to capture, maintain and view historical space information for your tables, indexes and tablespaces.

Performance management DBAs need to identify and understand performance bottlenecks. Toad DBA Suite for DB2 LUW includes Spotlight on DB2 LUW and SQL Optimizer for DB2

LUW to enable DBAs to identify and resolve performance issues quickly. Spotlight on DB2 LUW Spotlight on DB2 LUW visualizes performance metrics to enable quick identification and resolution of issues. Spotlight is a Windows-only client product that does not require database server objects or agents. It is easy to install and quickly begins identifying performance issues. Spotlight has a great home page that allows you to identify performance issues at a glance (see Figure 38).

Figure 38. The Spotlight on DB2 LUW home page

Share: 20

Figure 39. A Spotlight DB2 drilldown

With Spotlight, it’s easy to drill down to the details you need, like those displayed on the Database drill down in Figure 39. Because active databases can severely be affected by poorly performing SQL, DBAs need to be able to

proactively determine the root cause of performance issues. Both Toad and Data Studio will display the explain plan for SQL statements, giving you different views. Figure 40 shows a sample Toad SQL Editor explain plan graph.

Figure 40. The Explain Plan tab in Toad

Share: 21

Because active databases can severely be affected by poorly performing SQL, DBAs need to be able to proactively determine the root cause of performance issues.

SQL Optimizer for DB2 LUW can rewrite SQL into better performing statements.

Figure 41. SQL Optimizer for DB2 LUW

SQL Optimizer for DB2 LUW SQL Optimizer for DB2 LUW is also included in the Toad DBA Suite for DB2 LUW. SQL Optimizer has powerful features for identifying poor performing SQL and can rewrite SQL into better performing statements. Figure 41

shows the SQL Optimizer one-button rewrite option. SQL Optimizer offers many options that let you customize the rewrite process; for example, Figure 42 shows how you can set the intelligence level.

Figure 42. Customizing the rewrite options in SQL Optimizer

Share: 22

Figure 43. SQL Optimizer presents all SQL alternatives with unique access plans.

During the rewrite process, SQL Optimizer uses an artificial intelligence engine that gives you a complete solution by rewriting as many alternatives as possible, according to the options specified. All SQL alternatives

with unique access plans are presented (see Figure 43). SQL Optimizer offers a batch run function that you can use to further identify the best alternatives. The Batch Run button is shown in Figure 44.

Figure 44. SQL Optimizer’s Batch Run function

Share: 23

SQL Optimizer uses an artificial intelligence engine that gives you a complete solution by rewriting as many alternatives as possible.

DB2 users need a solid understanding of things that might affect database integrity.

Figure 45. Comparing alternatives in SQL Optimizer You can easily compare and analyze the alternatives using many different metrics to determine the best SQL for you to use (see Figure 45). Data Studio does not provide a scenario comparison option.

Change management Understanding the relationship between database objects DB2 users need a solid understanding of things that might affect database integrity. IBM Data Studio has an Analyze Impact feature that can graphically show the relationship between database objects, but the documents and grids displayed make it difficult to derive useful information (see Figure 46).

Figure 46. Data Studio’s Analyze Impact feature makes it difficult to derive useful information.

Share: 24

Toad shows the referenced and dependent database objects in an active tree.

Figure 47. Toad shows the referenced and dependent database objects in an active tree.

Toad for IBM DB2 has a Dependencies tab that shows the referenced and dependent database objects in an active tree (see Figure 47). The objects in the

dependencies tree can be selected and actions can be driven from those objects. Data Studio displays some dependencies; however that display is not too interactive.

Figure 48. Data Studio displays some dependencies, but the display is not too interactive.

Share: 25

Toad generates recovery scripts that can be used to restore objects to their previous definitions, in case your changes need to be backed out.

Figure 49. A recovery script generated by Toad

Dropping and recreating objects, and restoring objects with recovery scripts Toad’s Advanced Alter scripts process extended alterations and drop and recreate objects as needed. Toad also generates recovery scripts that can be used to restore objects to their previous definitions, in case your changes need to be backed out (see Figure 49).

Figure 50. IBM Data Studio’s change plan grid

Share: 26

IBM Data Studio also supports advanced alterations; however implementing object changes is not straightforward and is often confusing. At times, the object list in Data Studio becomes a change plan grid that is needed to implement object changes. Moreover, it is unclear if any type of recovery script is possible with Data Studio. Figure 50 shows objects with changes and objects that do not have changes.

Figure 51. Toad’s mapping features provide powerful name transformations.

Mitigating the impact of planned database changes DBAs often manage multiple DB2 database environments that need to be kept in sync, which requires accurate schema deployment scripts. Only Toad has the advanced features you need to easily keep your environments in sync. These features include object compare, schema compare, object migration and DB/DBM parameters compare. Object compare lets you compare and sync database level and schema level objects across your environments. Toad’s

mapping features allow you to compare objects in two environments that might have different naming conventions. Only Toad’s object compare feature has advanced mapping features (see Figure 51) which provide powerful name transformations. Only Toad provides an easy to understand, comprehensive change summary that allows you to see changes between your objects before they are implemented (see Figure 52).

Figure 52. Toad provides an easy to understand, comprehensive change summary that allows you to see changes between your objects before they are implemented.

Share: 27

Only Toad provides an easy to understand, comprehensive change summary that allows you to see changes between your objects before they are implemented.

The DB/DBM compare and sync feature in Toad makes it easy to view any differences in your database and instance-level parameters across environments and to sync configuration settings.

Figure 53. Toad makes it easy to view any differences in your database and instancelevel parameters across environments and to sync configuration settings.

The DB/DBM compare and sync feature in Toad makes it easy to view any differences in your database and instance-level parameters across environments and to sync configuration settings.

Toad for IBM DB2 beta program The Toad for IBM DB2 beta program enables Toad users who are on the full commercial version to perform a side-byside install of the beta version for testing and provide direct feedback to the Toad development team. New beta programs follow shortly after a new release. The Toad beta community is hosted by the members of the Toad development team themselves, so they can engage in dialogue with beta testers and tweak the application in minutes. If you are interested in participating, please click here: toadworld.com/ products/toad-for-ibm-db2/toad_for_ ibm_db2_beta_program/default.aspx

Share: 28

Conclusion The Toad DBA Suite for IBM DB2 LUW complements the IBM Data Studio offering. IBM Data studio offers good standard features for DB2 LUW. Toad extends the capabilities of IBM Data Studio with many advanced features for developing and executing SQL, working with DB2 data, managing database objects, real-time performance diagnostics, change management and other areas.

About the author Jeff Podlasek is the product manager for the Toad for DB2 products at Dell Software. Jeff has more than 20 years of software development experience. He has developed products and managed development teams working on DB2 tools since the 1980s. Jeff is a regular contributor to the Toad for DB2 forums at toadworld.com/products/toad-foribm-db2/default.aspx.

For More Information © 2013 Dell, Inc. ALL RIGHTS RESERVED. This document contains proprietary information protected by copyright. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording for any purpose without the written permission of Dell, Inc. (“Dell”). Dell, Dell Software, the Dell Software logo and products—as identified in this document—are registered trademarks of Dell, Inc. in the U.S.A. and/or other countries. All other trademarks and registered trademarks are property of their respective owners. The information in this document is provided in connection with Dell products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Dell products. EXCEPT AS SET FORTH IN DELL’S TERMS AND CONDITIONS AS SPECIFIED IN THE LICENSE AGREEMENT FOR THIS PRODUCT,

Dell Software: Delivering complete and connected solutions Dell Software empowers organizations of all sizes to experience Dell’s “power to do more” by delivering scalable yet simpleto-use solutions that can increase productivity, responsiveness and efficiency. Dell Software is uniquely positioned to address today’s most pressing business and IT challenges with holistic, connected software offerings across five core solution areas, encompassing data center and cloud management, information management, mobile workforce management, security and data protection. This software, when combined with Dell hardware and services, helps customers simplify IT, mitigate risk and accelerate business results. www.dellsoftware.com.

If you have any questions regarding your potential use of this material, contact: Dell Software 5 Polaris Way Aliso Viejo, CA 92656 www.dellsoftware.com Refer to our Web site for regional and international office information.

Share: 29 TechBrief-ToadVsDataStudio-US-KS-2013-08-06

DELL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL DELL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF DELL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Dell makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice. Dell does not make any commitment to update the information contained in this document.