Está en la página 1de 47

®

IBM Software Group

Troubleshooting Issues in Using


SQL/ODBC on WebSphere
DataPower SOA Appliances
Moses Allotey-pappoe, Carol Miller, Dominic Micale, Andrew Simmering, Alfred Williamson, Max Chang & Paul Megani
IBM WebSphere DataPower appliance L2 Support Engineers
7 December 2010

WebSphere® Support Technical Exchange


IBM Software Group

Agenda
 Introduction
 Summary of Part 1 of the 3 Part Series Presentation
 Summary of Part 2 of the 3 Part Series Presentation
 Troubleshooting Connectivity Issues
 Troubleshooting Processing Policy Issues
 SQL Endpoint Foundations
 MustGather Documents
 Have Exhausted all Resources …..What next?
 Summary
 Additional WebSphere Product Resources
 Questions and Answers

WebSphere® Support Technical Exchange 2 of 47


IBM Software Group

Introduction
 Part 3 of 3 part series on the DataPower SQL/ODBC
Component.

 Part 1 can be found at the following url:


http://www-01.ibm.com/support/docview.wss?uid=swg27019748

 Part 2 can be found at the following url:


http://www-01.ibm.com/support/docview.wss?uid=swg27020054

 Part 3 shall focus on the trouble-shooting and problem


determination in working with the DataPower SQL/ODBC
component.

WebSphere® Support Technical Exchange 3 of 47


IBM Software Group

Summary of Part 1 – SQL Data Source


 Licensed feature
 Requires the SQL-ODBC license
 Not available on all appliances.
 Available on the XI50, XB60 (included by default), and
XM70
 Provides the configuration to establish a direct connection to
a database instance on a remote data server.
 Allows for optional valid ODBC configuration parameters to
be defined.

WebSphere® Support Technical Exchange 4 of 47


IBM Software Group

Summary of Part 1: Supported Databases


 Connect to a remote database server.
 Supported database servers as of the 3.8.1 firmware
 DB2: all supported versions up to 9.5
 Microsoft® SQL Server: all supported versions up to
2008
 Oracle: all supported versions up to 11g
 Sybase: all supported versions up to 15

WebSphere® Support Technical Exchange 5 of 47


IBM Software Group

Summary of Part 1: SQL/ODBC Usage


 Dynamically perform database operations such as
 SQL statements (SELECT, INSERT, UPDATE, DELETE,
XQueries)
 Stored Procedures
 Used by:
 SQL action in a processing policy
 Custom stylesheet
• dp:sql-execute() extension function
• <dp:sql-execute> extension element

WebSphere® Support Technical Exchange 6 of 47


IBM Software Group

Summary of Part 2 - The SQL Data Source


Object:
 Evolution of the SQL Data Source Object
 Connect to a remote database server.
 Can be used by the following services:
 Web Application Firewall
 XML Firewall
 Multi-Protocol Gateway
 Web Service Proxy
 Cannot be used in the front-end or backend of a service.
 Can be used in the Processing Rules:
 request, response, and error rule.
 Location of the SQL Data Source object
 WebGUI – Network -> SQL Data Source

WebSphere® Support Technical Exchange 7 of 47


IBM Software Group

Summary of Part 2 - SQL/ODBC Data


Source: Usage
 The SQL Data Source object Configuration

 The SQL Action

 The dp:sql-execute Extension Function

 The dp:sql-execute Extension Element

WebSphere® Support Technical Exchange 8 of 47


IBM Software Group

Summary of Part 2 - SQL/ODBC Data


Source: Limitations
 Lack of strong security (SSL)
However with that being said you can employ
the sql-injection-filter or encrypt the data with
the encrypt action on a processing rule.
You can wrap the database connection in an
SSL proxy profile to achieve an encrypted
database connection.
 Limited database vendor support.

WebSphere® Support Technical Exchange 9 of 47


IBM Software Group

Summary of Part 2 – Use Cases


 Use Cases
# 1 - Transaction data storage/retrieval
# 2 - Authentication/authorization
# 3 - Logging/auditing
# 4 - Batch processing
# 5 - Binary Processing

WebSphere® Support Technical Exchange 10 of 47


IBM Software Group

Troubleshooting SQL/ODBC related issues

 DataSource Connectivity issues


 SQL/ODBC processing issues
 SQL endpoint Fundamentals
 MustGather documents
 Exhausted troubleshooting resources. Now what
next?

WebSphere® Support Technical Exchange 11 of 47


IBM Software Group

SQL DataSource connectivity issues

 Preliminary checks.
 Troubleshooting tools.
 Multiple instances of database running on the
same server.
 Login failures
Connecting using a Windows®-Based User
account.
 Useful data for analysis

WebSphere® Support Technical Exchange 12 of 47


IBM Software Group

SQL DataSource connectivity issues -


Preliminary checks
 DataPower has ODBC license
