db2 environment awareness for platform, operating system and middleware_ administrators
TRANSCRIPT
-
2012 IBM Corporation
Information Management
DB2 Environment Awareness for Platform, Operating System and Middleware Administrators
Ashwini Ramani, Information Architect & Lead [email protected] November 2012
-
2012 IBM Corporation
Information Management
2
Disclaimer
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 IBMs 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, or shall have the effect of:Creating any warranty or representation from IBM (or its affiliates or its or their supplies and/or licensors); orAltering the terms and conditions of the applicable license agreement governing the use of IBM software.
-
2012 IBM Corporation
Information Management
DB2 Solution Life Cycle DB2 Platforms Considerations for a DB2 Environment Type of Data and Load on a DB2 Database Typical Problem Scenario Understanding of DB2 Front End and Backend Insight and Approach to handle DB2 Databases for :
Platform and Operating System Administrators Middleware Administrators
Agenda
-
2012 IBM Corporation
Information Management
4
DB2 Solution Life Cycle - Overview
Not everything is Technical
Team work of a Specialist and an Architect
Comprises of 2 Scenarios
Supporting an existing environment (Support and Maintenance)
Solutioning a New Environment (Architecting and Consulting)
-
2012 IBM Corporation
Information Management
5
Scenario 1 Supporting an Existing DB2 EnvironmentPrimary Focus Areas
Best way to run the environment Building Skills/Technical Upskilling Establish SME contacts
Scope Areas
Tuning and Optimization Automations/Enhancements Best Practices Tangible Results
What are the grey areas?
Cannot change the underlying design Product selection is out of control No exposure of the Business Layer Architecture is unknown/unexplored Approach is Confined
-
2012 IBM Corporation
Information Management
6
Scenario 2 Solutioning a New DB2 Environment
Primary Focus Areas
Functional Requirements (FR) Non Functional Requirements (NFR) Consulting
Scope Areas
Platform (Hardware + Operating Systems) Storage and Backup Capacity Planning and Scalability Product Selection (Based on experience, without exhibiting product loyalty)
How does it help?
Understanding of the Design and Architecture Exposure to the Business Layer Knowledge on the behavior of products on various platforms
-
2012 IBM Corporation
Information Management
7
Sl No Hardware Platform OperatingSystem
(Examples)
DB2 ProductCategory
1 IBM System x(AMD and Intel Based x86 or x86-64)
Windows Linux VMware Solaris
DB2 for LUW
2 IBM POWER Systems (Power PC Architecture pSeries and IBM i)
AIX Linux
DB2 for LUW
3 IBM System Z(Mainframes)
z/OS Linux on system z
DB2 for z/OS
DB2 Platforms
-
2012 IBM Corporation
Information Management
8
Considerations for a DB2 Environment
Physical/Virtual System
Physical Location of the System
Memory
Paging Space
Kernel parameters
Number of Processors
File System Sizing
Product Behavior
Software Packages and Libraries
Integration with other Applications/Systems
-
2012 IBM Corporation
Information Management
9
Characteristics
Millions of transactions per day
The system is up to date with current state of business transaction
Data is Non-Integrated Application oriented
Volatile data
Examples
Net Banking Railway Reservation System
Type of Data and Load on DB2 - OLTP
-
2012 IBM Corporation
Information Management
10
Characteristics
Holds historic data
Summarized and Integrated data
Subject Oriented
Non-Volatile data
Data Model and representation is business friendly
Examples
Financial Reporting Elections Trend and History
Type of Data and Load on DB2 - OLAP
-
2012 IBM Corporation
Information Management
11
Type of Data and Load on DB2 OLTP vs OLAP
-
2012 IBM Corporation
Information Management
12
Type of Data and Load on DB2 OLTP vs OLAP
-
2012 IBM Corporation
Information Management
13
Overview of a Typical Problem Scenario
Applications
-
2012 IBM Corporation
Information Management
14
Overview of a Typical Problem Scenario
DB2 Database
Applications
-
2012 IBM Corporation
Information Management
15
Overview of a Typical Problem Scenario
DB2 DatabaseMiddleware
Applications
-
2012 IBM Corporation
Information Management
16
Overview of a Typical Problem Scenario
DB2 Database
Operating System
Middleware
Applications
-
2012 IBM Corporation
Information Management
17
Overview of a Typical Problem Scenario
DB2 Database
Operating System
Middleware
Hardware and/or Storage
Applications
-
2012 IBM Corporation
Information Management
18
Front End
ERP Applications (SAP, Siebel) SDLC Tools (Rational Suite RTC, RQM, Reqpro, Clearquest) ETL Tools (IBM Datastage) Reporting Tools (Cognos, Business Objects, Hyperion)
Backend
Underlying OS (AIX, Linux, Windows) Storage (SAN, TSM, Disks) Networking (IP Addresses, DNS) Monitoring Tools (ITM, Nagios)
Understanding of DB2 Front End and Backend
-
2012 IBM Corporation
Information Management
19
Insight and Approach to handle DB2 for Platform and Operating System Administrators
Capacity Planning for the DB2 Environment
Install DB2 on a different volume group/disk ( datavg, D: )
Plan separate File systems for the below,DB2 codeDB2 instancesDB2 dataDB2 active logsDB2 archival logsDB2 diagnostic logsDB2 backupsDB2 DBA work/scripts
Note : Size for the file systems needs to be planned based on requirement
-
2012 IBM Corporation
Information Management
20
Insight and Approach to handle DB2 for Platform and Operating System Administrators
DB2 File Systems
DB2 Code/Binaries E.g.: /opt/IBM/db2/V9.7 on AIX
/opt/ibm/db2/V9.7 on Linux
Home directories of Instances E.g.: /home/db2inst1
Data (Tablespaces and Containers) E.g.: /db2/data
Backup PathE.g.: /dbbackup
-
2012 IBM Corporation
Information Management
21
Insight and Approach to handle DB2 for Platform and Operating System Administrators
DB2 Users and Groups
Instance User (db2inst1, db2inst2) Fenced User (db2fenc1) DAS User (dasusr1)
Instance Primary Group (db2grp1) SYSADM Group (db2grp1, db2iadm1) Fenced Group (db2fadm1) DAS Group (dasadm1)
DB2 Processes
ps ef | grep db2 # List db2 processes ps ef | grep db2sysc # List the active db2 instances
-
2012 IBM Corporation
Information Management
22
Insight and Approach to handle DB2 for Platform and Operating System Administrators
Configure DB2 for Autostart after system reboot
Use inittab and setup a script /etc/inittab, rc.db2
OR
On UNIX# As root, cd to the /instance and run the below,
./db2iauto on # Repeat this for each instance# To verify, run the below command su - db2set DB2AUTOSTART i # A value of YES would be returned if it has been configured successfully
On Windows# Open the Services file
Start-> run -> services.msc# Right click on each of the DB2 Service and Click on Properties
# Under the Field, Startup Type select the Automatic option
-
2012 IBM Corporation
Information Management
23
Insight and Approach to handle DB2 for Platform and Operating System Administrators
Scheduling DB2 scripts and jobs
Use root user crontab and ensure db2 profile is sourced Use db2 instance user level crontab
Configuration File for Hostname/IP Address
db2nodes.cfg #Located under the sqllib directory of instance home directory
Maintenance of DB2 log files
Never delete or modify the below directories or files# Database Transaction Log Files and Directories
E.g. : /db2data/db2inst1/NODE0000/SQL00001/SQLOGDIRE.g. : Files of pattern
# Database archival logs (unless asked by the DBA)E.g. : /db2data/archive_logsE.g. : Files of pattern
-
2012 IBM Corporation
Information Management
24
Insight and Approach to handle DB2 for Platform and Operating System Administrators
Monitoring DB2 using ITM agents to collect information as below
Applications with the highest percentage of failed SQL statements, sort overflows, lock timeouts and deadlocks, and the lowest buffer pool hit ratio
Buffer pool hit ratio by buffer pool, buffer pool hit ratio by database, average read and write times, asynchronous and synchronous I/O activity, extended store and non-buffer pool I/O activity
Databases with the highest percentage of failed SQL statements, the lowest buffer pool hit ratio, and the highest number of connections, lock timeouts, and deadlocks
Applications currently waiting for locks and other details about lock resources
Server key events, the number of server connections, the databases with the lowest buffer pool hit ratio, and applications with the highest percentage of failed SQL statements
Tablespaces
-
2012 IBM Corporation
Information Management
25
Insight and Approach to handle DB2 for Platform and Operating System Administrators
Backing up DB2 with TSM
Install the TSM API Client (32-bit/64-bit depending on the instance) Configure the dsm.sys and dsm.opt files Register the DB2 node at the TSM end Configure the DB2 userprofile Update the node password as root from DB2 end Test the connectivity from DB2 to TSM
Use the db2adutl utility for DB2-TSM activities
DB2 backups can be directly pushed to TSM using the db2 backup utility -
db2 backup db use tsm
DB2 Archival logs can also be configured to be pushed to TSM db2 update db cfg using LOGARCHMETH1 TSM
-
2012 IBM Corporation
Information Management
26
Insight and Approach to handle DB2 for Middleware Administrators
Check DB2 Version and Fixpack Level
On UNIXsu - db2level
On WindowsStart -> run -> db2cmddb2level
List all DB2 products (on UNIX only)
su - db2ls
-
2012 IBM Corporation
Information Management
27
Insight and Approach to handle DB2 for Middleware Administrators
Data Source Connections (JDBC Connectivity)
Driver Type Database Name Database Server Name Port Number
Database Error Log Files for troubleshooting
InstanceName.nfy db2diag.log db2 ? SQLERRN # For Interpreting SQL Codes
Checking Status of Database Server
ps ef | grep db2sysc Windows Services
-
2012 IBM Corporation
Information Management
28
DB2 References DB2 Information Center (for V9.7) http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp
Tivoi Monitoring for Databases http://pic.dhe.ibm.com/infocenter/tivihelp/v15r1/topic/com.ibm.itmfd.doc/main_db2.pdf
Backing Up DB2 with TSM http://www.redbooks.ibm.com/redbooks/pdfs/sg246247.pdf
-
2012 IBM Corporation
Information Management
29
Thank you
Acknowledgements C Balaraju, Technology Architect & Program Manager ([email protected])
IBM Redbooks IBM Information Center Data warehousing Basics and Concepts IBM Learning Material
-
2012 IBM Corporation
Information Management
30
Questions
Slide 1Slide 2DB2 Solution Life Cycle DB2 Platforms Considerations for a DB2 Environment Type of Data and Load on a DB2 Database Typical Problem Scenario Understanding of DB2 Front End and Backend Insight and Approach to handle DB2 Databases for : Platform and Operating System Administrators Middleware Administrators Useful Information for DB2 BeginnersSlide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 30Slide 29