introducing ibm data studio administrator
TRANSCRIPT
Jeff Ruggles, Development, IBM, [email protected] Ma, Enablement, IBM, [email protected]
Introducing IBM Data Studio Administrator for Linux, Unix, and Windows, Session 1330
Session Number 1330
1
OverviewData Studio Administrator (DSA) 1.2– Product features– Database Change Management Overview
• Change in place• Migrate objects
– Integration with Rational Data Architect– Deep dive into change management of UDFs and
viewsSummaryQuestions
Agenda
2
Database Change ManagementIn today’s fast-paced business environments, change is a constant: applications and systems that use data change to handle new demands. Organizations evolve. New kinds of data need to be added. These types of changes require updates to the database and data structure.
80% of problems are reported by
users
85% of problems are caused by IT
changing something
Customers are becoming the IT test team
Complexity of technology is
increasing faster than IT
skills
Understanding the complete scope of an
application is hard
Must analyze the various impacts of a
schema change
Promoting changes can be complex
Need to maintaining an
audit trail
3
For IBM DB2 LUW customers who need a For IBM DB2 LUW customers who need a comprehensive database change management comprehensive database change management solution to extend the manageability of DB2 and solution to extend the manageability of DB2 and
increase DBA productivity.increase DBA productivity.
IBM Data Studio Administrator 1.2IBM Data Studio Administrator 1.2
4
IBM Data Studio Administrator 1.2
Automates structural database changesCompares or translates between database, model, and DDLFacilitates impact and dependency analysisSupports extended alters and data preservationMigrates database objects, data, and privilegesGenerates maintenance utility commandsEnables undo or restart -- if neededDocuments changes for collaboration and auditIntegrates with Rational V7
Product at a GlanceEnhances DBA productivity and accelerates complex changesReduces errors and downtimeEnsures data and process integrity Fosters teamwork and alignmentEnhances auditability
GUI Client runs on Linux or Windows managing DB2 UDB for Linux, Unix, and Windows V8 and higher
Where does it Run?
Benefits
More Informationhttp://ibm.com/software/data/db2imstools/db2tools/db2cme/db2changemgtexpert-mp.html
5
Database Object Management
Organizes change resources and processes
Deployment Script – manages the process Diagram Editor – model database objects
Output View – deploy changesChange Command Editor – customize scripts
Records the results of a deploymentFormats commands and validates syntax
Visualization of database objects and relationships
6
What is notable about DSA?Unique Features
in DSAEclipse integrated development environment
Shared installation with Rational V7 products such as Rational Data Architect, Rational Software Modeler, Rational Software Architect etc.
Shareable physical data models
Support for HPU
How is DSA different for other Eclipse offerings like data tools?DSA is a comprehensive database object management solution
How is DSA different from the competition?The competition does not offer an integrated development environment
Through the Eclipse IDE, DSA enables the DBA to leverage a number of tools and f i li i i l
7
Database Change Management Pain PointsCustomer Pain Points DSA Solutions
Developing change scripts Generate scripts from modelsFinding impacted objects Impact diagramsCommunicating changes Sharing physical data
models, reports, projects, and scripts
Managing side-effects Generate utilities e.g. EXPORT, UNLOAD, RUNSTANTS REBIND etc.
Migrating changes Compare and synchronize databases
Audit Library control integrationCreating a back out strategy Automatically generate undo
scripts
8
Implementing a Database Change
Write one or more scripts– Write a delta DDL script if structural data
objects are changed– Write a DCL script if needed– Use utilities to preserve the data if necessary– Add REORG, RUNSTATS, REBIND etc. as
required
Run one or more scripts– Run scripts in the right order– Don’t make any mistakes
Test
Without Data Studio Change Management
Production
ALTER TABLE HR.EMPLOYEE ADD CONSTRAINT EMPLOYEE_PK PRIMARY KEY(EMPNO);
ALTER TABLE HR.ORGANIZATION ADD CONSTRAINT ORG_EMP_FK FOREIGNKEY(EMPNO) REFERENCES HR.EMPLOYEE(EMPNO) ON DELETE NO ACTION ONUPDATE NO ACTION;
DROP TABLE HR.STAFF;
CREATE TABLE HR.STAFF (EMPNO CHAR (8) NOT NULL , JOB CHAR (5) , YEARSSMALLINT , SALARY DECIMAL (7, 2) , COMM DECIMAL (7, 2) , DEPT SMALLINT , NAME VARCHAR (9) ) IN USERSPACE1;
ALTER TABLE HR.STAFF ADD CONSTRAINT STAFF_EMP_FK FOREIGNKEY(EMPNO) REFERENCES HR.EMPLOYEE(EMPNO) ON DELETE NO ACTION ONUPDATE NO ACTION;
IMPORT FROM c:\temp\default_HR_EMPLOYEE_CMEDEMO_cust.dat OF DEL INSERT INTO HR.EMPLOYEE (EMPNO, FIRSTNME, MIDINIT, LASTNAME, WORKDEPT, PHONENO, HIREDATE, JOB, EDLEVEL, SEX, BIRTHDATE, SALARY, BONUS, COMM, MOBILENO) ;
IMPORT FROM c:\temp\default_HR_STAFF_CMEDEMO_cust.dat OF DEL INSERT INTO HR.STAFF (EMPNO, JOB, YEARS, SALARY, COMM, DEPT, NAME) ;
IMPORT FROM c:\temp\default_HR_ORGANIZATION_CMEDEMO_cust.dat OFDEL INSERT INTO HR.ORGANIZATION ;
9
Implementing a Database Change
Test
Data Studio Administrator
Find and change database objects like tables or columnsGenerate commands to implement all changesAutomatically …
Identify and manage dependencies and side effects such as referential integrity and data preservationGenerate a script to undo the changes if necessary
Production
10
Data Studio Administrator automatically managesStructural changes
DDL like CREATE/ALTER/DROP … that change tables, views, triggers …
DependenciesReferential integrity i.e. primary keys,
foreign keys, triggers
ImpactsViews depend on tables, views, and/or
aliases …
Side effectsMaintaining data, authorizations, keeping
objects operative …
Table
Changing the data type of a primary key column
Foreign Key?
Child TableA column in this table is
affected as well as the foreign key
Views/ MQT? UDF?
Data?
Impacts Effects
Procedure
Procedure needs a rebind, might be impacted
Child TableA column in this table is
affected as well as the foreign key
Packages?
Permissions?
Dependencies?
* Simplified Decision Tree
11
Data Studio Administrator Feature Highlights
Database Change Management– Delta DDL– Extended alters
• Preserve data– Maintenance commands:
• REORG• RUNSTATS• REBIND• SET INTEGRITY• flush package cache
– Authorization preservation– Rename table– Support multi dimensional
clustered tables– Deployment states– Undo
Object MigrationData Migration– Auto cast data types
Editors– Data model editor– Change command editor– Deployment script edit
Visual explain
Online help, sample projects, cheat sheets, tutorials, and a welcome experience
12
Advantages of Data Studio Administrator 1.2
Provide greater flexibility and power in viewing, migrating, and undoing changes– More choices for how data is preserved during change deployment – Object migration enhancements– Restart and partial undo to correct errors during deployment.– Enhance impact analysis and usability. – Add change and deployment reports. – Improved database object support for comment on and authorizations.
Provide more options for preserving existing authorizations during changes.
– DB2 V9.5 support.Enhanced Usability– Guide DBAs through the change management process using visual
task based diagrams – Simplify command generation in one integrated wizard to support
DDL, DCL, DB2 commands, and system commands– Enhanced usability for exploring databases and database objects
13
Manage New Changes
DB2 UDB
Let’s consider a typical database change management task—specifying a change and deploying it. Let’s say a DBA wants to change the data type of a column in the Employee table in the HR schema.
HR
Employee
14
Example: Managing a Database ChangeSuppose we need to change the data type of the EMPNO column in the EMPLOYEE table from SMALLINT to VARCHAR(8).
Notice that the EMPNO column is part of the primary key and that the EMPLOYEE table has two child tables (ORGANIZATION and STAFF.)
Data Studio Administrator will generate commands that respect RI relationships, preserve table data, and maintain the integrity of the database.
Extended alter support: preserve table data using IMPORT, EXPORT, LOAD, HPU, INSERT, or LOAD from cursor.
Maintain the database using RUNSTATS, REBIND, REORG, SET INTEGRITY etc
15
Change In Place Process Flow
Make changes to using a physical data model, generate commands
Create or reset a deployment script to the change in place process flow
16
Typical Scenario: Change Migration
Now let’s consider a change migration scenario. In this situation, say that a DBA plans to migrate or promote some changes from the final test environment to the production environment.
HR HR
Test Production
17
Example: Migrating a Database ChangeSuppose we need to create a test environment based on production.
Then we need to integrate changes from a script.
We’ll use a Deployment Script to help implement the required change.
The Deployment Script and Data Design Project can be used to audit changes or undo them.
Object migration enhancements
Migrate from physical data models, live database connections, or from scripts
Specify masks and ignores to simplify the comparison of models.
18
Migrate Objects Process Flow
Compare and move changes from a model, connection or script to another.
Create or reset a deployment script to the migrate objects process flow
19
Save Table Data inside DB2
HR
EmployeeEmployee1
1. Rename Employee to Shadow table
2. Create new Employee table
3. Copy data into new table
Reload using LOAD FROM CURSOR or INSERT
In addition to support for …•LOAD•Import•Export•HPU
More choices for how data is preserved during change deployment
Store data outside the database
Store data inside the database using a shadow table
Restore data with or without enforcing RI (now the default)
DB2 UDB
20
New Command Generation Wizard
Generate commands to implement the changes
Data Preservation Options
Maintenance commands options and review changes
21
Undo and Restart to correct errors during deployment
Undo changes – if needed
Options if an error occurs during deployment
22
Foster Teamwork and Audit Management
DBA makes a changeDBA commits the project to a library control system
An audit is called forDBA extracts the project from the library control systemDBA or auditor reviews the change
When it’s easy to document schema changes …
It’s easy to audit them
23
Integration with High Performance Unload (HPU)
Leverage HPU to unload big tablesHPU is a separately priced productHPU reads directly from the DB2 datasetsThe unload is run on the database server – via the DAS– Data is staged on the server
24
Relationship and Integration
Rational Data Architect simplifies data modeling and
integration design enabling architects to
discover, model, visualize and relate
diverse and distributed data
assets.
Data Studio AdministratorData Studio Administrator
for Linux, Unix and Windows speeds the database changing
process by automating manual tasks and
reducing human error.
Rational Data Architect
25
Managing Multiple Database Environments
Test Production
Test
Production
ER Model
Development
Database shops have multiple database tiers i.e. development, test, and production.
Data Studio Administrator provides a comprehensive solution to migrate between environments.
Production ER Model Development
Rational Data Architect translates between logical models and physical data models.
Desired Change Flow Our Solution
26
Accelerate Application DeliveryDSARDA DB2
for Linux,
Unix and
WindowsLogical
Data
Modeling
Share
PDMPhysical
Data
Modeling
Physical
Data
Modeling
Manage changePreserve DataPreserve AuthorizationRebind applicationsDeploy changesMigrate objectsMove Data
Enterprise modelingLogical modelingGlossary modelingMapping modelsMapping discoveryWeb PublishingIntegrate Requirements
Deploy
Increase productivityShare modelsIntegrate tools and rolesIncrease communicationComprehensive solutionsROI
Architect DBA
DDL, DML
Utilities, DB2
Commands
27
Changing User Defined Functions and Views
Deep Dive into Functions and Views– Changing a UDF– Impact Analysis– Generating Change Commands– The Change Report– The Deployment Report
29
Visual Impact Analysis on the UDFUse dependencies information in the DB2 Catalog to understand the
impact of a change
UDF in view e.g. TOTAL_SAL in TOTALSALView in UDF e.g. DEPT_TOTAL_SALView in table function e.g. DEPTEMPLOYEES
30
Generating Change CommandsGenerate Commands to implement the change
DB2 Catalog Impact Information is used when Generating DDL
33
Hardware configuration1 GB RAM (2 GB is recommended)250 MB disk space (Product
Installation)25 MB of free disk space (Workspace)Windows 2000, Windows 2003, and
Windows XP (all 32-bit)Linux on xSeries (32-bit) (need to be
root to install)Software configurationConnectivity to Database
Administration Server (DAS) • Locally installed DB2 database • DB2 UDB Administration Client
(Linux has a few extra steps)A Web browser (to view
demonstrations of the product in the online documentation)
Physical Architecture
DB2 for LUW
DAS Server
JDBC Type IVDB2 Change Management Expert DAS Client
SQL
Eclipse
Windows or Linux
34
Product SummaryDatabase change management enhances DBA productivity and accelerates complex changes while ensuring data and process integrity 1. Automatically manages dependent objects2. Save and restore data for extended alters 3. Generate needed maintenance commands e.g.
RUNSTATS, REBIND
Reduces errors and downtime1. Betters tools like impact analysis diagrams2. Impacts and side effects automatically factored in3. Automatically generate commands to undo
Fosters teamwork and alignment & enhances auditability1. Using projects, resources2. Eclipse Team
36
© Copyright IBM Corporation [current year]. All rights reserved.U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, NOR SHALL HAVE THE EFFECT OF, CREATING ANY WARRANTIES OR REPRESENTATIONS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR ALTERING THE TERMS AND CONDITIONS OF ANY AGREEMENT OR LICENSE GOVERNING THE USE OF IBM PRODUCTS AND/OR SOFTWARE.
IBM, the IBM logo, ibm.com, and are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml
Disclaimer