CLI ‘show license’ command WebGUI
Control Panel -> Status -> Device Features

WebSphere® Support Technical Exchange 13 of 47


IBM Software Group

SQL DataSource connectivity issues -


Preliminary checks
 Installed firmware has ODBC library
CLI ‘show library’ command WebGUI
Control Panel -> Status -> Library Information

WebSphere® Support Technical Exchange 14 of 47


IBM Software Group

SQL DataSource connectivity issues -


Preliminary checks
 Ensure firewall rules are not contributing to this
issue.
Authentication requirements
Allowed IP addresses
Opened ports

WebSphere® Support Technical Exchange 15 of 47


IBM Software Group

SQL DataSource connectivity issues -


Preliminary checks Cont’ed
 Confirm connectivity can be established from
another device on the same network subnet to the
database server.
 Database server is listening on configured port
 Database configured with SSL
Add SSL Proxy Profile to XML Manager ->
User Agent if needed
 Ensure the correct user credentials are being used.

WebSphere® Support Technical Exchange 16 of 47


IBM Software Group

SQL DataSource connectivity issues -


Preliminary checks Cont’ed
 Ensure the domain in which the DataSource object is being
created is enabled
 Check domain status from default domain.

WebGUI - Administration -> Application Domain
 The database server has been configured to allow remote
access.
 No Access Control Restrictions on the device hosting the
database.
 Using IP address instead of hostname makes DataSource
come up
 Check DNS configuration

WebSphere® Support Technical Exchange 17 of 47


IBM Software Group

SQL DataSource connectivity issues -


Troubleshooting tools
 Ping test

CLI WebGUI
‘ping’ command Control Panel -> Troubleshooting page

WebSphere® Support Technical Exchange 18 of 47


IBM Software Group

SQL DataSource connectivity issues -


Troubleshooting tools Cont’ed
 TCP Connection Test

CLI WebGUI
‘test tcp-connection’ command Control Panel -> Troubleshooting page

WebSphere® Support Technical Exchange 19 of 47


IBM Software Group

SQL DataSource connectivity issues

 Multiple database instance running on the same server


 Check server logs
• What instance is the DataSource object trying to
connect to?
 Check if both instances are running on the same IP and
Port
• Configure the multiple instances to listen on different
ports
− Allows user credentials to access the correct
instance installed.

WebSphere® Support Technical Exchange 20 of 47


IBM Software Group

SQL DataSource connectivity issues – Login


failures
 Connecting using a Windows-Based User account:
Microsoft SQL
Ensure this authentication mode has been
enabled on the database server-side.
Check if you can connect from another client.
Ensure the DataPower device is in the same
domain as the database server.
Check server logs.

WebSphere® Support Technical Exchange 21 of 47


IBM Software Group

SQL DataSource connectivity issues

 Useful data for analysis:


DataPower system logs
Packet capture
• Is the connection being closed?
• Who is closing the connection?
• Why is the connection being closed?
Database server logs

WebSphere® Support Technical Exchange 22 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues
 Out of Memory
Request Message too Large
Response Message too Large
Client Load
 Handling of Special Characters

 User Agent Timeout

WebSphere® Support Technical Exchange 23 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues
 Mitigation Strategies Out of Memory

 Request message too large

 Addressed via the XML Manager

WebSphere® Support Technical Exchange 24 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues

WebSphere® Support Technical Exchange 25 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues
 Mitigation Strategies Out of Memory

Response message too large

Addressed via the SQL/ODBC Object

WebSphere® Support Technical Exchange 26 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues

WebSphere® Support Technical Exchange 27 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues
 Mitigation Strategies Out of Memory

Client load
• For example; several concurrent requests of
1 GB

 Addressed via a SLM Policy object or SLM


action on a processing rule to do shaping or
throttling

WebSphere® Support Technical Exchange 28 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues

WebSphere® Support Technical Exchange 29 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues

WebSphere® Support Technical Exchange 30 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues

WebSphere® Support Technical Exchange 31 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues
 Mitigation Strategies Handling of Special
Characters.
For example, Spanish characters are not
displaying correctly in viewing the Database
contents.
 Addressed via the SQL/ODBC object

 http://www-01.ibm.com/support/docview.wss?
uid=swg21446531

WebSphere® Support Technical Exchange 32 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues

WebSphere® Support Technical Exchange 33 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues
 Mitigation Strategies User Agent Timeout

Addressed via the User Agent.

WebSphere® Support Technical Exchange 34 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues

WebSphere® Support Technical Exchange 35 of 47


IBM Software Group

SQL/ODBC Trouble-Shooting
Processing Policy Issues
 Useful Data for Analysis

Multi-step Probe
DataPower system logs
Database server logs
Packet Capture (if needed)

WebSphere® Support Technical Exchange 36 of 47


IBM Software Group

DataPower SQL Foundations

 Each SQL datasource -> SQL endpoint maintans a dynamic pool of


connections to the database
 Connections are created as needed (up to the limit specified on the
datasource)
 Connections are periodically cleaned up if unused for a given amount of
time
 The connection creation / cleanup activities are transparent to the user
and should not cause serious interruption

WebSphere® Support Technical Exchange 37 of 47


IBM Software Group

DataPower SQL Foundations


 SQL DataSource object can be in one of 3 states: Up, Pending, or Down
 There are error conditions that will cause the SQL endpoint to restart
(along with all its worker connections) --> datasource object is set to
"Pending”
 network connection interruption to the database
 maximum amount of manageable load exceeded
 DB refuses a connection from the endpoint due to excessive load

WebSphere® Support Technical Exchange 38 of 47


IBM Software Group

DataPower SQL Foundations:


External health checks
 SQL endpoint is not notified of network connection issues when they
occur
 Problem will be detected only when a new SQL transaction is
attempted and fails
 Health check could detect problem earlier, enabling a switch to an
alternate datasource or, ideally, a connection fix before real
transactions fail
 Health checking the IBM® WebSphere DataPower SOA Appliance
and its services technote:
http://www-01.ibm.com/support/docview.wss?uid=swg21418648

WebSphere® Support Technical Exchange 39 of 47


IBM Software Group

DataPower SQL Foundations:


What is excessive load?

 This is not a hard number and varies a lot depending on the environment.

 All software and hardware has a breaking point; when the datasource goes
pending you've passed that point. No device can handle infinite load.

 SQL/ODBC component improvements in throughput and error handling were


added to the 3.8.1 release as a part of an ongoing effort to improve the
product

WebSphere® Support Technical Exchange 40 of 47


IBM Software Group

DataPower ODBC MustGathers:


 There is a new MustGather document for 3.8.1 and above:
 http://www-01.ibm.com/support/docview.wss?
rs=2362&uid=swg21447477
 Debug logging is much more detailed
 It also has a much bigger impact on performance
 Tracing can be added on the "Data Source Configuration
Parameters" tab:
• Set Name field to “TraceFile” (required name)
• Set Value field to a file URL such as logtemp://MyFile.trace

WebSphere® Support Technical Exchange 41 of 47


IBM Software Group

DataPower ODBC MustGather, cont’d:


 Older versions have a simpler MustGather technote but can
provide less data:
 http://www-01.ibm.com/support/docview.wss?
rs=2362&uid=swg21419675

 In both cases, be aware that we may need data from


DataPower, from the DB server, or from the network to get a
complete picture.
 Packet captures are often needed.

WebSphere® Support Technical Exchange 42 of 47


IBM Software Group

What next? (If your resources are


exhausted...)
 Time to contact Support!
 (Send us the MustGather output)
 Sometimes the above troubleshooting methods do not yield a
clear result
 If needed, we can collaborate with Engineering; it may be
appropriate to create a special, instrumented (debug) build
 Debug builds can generate info files which capture additional
data, if you can recreate the error while it's running

WebSphere® Support Technical Exchange 43 of 47


IBM Software Group

Summary
 The presentation is part 3 of a 3 part technical exchange. During this
presentation we explored the following:

 Quick Review of the Part 1 & Part 2 Presentations

 Troubleshooting Connectivity issues

 Troubleshooting Processing Policy issues

 SQL endpoint Foundations

 MustGather documents

 What next?

WebSphere® Support Technical Exchange 44 of 47


IBM Software Group

Additional WebSphere Product Resources


 Learn about upcoming WebSphere Support Technical Exchange webcasts, and access
previously recorded presentations at:
http://www.ibm.com/software/websphere/support/supp_tech.html

 Discover the latest trends in WebSphere Technology and implementation, participate in


technically-focused briefings, webcasts and podcasts at:
http://www.ibm.com/developerworks/websphere/community/
 Join the Global WebSphere Community:
http://www.websphereusergroup.org
 Access key product show-me demos and tutorials by visiting IBM Education Assistant:
http://www.ibm.com/software/info/education/assistant

 View a webcast replay with step-by-step instructions for using the Service Request (SR)
tool for submitting problems electronically:
http://www.ibm.com/software/websphere/support/d2w.html
 Sign up to receive weekly technical My Notifications emails:
http://www.ibm.com/software/support/einfo.html

WebSphere® Support Technical Exchange 45 of 47


IBM Software Group

We Want to Hear From You!


Tell us about what you want to learn

Suggestions for future topics


Improvements and comments about our webcasts
We want to hear everything you have to say!

Please send your suggestions and comments to:


wsehelp@us.ibm.com

WebSphere® Support Technical Exchange 46 of 47


IBM Software Group

Questions and Answers

WebSphere® Support Technical Exchange 47 of 47

También podría gustarte