Session: E01 E02 What Every DBA Should Know About Dynamic SQL

Size: px
Start display at page:

Download "Session: E01 E02 What Every DBA Should Know About Dynamic SQL"

Transcription

1 Session: E01 E02 What Every DBA Should Know About Dynamic SQL Suresh Sane DST Systems, Inc. Mon, Oct 2, :15 am -12:15 pm Mon, Oct 2, :30 pm 2:30 pm Platform: z/os A DBA depressed with Dynamic SQL? Do you manage PeopleSoft, SAP or Siebel? Want to know how caching really works? What tuning knobs do you have at the system and application level? Are there holes in your implementation of security? How do you prevent run-away queries before they create havoc? We will cover these and a wide array of challenges you must face when dealing with Dynamic SQL. This session will empower you with all the tools you need to tame the Dynamic SQL beast. In this session, which includes the latest V8 information, you will learn not only how to cope with Dynamic SQL, but how to exploit it fully. 1

2 Suresh Sane About the Instructor Co-author-IBM Redbooks SG , May 2002 SG , March 2004 SG , July 2006 Educational seminars IDUG Orlando, Denver and Toronto Various presentations at IDUG North America and IDUG Asia Pacific IDUG Solutions Journal article Winter 2000 Numerous DB2 courses at various locations IBM Certified Solutions Expert for both platforms for Application Development and Database Administration 2 Suresh Sane works as a Database Architect at DST Systems in Kansas City, MO. He provides strategic direction for deployment of database technology at DST and has overall responsibility for the DB2 curriculum for about 1,500 technical associates. Contact Information: sssane@dstsystems.com Suresh Sane DST Systems, Inc Broadway Kansas City, MO USA (816)

3 About DST Systems DST is a leading provider of computer software solutions and services. Highlights Financial Services Mutual Fund shareholder recordkeeping Corporate Securities & Processing 100M+ accounts 28M accounts Automated Work Distributor 85K workstations Output Solutions Customer Management Literature distribution Software, billing, output for cable, telephone, satellite and utilities 2.1B packages annually 40% of US cable households 3 If you have ever invested in a mutual fund, have had a prescription filled, or are a cable or satellite television subscriber, you may have already had dealings with our company. DST Systems, Inc. is a publicly traded company (NYSE: DST) with headquarters in Kansas City, MO. Founded in 1969, it employs about 12,000 associates domestically and internationally. The three operating segments - Financial Services, Output Solutions and Customer Management - are further enhanced by DST s advanced technology and e-commerce solutions. 3

4 Session Outline What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 4 We will first build a business case for dynamic SQL and introduce various challenges you must face. Then, we will deal with the DBA tuning knobs to make dynamic SQL hum. 4

5 Disclaimer Content Warning! While every effort has been made to provide a balanced view, this presentation contains facts and opinions. Your mileage may vary! 5 While the opinions are based on research, some personal bias most likely exists. Your shop s environment is different and the suggested actions may not be appropriate for your needs. 5

6 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 6 Let us begin with an elementary discussion of what dynamic SQL is. It turns out that it is not that easy to define. 6

7 What is Dynamic SQL? Coding View Static SQL SQL statement or SQL statement string is hard-coded in an application program Text may be stored in a program variable Text may be coded in a DECLARE CURSOR statement Statement is visible in the program When SQL changes, program must be compiled and linked Dynamic SQL Statement text is provided or assembled at execution time User enters statement (e.g. QMF, SPUFI) User marks fields on a screen Statements are built and prepared at runtime Allows many different statements to be executed without having to compile and link-edit 7 Looking at dynamic SQL from a coding perspective. 7

8 What is Dynamic SQL? Execution View Static execution mode Pre-compiler generates DBRM DBRM is bound into an executable package or plan Statement strings and related access paths Package or plan is executed without additional preparation Dynamic execution mode SQL statements not bound before execution, but prepared at runtime No plan or package exists All statements executed by callable interfaces (e.g. ODBC, JDBC, REXX) are considered dynamic SQL and are prepared by DB2 at execution time Even if hardcoded in the program 8 And looking at it from an execution perspective. 8

9 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 9 We now present a business situation where the use of dynamic SQL is justified along with some of the design considerations and challenges that accompany it. 9

10 When is Dynamic SQL Appropriate? Example Training record keeping system where the user can retrieve training history based on at least one, or a combination of, the following pieces of information: Last name First name Employee ID Department number Supervisor ID Course ID Date range 10 A simple example of a generic search screen where a user may enter any or all of the search criteria. 10

11 When is Dynamic SQL Appropriate? Alternatives Static SQL with cursors for each of 127 combinations (without considering sort order) 7 with exactly one value entered 21 with exactly two values entered etc. Requires: 127 DECLAREs 127 OPENs 127 FETCHes 127 CLOSEs 11 (7 variations with just 1 criterion, 21 with 2, 35 with 3, 35 with 4, 21 with 5, 7 with 6 and 1 with all 7). In general, n optional search fields lead to about 2**n (two the power n) variations a number that grows exponentially, not linearly. With 16 search criteria, we are up to 32K! If you take the various ordering of data that may be requested, the number increases even more dramatically. Only a small number of optional fields, therefore, leads to an astronomical number of variations that would need to be managed. 11

12 When is Dynamic SQL Appropriate? Alternatives Static SQL with generic search criteria SELECT... FROM TRAINING_HISTORY WHERE LASTNAME BETWEEN :LO-LAST AND :HI-LAST AND FIRSTNAME BETWEEN :LO-FIRST AND :HI-FIRST AND EMPLOYEE_ID BETWEEN :LO-EMPID AND :HI-EMPID AND DEPT_NBR BETWEEN :LO-DEPT AND :HI-DEPT AND SUPERVISOR_ID BETWEEN :LO-SUPV AND :HI-SUPV AND COURSE_ID BETWEEN :LO-COURSE AND :HI-COURSE AND CLASS_DATE BETWEEN :LO-DATE AND :HI-DATE 12 Sequencing the data needs to be handled with another process, or not handled at all. Host variables are populated based on what the user enters. If the user enters a specific department number, then :LO-DEPT and :HI-DEPT both contain that value, thereby making the predicate an equal to condition. All of the other host variables would be set to permissible minimum and maximum values for the respective data type and column size. Typically, performance of such a query is poor, except in cases where the user specifies the columns that correspond to the index chose by the optimizer (at bind time!) or when REOPT(VARS) is specified. 12

13 When is Dynamic SQL Appropriate? Mix and Match? Combine static and dynamic SQL in the same program Consider coding static SQL for the most common SQL requests Default to dynamic SQL for all other unpredictable requests Best of both worlds!! 13 Using the rule, we can get the performance of static SQL without giving up the flexibility of dynamic SQL. 13

14 When is Dynamic SQL Appropriate? A Few Things to Consider Flexibility Complexity Performance Non-uniform distribution statistics (NUDs) Security Access path determination Preventing a runaway query Impact analysis REOPT(VARS)/REOPT(ONCE) (V8) Catalog statistics Auditing Portability 14 Some of the issues we need to consider. We will discuss each of these in the following slides. 14

15 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 15 Let us step into the developer s shoes for a brief moment. We will use a simple COBOL example to illustrate. This session is not about coding, but you will likely deal with programmers who turn to you for help! 15

16 A Glimpse of Dynamic SQL Development Variations of Dynamic SQL Statements Non-SELECT without parameter markers Non-SELECT with parameter markers Fixed-list SELECT without parameter markers Fixed-list SELECT with parameter markers Varying-list SELECT without parameter markers Varying-list SELECT with parameter markers 16 From the perspective of developing applications containing dynamic SQL, you need to be aware of three basic variations: non-select statements (e.g. INSERT, UPDATE, DELETE), fixed-list SELECT statements (i.e. the list of selected columns is known) and varying-list SELECT statements (i.e. the list of selected columns is not known). For each basic variation, the presence or absence of parameter markers (loosely corresponding to host variables in static SQL) requires some additional steps, leading to the 6 variations shown above. 16

17 A Glimpse of Dynamic SQL Development SELECT LASTNAME,FIRSTNME,SALARY FROM DSN8710.EMP WHERE LASTNAME LIKE? AND SALARY >? Variable number of Columns selected Variable number of predicates 17 Let s follow the programming tasks involved in preparing a dynamic SQL statement shown above with an arbitrary number of columns selected (3 in this case) and an arbitrary number of parameter markers (2 in this case). This is the most complex of the 6 variations discussed before. 17

18 A Glimpse of Dynamic SQL Development Varying-list SELECT with Parameter Markers Include SQLCA Build SQL statement Yes Prepare into SQLDA Combine prepare and describe? Acquire storage to hold 1 row Place storage addresses in SQLDA Populate host variables corresponding to parameter markers Open cursor using host variables No Prepare statement Describe statement Include SQLDA to receive values Declare cursor Fetch cursor End of cursor? Yes Close cursor No Process row Handle errors 18 The steps involved in making this happen. 18

19 A Glimpse of Dynamic SQL Development PARM-SQLDA as populated by the program SQLDAID SQLDABC SQLN SQLD SQLDAID Varltype, Not Null *100 Length Max Actual SQLTYPE SQLLEN SQLDATA SQLLIND SQLNAMEL SQLNAMEC Pointer Pointer N/A N/A Pointer Pointer N/A N/A Decimal Nullable 256 * (precision 9, scale 2) 19 SQLDABC: This must be 16 bytes (header) + 44 bytes for each occurrence based on SQLN. SQLN: Max number of parameter markers in this case, we assume 100. SQLD: Actual number of parameter markers in this case, 2. SQLTYPE: See appendix C of SQL Reference for details. SQLLEN: Length for decimal columns it must contain the precision and scale as shown. SQLDATA: Pointer to the host variable SQLLIND: Pointer to the indicator variable 19

20 A Glimpse of Dynamic SQL Development RECEIVING-SQLDA as populated by DB2 SQLDAID SQLDABC SQLN SQLD SQLDAID SQLTYPE SQLLEN SQLDATA SQLLIND SQLNAMEL SQLNAMEC Pointer Pointer 8 LASTNAME Pointer Pointer 8 FIRSTNME Pointer Pointer 6 SALARY 20 In addition to the variables populated as shown on the last slide, SQLNAMEL and SQLNAMEC contain the column length and name. SQLDATA and SQLIND now must point to where you want to fetch the data. 20

21 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 21 The most important consideration, from a performance perspective, is caching. We will discuss in detail the different types of caching, how you implement them and what tuning knobs you turn to benefit from it fully. 21

22 Dynamic Statement Caching Confused by the Caching Conundrum? 22 This section will cut through the hype and present a clear explanation of how caching works. 22

23 Dynamic Statement Caching Levels of Caching Four different levels of dynamic statement caching: No caching Local caching Global caching Full caching (= Local + Global) 23 Four levels of caching. A vast majority of shops will likely use global caching (global only, not local) for internally developed applications but full caching if using one of the ERP products like PeopleSoft. 23

24 Dynamic Statement Caching No Caching Program A PREPARE S EXECUTE S SQLCODE=0 SQLCODE=0 Full Thread A Prepare Prepared statement S EXECUTE S Program B PREPARE S EXECUTE S COMMIT EXECUTE S PREPARE S EXECUTE S SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE= -514 or -518 SQLCODE=0 SQLCODE=0 Full Thread B Prepare Prepared statement S Invalidating prepared statements Prepared statement S Full Prepare 24 No sharing of statements across threads (each must do full prepare before using). Within a thread, a statement invalidated after a commit and must be prepared again. SQLCODE -514 (SQLSTATE 26501) for a cursor. SQLCODE -518 (SQLSTATE 07003) for a non-cursor THE CURSOR cursor-name IS NOT IN A PREPARED STATE -518 THE EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT 24

25 Dynamic Statement Caching Local Caching Program A PREPARE S SQLCODE=0 Full Thread A Prepare Prepared statement S EXECUTE S EXECUTE S Program B PREPARE S EXECUTE S COMMIT EXECUTE S SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE=0 Full Thread B Prepare Prepared statement S Invalidating prepared statements Statement text preserved Prepared statement S Full Prepare (Implicit) 25 The only real benefit is the ability to issue an EXECUTE without issuing a PREPARE (DB2 will take care of this for you) you still pay the price. Cache allocated in storage of each thread in DBM1 address space. Controlled by KEEPDYNAMIC bind option. A thread can issue a prepare once and use it across commits. After commit, implicit prepare by DB2. Application must be able to recognize that execute can get errors that normally occur during prepare. For DRDA clients, KEEPDYNAMIC(YES) causes early close of cursor. 25

26 Dynamic Statement Caching Global Caching Program A PREPARE S EXECUTE S EXECUTE S Program B PREPARE S EXECUTE S COMMIT EXECUTE S PREPARE S EXECUTE S SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE=0 SQLCODE= -514 or -518 SQLCODE=0 SQLCODE=0 Thread A Prepared statement S Thread B Prepared statement S Invalidating prepared statements Prepared statement S Full Prepare Short Prepare Short Prepare EDM Pool SKDS S 26 The main benefit comes from the ability to reuse a statement that has been prepared by another thread. Cache within EDM Pool of DBM1 address space. Activated by CACHEDYN=YES zparm. Can be in dataspace via zparm EDMDSPAC. Skeleton copy of prepared statement in cache. Unless local caching is active, directly issuing an execute is not possible must issue prepare first. 26

27 Dynamic Statement Caching Full Caching Program A PREPARE S SQLCODE=0 EXECUTE S SQLCODE=0 EXECUTE S SQLCODE=0 Program B PREPARE S SQLCODE=0 EXECUTE S SQLCODE=0 COMMIT SQLCODE=0 EXECUTE S SQLCODE=0 Thread A Prepared statement S Thread B Prepared statement S No effect on prepared statements Full Prepare Short Prepare Avoided Prepare EDM Pool SKDS S 27 This combines the two benefits (ability to issue an EXECUTE without PREPARE small impact) + (the ability reuse the statement prepared by another thread big impact). Activated by KEEPDYNAMIC(YES) bind parameter and zparm MAXKEEPD > 0 and zparm CACHEDYN=YES. No need to issue a prepare after a commit. Local cache uses FIFO algorithm. Global cache uses LRU algorithm. 27

28 Dynamic Statement Caching Different Prepare Types When using dynamic statement caching, four different types of prepare operations can take place: Full prepare No skeleton copy in global cache Short prepare Skeleton copy copied from global to local cache Avoided prepare Bypass need of short or full prepare since statement text and prepared statement found in local cache Implicit prepare Application using local caching issues execute, but prepare cannot be avoided (no global cache or gone from global cache or gone from local cache) DB2 issues prepare on behalf of the application (short or full) 28 Relative costs: Full = 100; Short = 1; Avoided = 0. Remember what IBM s Prem Mehra once said? The most efficient SQL is one that is not executed at all!. The avoided prepare is just that! 28

29 Dynamic Statement Caching Restrictions for Reuse Dynamic statement cache is used only when: Statement given to DB2 is 100% the same At prepare time, same ATTRIBUTES have been used Statement does not come from private protocol source Auth ID used to prepare statement and cache it is the same auth ID that retrieves the statement from the cache for reuse Plan or package is bound with identical parameters Special registers (e.g. CURRENT DEGREE, CURRENT RULES, etc.) are the same at prepare time Declared cursor characteristics match Parser options (e.g. APOST vs. QUOTE) are the same This matters when DYNAMICRULES(RUN) and (BIND) are run on the same system Parallelism is disabled by RLF for thread that cached the statement, and parallelism is disabled for thread that is searching the cache 29 Most of these do not change from one execution to the next, but two that are worth emphasizing are the text and the auth ID. The text must match exactly (trailing blanks are not removed!). However, beware of program like DSNTEP2 that strip trailing blanks. In itself, this is good, but if you purposely add a few blanks to force a new access path, you will not get one since the statement will end up with an identical text. When using secondary auth IDs, the auth ID seen by DB2 is usually a common ID. But remember that a query run by user A that is later run by user B will not benefit from caching if the auth IDs are different. 29

30 Dynamic Statement Caching Invalidation Cached statements are invalidated or removed from either global cache or local cache. Invalidated from global cache when: No free pages are available in the EDM pool DROP, ALTER, or REVOKE is executed for object(s) on which the plan depends RUNSTATS is executed for object(s) on which the plan depends 30 Also see section on V8 for latest enhancements a new option of RUNSTATS. 30

31 Dynamic Statement Caching Invalidation Invalidated from local cache when: MAXKEEPD is exceeded Statement ID is reused by a prepare operation DROP, ALTER, or REVOKE is executed for object(s) on which the plan depends ROLLBACK and re-signon are executed RUNSTATS is executed for object(s) on which the plan depends 31 The issue of reusing the statement ID seems trivial but is easy to overlook. For example, an application that always prepares a statement as S1 will never benefit from local caching. Each prepare will destroy the cache from the previous execution. 31

32 Dynamic Statement Caching Impact of Bind Options Bind options that behave differently when dynamic statement cache is active: REOPT(VARS) applications can run in CACHEDYN=YES systems, but their statements are not cached. REOPT(VARS) is incompatible with KEEPDYNAMIC(YES) and produces a bind error. RELEASE(DEALLOCATE) does not apply to dynamic SQL statements on systems where statement caching is not used, or only partially used. Locks acquired by dynamic SQL statements are released at commit. RELEASE(DEALLOCATE) applies to dynamic SQL statements if full caching is used. 32 Important considerations for bind options. In general REOPT(VARS) and caching are in conflict with each other (i.e. how can you have a custom-made access path and still not pay to have it built just for you?). 32

33 Dynamic Statement Caching Caching in a Distributed Environment If no prepare after commit, Package at the DB2 for z/os server must be bound with KEEPDYNAMIC(YES). If both requestor and server are DB2 for z/os, KEEPDYNAMIC value of the requestor is honored. Possible KEEPDYNAMIC performance implications for DRDA clients using WITH HOLD cursors: KEEPDYNAMIC(NO) A separate network message is required when the DRDA client issues a CLOSE for a WITH HOLD cursor. KEEPDYNAMIC(YES) The DB2 for z/os server automatically closes the cursor when SQLCODE +100 is detected. When a distributed thread has touched any package that is bound with KEEPDYNAMIC(YES), the thread cannot become inactive. 33 Impact of KEEPDYNAMIC in a distributed environment. 33

34 Dynamic Statement Caching Dynamic Statement Caching Summary CACHEDYN NO YES KEEPDYNAMIC NO YES No skeletons cached in EDMP Only full prepares No prepared statements kept across commits (note 1) No statement strings kept across commits (note 3) No skeletons cached in EDMP Only full prepares No prepared statements kept across commits (note 1) Stmt strings kept across commits implicit prepares Skeletons cached in EDMP 1st prepare full; others short (note 2) No prepared statements across commits (note 1) No statement strings kept across commits (note 3) Skeletons cached in EDMP 1st prepare full; others short (note 2) Prepared stmts across commits Stmt avoided strings prepares kept across (note 4) commits implicit prepares 34 The differences show up as: Is skeleton cached? What is the type of PREPARE? Is the prepared statement kept across a commit? Is the statement string kept across a commit? Note 1: unless a cursor WITH HOLD is open Note 2: unless invalidated or flushed out due to LRU Note 3: SQLCODES 514 or 518 result Note 4: assuming MAXKEEPD > 0 34

35 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 35 In this section we discuss some important ZPARMS to manage the system resources including the dynamic statement cache and the resource limit facility (RLF) - which is covered later. 35

36 Controlling System Resources Statement Caching Controlling local cache storage Amount of local storage used by locally cached dynamic statements can be controlled by the following DSNZPARMs: MAXKEEPD Applies to full caching FIFO managed Is approximate (actual number may exceed) CONSTOR Provides management of local thread DBM1 storage MINSTOR Provides management of fragmentation of local thread DBM1 storage Performance vs. memory utilization 36 Parameters to manage size and operation of the local cache: MAXKEEPD: Local cache can take up approx. 10 KB per statement per thread. Applies to statements kept only when full caching is in effect. For applications with infrequent commits, actual max can be greater. Default 5,000; max 65K Value = 0 does not mean no local caching. CONSTOR: When set to YES, DB2 looks at each thread at commit to see if contraction can occur based on either of: # of commits > 50 since last contraction Total thread storage > 2 MB MINSTOR: Controls fragmentation, consider setting to YES if needed. 36

37 Controlling System Resources Statement Caching Global cache storage in EDM pool which contains: Cursor tables (CTs), package tables (PTs) and database descriptors (DBDs) in use Skeleton cursor tables (SKCTs) for the most frequently used applications Skeleton package tables (SKPTs) for the most commonly used applications Database descriptors (DBDs) referred by these applications Cache for plans that use cache Those bound with CACHESIZE > 0 Skeletons (SKDS) for the most frequently used dynamic SQL statements 37 The EDM pool contains several other components, and a strategy to manage the EDM pool must also focus on these aspects (which should be part of normal monitoring and tuning without dynamic SQL). 37

38 Controlling System Resources Statement Caching Controlling global cache storage (EDM pool) Sizing the global statement cache See notes for estimation formula Using dataspace for global statement caching Consider only if DBM1 is close to 2GB limit (thru V7) See section on V8 no longer in V8 Controlling the DBD size Keep it a manageable size EDMBFIT Best fit vs. best performance 38 Cachesize can be estimated as: # of plans with dynamic SQL * average size of prepared stmt * number of stmts used repeatedly + Average size of prepared stmt * # of ad hoc stmts used only once Here, the average size of prepared stmt is generally 1.8 KB for the first table and 0.2 KB for each additional table. (Use these as a rule-of-thumb only.) Consider dataspaces only if DBM1 is close to 2 GB limit. DBD size based on # of tables (e.g. 50 tables with 200 columns = 150 KB). Run REORG and MODIFY frequently. EDMBFIT: Choice of first fit (better performance) or best fit (better storage optimization). 38

39 Controlling System Resources Other DSNZPARMs Resource Limit Facility (RLF) Parameter defaults to control the RLF at installation time: RLF Auto start (Yes or No) RLFAUTH Auth ID RLFTBL Table suffix (DSNRLSTnn) RLFERR Default action for local connections (nolimit, norun, nn) RLFERRD Same for remote connections 39 Parameters that control the start up options for the Resource Limit Facility (RLF). See the section on Governing for details on the structure and contents of the RLF. 39

40 Controlling System Resources Other DSNZPARMs Default DSNZPARM for DYNAMICRULES: When DYNRULES(YES), the following defaults are affected: DECIMAL POINT STRING DELIMITER SQL STRING DELIMITER MIXED DATA DECIMAL ARITHMETIC When DYNRULES(NO): Values of precompiler options are used 40 Remember that setting the value of the DYNRULES ZPARM to YES impacts the programming options. These may be different from the options specified in the precompiler. 40

41 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 41 In this section, we focus on those aspects of concurrency that are related to dynamic SQL. These span various issues such as caching and the impact of isolation levels on ambiguous cursors. 41

42 DBD Locks Locking and Concurrency Without global statement caching DML SQL statements acquire an S-lock on the database descriptor (DBD) With global statement caching No database descriptor (DBD) lock is acquired for short PREPAREs 42 Impact of caching on DBD locks. Not only does caching improve performance, it also improves the concurrency by not requiring an S-lock on the DBD. 42

43 Locking and Concurrency Ambiguous Cursors Definition A cursor is considered ambiguous when DB2 cannot determine if the cursor is read-only or updateable. The presence of any dynamic SQL statement results in an ambiguous cursor because DB2 cannot detect subsequent logic in the program. CURRENTDATA Local access Remote access 43 Local: When CURRENTDATA(YES), current row cannot be changed; it is ignored when parallelism is active Remote: impacts isolation levels RR, RS, CS when CURRENTDATA(NO) block fetching is on and current row can be changed; UR always uses block fetching. 43

44 Locking and Concurrency Lock Avoidance Factors Cursor Type ISOLATION and CURRENTDATA UR and N/A READ N/A UPDATE --- AMBIGUOUS --- CS and YES CS and NO RS and N/A RR and N/A Avoid locks on returned data Avoid locks on rejected data 44 RETURNED data = data qualified (row selected) REJECTED data = data not qualified (row not selected) This discussion applies to static as well as dynamic SQL. 44

45 Locking and Concurrency RELEASE(DEALLOCATE) Normally applies to static SQL only Applies to dynamic SQL if global caching is used Demotion of a gross lock occurs if: DB2 acquires lock due to lock escalation Application issues a LOCK TABLE statement Application issues a mass delete Demotion cannot occur if: Tablespace LOCKSIZE is tablespace Segmented tablespace LOCKSIZE is table Gross locks acquired due to isolation level RR Gross lock acquired on tablespace started for read-only Lock was held for static SQL 45 Locks on tablespaces, tables and partitions (called gross locks) generally apply to static SQL only, but they also apply to dynamic SQL when global caching is used. DB2 tries to demote such locks at commit but cannot in some cases, as shown above. Note: RELEASE(DEALLOCATE) applies to all packages containing static and dynamic statements regardless of KEEPDYNAMIC value. So, a copy of the package table (PT) is not released from the EDM pool and must be reloaded each time after a commit. This is generally not an issue, but can cause performance issues when using AUTOCOMMIT(YES) which commits each transaction in a JDBC/ODBC environment. 45

46 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security What is new with V8? Summary 46 In this section we will discuss how you can control the resources consumed by dynamic SQL. By using the Resource Limit Facility (RLF) wisely, you can prevent runaway queries and be able to do so in a proactive manner if you choose. We will cover the structure of the RLF and provide realistic business examples. 46

47 Governing RLF (Resource Limit Facility) AUTHID Auth ID PLANNAME Name of plan ASUTIME Processor service units LUNAME Name of originating location RLFFUNC How row is used RLFBIND Bind permitted? RLFCOLLN Collection ID RLFPKG Program name RLFASUERR Error threshold (category A only) RLFAUWARN Warning threshold (category A only) RLF_CATEGORY_B Category (action for category B) Activate by issuing: START RLIMIT ID = nn 47 Since this table contains a variety of different things in it, it is hard to understand its purpose without looking at some examples (see next few slides). Note that LUNAME value of blank does not apply to all locations but local requests only. A value of PUBLIC applies to all locations. ASUTIME does not need to be changed after an upgrade since a more powerful processor means less CPU seconds but the same amount of work. 47

48 Governing Reactive RLFFUNC ASUTIME blank 2 null nnnnn 0 or <0 Reactive governing of S/I/U/D statements by plan name Reactive governing of S/I/U/D statements by package or collection No limit Service units Disable all dynamic S/I/U/D statements 48 Other values of RLFFUNC: 1 Reactive governing of BIND 3 Disable query I/O parallelism 4 Disable CPU parallelism 5 Disable sysplex parallelism 48

49 Governing Predictive RLFFUNC RLFASUERR RLFASUWARN 6 7 nnnnn null 0 or <0 nnnnn null 0 or <0 Predictive governing of S/I/U/D statements by plan name Predictive governing of S/I/U/D statements by package or collection Service units threshold for category A No error threshold All dynamic S/I/U/D statements receive SQLCODE 495 (SQLSTATE 57051) Service units threshold for category A No warning threshold All dynamic S/I/U/D statements receive SQLCODE +495 (SQLSTATE 01616) 49 For category B - RLF_CATEGORY_B values: blank = allow (default) Y = allow N = disallow, return 495 W = prepare and issue +495; then application decides 49

50 Governing Predictive Prepare Cost Cat=A? N Y SQLCODE -495 Y Cost > W N RLF_CAT_B RLFASUERR? N Y or Blank SQLCODE +495 (Appl Decides) Y Cost > RLFASUWARN? SQLCODE +495 Appl Decides Execute SQLCODE The cost category is A when DB2 can estimate the cost accurately (statement contains literals only) and B when it cannot (host variables, no RUNSTATS, UDFs, triggers or referential integrity). 50

51 Governing Combining Predictive and Reactive Prepare Cost Cat=A? N SQLCODE -495 Y Y Cost > RLFASUERR? W RLF_CAT_B Blank or Y N SQLCODE +495 Appl Continues Y Cost > RLFASUWARN? SQLCODE +495 Appl Cont s Execute SQLCODE -495 SQLCODE -905 Y Cost > ASUTIME? N Continue 51 This behaves just like predictive governing discussed before with the additional check during execution to see that the threshold is not exceeded. 51

52 Governing Qualifying Rows in the RLF DB2 attempts to find the closest match to find applicable limit Search order: Exact match Auth ID Plan name, or collection ID + package name LU name No match If none or error, use RLFASUERR value. 52 If you plan to use multiple rows, it is strongly recommended that you use unique values for ASUTIME (e.g. instead of 3 rows with a value of (say) 800 make them unique like 800, 801, 802, 803 etc). This helps pinpoint which row caused the action to be taken. Also note that wildcarding is not permitted (e.g. entering PAY% in the program name will not govern all payroll programs like PAYPGM01, PAYPGM02 etc.). In the examples that follow, we will assume we are using packages. We will also assume a value of 20,000 as the number of service units per CPU second. (This value depends on your processor speed. See z/os V1R1.0 MVS Initialization and Tuning Guide, SA for details, or just ask your SYSPROG!) Recommendation: Do not attempt to fine tune the ASUTIME value. The estimate can vary widely, and it should be used only to control a true runaway query. 52

53 Governing Case 1 Predictive Governing Suresh - When executing any package in the HR collection, produce warning if estimated cost exceeds 5 CPU seconds. Do not allow to run at all if estimated cost exceeds 8 seconds. (Do not allow any host variables.) 1 SURESH - 7 HR N # AUTHID PLANNAME RLFPKG ASUTIME LUNAME RLFFUNC RLFCOLLN RLFASUERR RLFASUWARN RLF_CATEGORY_B 53 This table shows how the business requirements specified can be implemented using the Resource Limit Facility (RLF). Suresh, when executing any program in the HR collection, gets: SQLCODE 0 if the estimated cost is less than service units SQLCODE +495 (SQLSTATE 01616) if the estimated cost exceeds service units but less than service units SQLCODE 495 (SQLSTATE 57051) if the estimated cost exceeds service units (Note that any host variables will cause a -495 since RLF_CATEGORY_B is set to N.) 53

54 Governing Case 2 Reactive Governing Kathy - When executing package PGM1 in the PAY collection, no involvement before execution. If actual execution takes more than 10 CPU seconds, execution should be terminated. 2 KATHY PAY PGM1 - - # AUTHID PLANNAME RLFPKG RLFASUERR ASUTIME RLFASUWARN LUNAME RLFFUNC RLF_CATEGORY_B RLFCOLLN 54 This table shows how the business requirements specified can be implemented using the Resource Limit Facility (RLF). Kathy, when executing program PGM1 in the PAY collection, gets: SQLCODE 0 if the actual cost is less than service units SQLCODE -905 (SQLSTATE 57014) if the actual cost exceeds service units 54

55 Governing Case 3 Combined proactive + reactive Dave - When executing package PGM2 in the GL collection, produce warning if estimated cost exceeds 5 CPU seconds. Do allow to run at all if estimated cost exceeds 8 seconds. (Allow use of host variables.) If actual execution take more than 10 seconds, execution should be terminated. 3 DAVE - 7 GL PGM W 4 DAVE GL PGM2 - - # AUTHID PLANNAME RLFPKG ASUTIME RLFASUERR LUNAME RLFASUWARN RLFFUNC RLF_CATEGORY_B RLFCOLLN 55 This table shows how the business requirements specified can be implemented using the Resource Limit Facility (RLF). Dave, when executing program PGM2 in the GL collection, gets: SQLCODE 0 if the estimated cost is less than service units SQLCODE +495 (SQLSTATE 01616) if the estimated cost exceeds service units but less than service units SQLCODE 495 (SQLSTATE 57051) if the estimated cost exceeds service units (Note that any host variables will cause a +495 since RLF_CATEGORY_B is set to W.) SQLCODE 905 (SQLSTATE 57014) if the actual cost exceeded regardless of how it was executed (no warning, warning followed by application deciding to continue) 55

56 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 56 In this section, we will discuss how you can obtain information about the access path of an SQL statement and what metrics are important to collect and analyze to make sure that the dynamic SQL is running properly. This includes monitoring how well caching is working. We will keep the discussion generic in nature without referring to a specific monitor from a specific vendor. Almost all monitors that I have worked with provide the information you need only the format is different. 56

57 EXPLAINing, Tracing and Monitoring Using Visual Explain 57 Input can be free-form SQL, package or plan as well as a cached dynamic SQL statement (V8). When explain from cache, it provides the access path currently in use (i.e. it does not re-explain the statement which could generate a different access path). 57

58 EXPLAINing, Tracing and Monitoring Monitoring Thread Detail Information relevant to dynamic SQL Total DML (SELECT, INSERT, UPDATE, DELETE) Prepare (QXPREP number of explicit PREPARE requests) Describe Describe table Open Fetch Close Note: EXECUTE IMMEDIATE is not counted towards total PREPAREs 58 At the thread level, the important counters to note are the number of PREPAREs and DESCRIBEs issued. Note that even though an EXECUTE IMMEDIATE issues a PREPARE under the covers, it is not reported under the PREPARE count. 58

59 EXPLAINing, Tracing and Monitoring Monitoring Thread Detail for Caching Counters related to caching include: QXSTNFND Not found in cache QXSTFND Found in cache QXSTIPRP Implicit PREPAREs QXSTNPRP PREPAREs avoided QXSTDEXP Statement invalid (MAXKEEPD) QXSTDINV Statement invalid (DDL) 59 Some of the counters to look out for. Ideally a low number should be present for not found in cache and the number of invalidations should be zero. 59

60 EXPLAINing, Tracing and Monitoring Monitoring EDM Pool Ratios to monitor DBD hit ratio (%) CT hit ratio (%) PT hit ratio (%) Counters to monitor QISEDSC Pages used for dynamic SQL cache QISEDPGE Pages in EDM pool data space QISEDFRE Free pages in data space free chain QISEDFAL Failures due to data space full 60 The ratios measure the percentage of times a request could be specified using the EDM Pool. Ideally all ratios should be close to 100%, but a realistic target is about 95% to 99%. Failures should ideally be zero. 60

61 EXPLAINing, Tracing and Monitoring Monitoring SQL Number of PREPARE requests Number of full PREPAREs Number of short PREPAREs Global cache hit ratio (%) = Number of short PREPAREs Number of short PREPAREs + Number of full PREPAREs x The global cache hit ratio ideally close to 100% (95%-99% is realistic goal). Besides the size of the cache, excessive use of literals or a security scheme that uses individual auth IDs could be the reason for a low number (see section on dynamic statement caching). 61

62 EXPLAINing, Tracing and Monitoring Monitoring SQL Implicit PREPAREs Due to local caching Avoided PREPAREs Due to full caching Statement invalid (MAXKEEPD) Number of times discarded due to max Statement invalid (DDL) Number of times discarded due to DDL or RUNSTATS Local cache hit ratio (%) = Number of avoided PREPAREs x 100 Number of avoided PREPAREs + Number of implicit PREPAREs 62 A similar number for local caching. The application must be cognizant of local caching and must not issue a second prepare. If it does, this ratio is likely to be low. 62

63 Monitoring sample - EZDBA Panel Hyperlink to Dynamic SQL Statement Cache Hyperlink to EDM Pool Application, or; Direct hyperlink to Dynamic SQL Cache Application 63

64 Monitoring sample - EDM Pool Status View Hyperlink to Dynamic SQL Statement Cache Application PF8 Scrolls to next detail display on the EDM Pool 64

65 Monitoring sample - EDM Pool Status View Page 2 65

66 Monitoring sample - Dynamic SQL Cache Details Got here from hyperlink on STEMPD for Dynamic SQL Cache Hyperlink to Statement Cache Analysis PF8 to second page of detail 66

67 Monitoring sample - Dynamic SQL Cache Details Page 2 67

68 Monitoring sample - Dynamic SQL Cache Menu Got here from hyperlink on SQL Cache Statement Analysis on STCACHED Hyperlink to Statements In the Cache PF8 to second page of detail 68

69 Monitoring sample - Dynamic SQL Cache Statement Summary Hyperlink on Time Cached takes you to detail information on this statement in the cache Two clicks gets you to this panel which lists all SQL statements currently in the cache 69

70 Dynamic Monitoring SQL sample Cache - Statement Detail You can hyperlink from here to BMC s Common Explain to analyze the actual statement 70

71 EXPLAINing, Tracing and Monitoring Monitoring Dynamic SQL Cache Detail information about statement cache is available only to online monitoring programs. Information cannot be externalized to SMF or GTF To obtain information, IFI program must request IFCID 316. IFCID 316 only contains first 60 bytes of statement text IFCID 317 can be used to obtain full SQL statement text IFCIDs are available when monitor trace class 1 is active. 71 To obtain the statement text, you must activate IFCIDs 316 and 317. More on this in the section on V8. 71

72 EXPLAINing, Tracing and Monitoring Analysis of Timeouts/Deadlocks 72 DSNT375I/DSNT376I accompanied by a DSNT501I message. Shows culprit, victim and resource on which they encountered contention. Normal remedies like row-level locking, processing in same order, lowering commit frequency, etc. apply. 72

73 EXPLAINing, Tracing and Monitoring Identifying Users to Track Usage DRDA allows four types of data to be sent to DB2 for z/os to help identify a user or an application. Client accounting string String to identify client application String to identify client workstation name String to identify client user ID For identification only Not a DB2 authorization ID 73 In a DRDA architecture, you have various choices to pass to DB2 a string to identify the user or application. This is strictly for identification security does not depend on this. 73

74 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing EXPLAINing, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 74 In this section, we will focus on the security aspects of dynamic SQL. This is a particular challenge in a distributed environment that allows free-form ad hoc SQL. 74

75 Managing Security Security Exposure STATIC UPDATE EMP SET SALARY = SALARY + :HV-RAISE WHERE EMPNO = :HV-EMPNO DYNAMIC UPDATE EMP SET SALARY = SALARY +? WHERE EMPNO =? For static SQL, user needs execute authority on plan/package only Not underlying update authority For dynamic SQL, user needs update authority, also Assuming default DYNAMICRULES(RUN) Therefore, with dynamic SQL: Authorizations must be maintained Users can bypass application and use ad hoc facilities such as SPUFI and QMF 75 Managing security for dynamic SQL poses new challenges that are not faced with static SQL. 75

76 Managing Security DYNAMICRULES(BIND) Causes dynamic SQL to behave like static from a security perspective Uses authorization of plan/package owner Good use: Application in server-only environment When generated SQL is controlled Caution: Very dangerous in an ad hoc or client/server environment since owner of ODBC/JDBC package is usually SYSADM 76 DYNAMICRULES(BIND) is a life-saver in the mainframe-only environment, but can be extremely dangerous in a client/server environment. 76

77 Managing Security Using Stored Procedures Dynamic SQL is converted to embedded static SQL in a stored procedure May not always be possible without losing flexibility Needs execute authority on stored procedure package only Does not need authority for underlying operation Complex when stored procedure itself contains dynamic SQL Covered later 77 Using stored procedure simplifies the security issue since the SQL within the stored procedure is generally static. 77

78 Managing Security ODBC/JDBC Applications Embedded: ODBC/JDBC package is not usable outside the application No security issues Generic: ODBC/JDBC package is usable by any application Using DYNAMICRULES(BIND) on a common package is dangerous Generally too high level of security (SYSADM) Security across applications One ODBC/JDBC package per application possible Use appropriate collection name during bind Use appropriate collection during run via ODBC keyword COLLECTIONID or CURRENT PACKAGESET 78 ODBC/JDBC applications present special challenges, especially when the SQL can be generic. 78

79 Managing Security Security without an Application Server Free- Form SQL? User Auth for Objects? DYNAMIC RULES Note N N BIND Most secure; access only via SQL processor N N RUN Meaningless since no access w/in or outside SQL processor N N Y Y BIND RUN Security hole since access same as owner w/in SQL processor, but no control outside processor Security hole since access controlled w/in SQL processor, but no control outside processor Y N BIND Same as owner w/in SQL processor, no access outside. Secure, but too permissive via processor? Y N RUN Meaningless since no access w/in or outside SQL processor Y Y Y Y BIND RUN Same as owner w/in SQL processor, security hole when outside. Too permissive via processor? Security hole since access controlled w/in SQL processor, but no control outside processor 79 The table above shows how each combination of type of SQL, user authorization to the objects, and the setting for DYNAMICRULES affects the security. No free-form SQL and no JDBC/ODBC DYNAMICRULES(BIND) is likely the best option. This model is similar to that used for static SQL. If free-form SQL or JDBC/ODBC, no fully secure option exists. That is why you will need to deploy an application server in this case. 79

80 Managing Security Security with an Application Server User 1 z/os Environment User 2 User 3 Application Server 1 App-server ID1 + pwd DB2 Subsystem User 4 User 5 D D F Grant execution on DB2 packages to app-server ID1 & app-server ID2 User 6 User 7 Application Server 2 App-server ID2 + pwd User 8 80 In a 3-tier architecture, the application server takes on the primary task for validating security and connecting to the z/os server via a common authorization ID. As long as this ID/password combination is kept secure and the package bind is controlled, this leads to a very secure environment. This scheme is typically used by ERP vendors. 80

81 Managing Security Network Facilities to Control Database Access Three-tier architecture Only application server needs access to database server Only application needs port number and IP address Firewalls guard against intruders 81 By using a common authorization ID and by allowing only the application server to connect to z/os, various options for preventing unauthorized access can be deployed. Using SNA, even more options are available. (This is beyond our current scope.) 81

82 Managing Security Dynamic SQL Security Kathy? Terry? Suresh? Auth ID? Dave? SURESH SET CURRENT SQLID = KATHY PACKAGE OWNER = TERRY SP PACKAGE OWNER = DAVE Default qualifier? Current SQLID applies? Grant/ revoke, etc. allowed? It Depends! 82 The answer to all 4 of these questions is defined by the dynamic statement behavior. This behavior depends on the DYNAMICRULES bind option and the runtime environment (see next slide). The definition of this statement behavior is shown on the slide after that. DYNAMICRULES values of BIND and RUN are commonly known. The other four choices are less known and could be deployed to meet your needs. 82

83 Managing Security DYNAMICRULES + Run-time Environment DYNAMICRULES value BIND RUN DEFINEBIND DEFINERUN INVOKEBIND INVOKERUN Stand-alone program environment behavior Bind Run Bind Run Bind Run Store procedure or UDF environment behavior Bind Run Define Define Invoke Invoke = Statement Behavior 83 How the dynamic SQL statement behavior is determined. Note that a program that is a stored procedure or UDF, or one that has a stored procedure or UDF somewhere in the calling sequence as a parent, is considered to be in a stored procedure/udf environment. 83

84 Managing Security Definitions of Statement Behaviors Attribute Environment Auth Id Default Qualifier Current SQLID GRANT, etc. allowed? Bind Run Define Invoke Plan/ package owner Current SQLID SP/UDF owner Auth ID of invoker (see note 1) Bind owner or qualifier Current SQLID SP/UDF owner Auth ID of invoker N/A Applies N/A N/A No Yes No No 84 This table defines how the dynamic SQL statement behavior affects 4 key areas: Authorization ID Default qualifier Current SQLID allowed? Ability to issue GRANT, REVOKE, CREATE, ALTER, DROP and RENAME Note 1: If the invoker is the primary auth ID of the process or the CURRENT SQLID value, secondary auth IDs will also be checked. Otherwise only the ID of the invoker is checked for the required authorization. 84

85 Where Are We? What is dynamic SQL? When is dynamic SQL appropriate? A glimpse of dynamic SQL development Dynamic statement caching Controlling system resources Locking and concurrency Governing Explaining, tracing and monitoring Managing security DB2 Connect ivity issues What is new with V8? Summary 85 In this section we will focus on connectivity issues in a distributed environment. 85

Workload Insights Without a Trace - Introducing DB2 z/os SQL tracking SOFTWARE ENGINEERING GMBH and SEGUS Inc. 1

Workload Insights Without a Trace - Introducing DB2 z/os SQL tracking SOFTWARE ENGINEERING GMBH and SEGUS Inc. 1 Workload Insights Without a Trace - Introducing DB2 z/os SQL tracking 2011 SOFTWARE ENGINEERING GMBH and SEGUS Inc. 1 Agenda What s new in DB2 10 What s of interest for geeks in DB2 10 What s of interest

More information

Dynamic SQL Re-Examined

Dynamic SQL Re-Examined Dynamic SQL Re-Examined William Favero Senior Certified IT Specialist DB2 for z/os Software Sales Specialist IBM Sales and Distribution West Region, Americas Page 1 of 33 Disclaimer The information contained

More information

DB2 and Memory Exploitation. Fabio Massimo Ottaviani - EPV Technologies. It s important to be aware that DB2 memory exploitation can provide:

DB2 and Memory Exploitation. Fabio Massimo Ottaviani - EPV Technologies. It s important to be aware that DB2 memory exploitation can provide: White Paper DB2 and Memory Exploitation Fabio Massimo Ottaviani - EPV Technologies 1 Introduction For many years, z/os and DB2 system programmers have been fighting for memory: the former to defend the

More information

Chapter 2. DB2 concepts

Chapter 2. DB2 concepts 4960ch02qxd 10/6/2000 7:20 AM Page 37 DB2 concepts Chapter 2 Structured query language 38 DB2 data structures 40 Enforcing business rules 49 DB2 system structures 52 Application processes and transactions

More information

DB2 Performance A Primer. Bill Arledge Principal Consultant CA Technologies Sept 14 th, 2011

DB2 Performance A Primer. Bill Arledge Principal Consultant CA Technologies Sept 14 th, 2011 DB2 Performance A Primer Bill Arledge Principal Consultant CA Technologies Sept 14 th, 2011 Agenda Performance Defined DB2 Instrumentation Sources of performance metrics DB2 Performance Disciplines System

More information

[Slide 2: disclaimer]

[Slide 2: disclaimer] Slide 1: Hello this is John Campbell from DB2 development, and welcome to this next lecture in this series related to DB2 for z/os best practices. The subject of today's web lecture is about the EDM pool

More information

Enhanced Monitoring Support in DB2 10 for z/os

Enhanced Monitoring Support in DB2 10 for z/os DB2 for z/os Version 10 Enhanced Monitoring Support in DB2 10 for z/os Baltimore/Washington DB2 Users Group December 8, 2010 Mark Rader IBM Advanced Technical Skills Disclaimer Copyright IBM Corporation

More information

COMP 3400 Mainframe Administration 1

COMP 3400 Mainframe Administration 1 COMP 3400 Mainframe Administration 1 Christian Grothoff christian@grothoff.org http://grothoff.org/christian/ 1 These slides are based in part on materials provided by IBM s Academic Initiative. 1 Databases

More information

Collecting Cached SQL Data and Its Related Analytics. Gerald Hodge HLS Technologies, Inc.

Collecting Cached SQL Data and Its Related Analytics. Gerald Hodge HLS Technologies, Inc. Collecting Cached SQL Data and Its Related Analytics Gerald Hodge HLS Technologies, Inc. Agenda Quick Review of SQL Prepare CACHEDYN=YES and KEEPDYNAMIC=YES CACHEDYN=YES and KEEPDYNAMIC=YES with COMMIT

More information

IBM DB2 11 DBA for z/os Certification Review Guide Exam 312

IBM DB2 11 DBA for z/os Certification Review Guide Exam 312 Introduction IBM DB2 11 DBA for z/os Certification Review Guide Exam 312 The purpose of this book is to assist you with preparing for the IBM DB2 11 DBA for z/os exam (Exam 312), one of the two required

More information

Short Summary of DB2 V4 Through V6 Changes

Short Summary of DB2 V4 Through V6 Changes IN THIS CHAPTER DB2 Version 6 Features DB2 Version 5 Features DB2 Version 4 Features Short Summary of DB2 V4 Through V6 Changes This appendix provides short checklists of features for the most recent versions

More information

Craig S. Mullins. A DB2 for z/os Performance Roadmap By Craig S. Mullins. Database Performance Management Return to Home Page.

Craig S. Mullins. A DB2 for z/os Performance Roadmap By Craig S. Mullins. Database Performance Management Return to Home Page. Craig S. Mullins Database Performance Management Return to Home Page December 2002 A DB2 for z/os Performance Roadmap By Craig S. Mullins Assuring optimal performance is one of a database administrator's

More information

Enhanced Monitoring Support in DB2 10 for z/os

Enhanced Monitoring Support in DB2 10 for z/os Enhanced Monitoring Support in DB2 10 for z/os March 8, 2012 Mark Rader, IBM mrader@us.ibm.com Agenda Click to edit Master title style 2 Enhancements for problem determination and performance monitoring

More information

C Examcollection.Premium.Exam.58q

C Examcollection.Premium.Exam.58q C2090-610.Examcollection.Premium.Exam.58q Number: C2090-610 Passing Score: 800 Time Limit: 120 min File Version: 32.2 http://www.gratisexam.com/ Exam Code: C2090-610 Exam Name: DB2 10.1 Fundamentals Visualexams

More information

CA Datacom Core Getting Started with SQL in CA Datacom

CA Datacom Core Getting Started with SQL in CA Datacom CA Datacom Core - 15.1 Getting Started with SQL in CA Datacom Date: 14-May-2018 This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred

More information

Private Protocol is Dead! Long Live DRDA!

Private Protocol is Dead! Long Live DRDA! Private Protocol is Dead! Long Live DRDA! Hugh Smith (smithhj@us.ibm.com) IBM August 2, 2010 7983 Agenda To Be or Not To Be Private Protocol (a historical perspective) Private protocol deprecated in every

More information

Don t Let ICIs put your DB2 applications in the ICU!

Don t Let ICIs put your DB2 applications in the ICU! Don t Let ICIs put your DB2 applications in the ICU! Craig Mullins & Roy Boxwell SEGUS & SOFTWARE ENGINEERING Session Code: V8 On May 25, 2016 at 10:30 Platform: DB2 z/os Photo by Steve from Austin, TX,

More information

WHEN is used to specify rows that meet a criteria such as: WHEN (EMP_SALARY < 90000). SELECT and SUBSET are invalid clauses and would cause an error.

WHEN is used to specify rows that meet a criteria such as: WHEN (EMP_SALARY < 90000). SELECT and SUBSET are invalid clauses and would cause an error. 1. Suppose you have created a test version of a production table, and you want to to use the UNLOAD utility to extract the first 5,000 rows from the production table to load to the test version. Which

More information

An A-Z of System Performance for DB2 for z/os

An A-Z of System Performance for DB2 for z/os Phil Grainger, Lead Product Manager BMC Software March, 2016 An A-Z of System Performance for DB2 for z/os The Challenge Simplistically, DB2 will be doing one (and only one) of the following at any one

More information

Basi di Dati Complementi. Mainframe

Basi di Dati Complementi. Mainframe Basi di Dati Complementi 3.1. DBMS commerciali DB2-3.1.2 Db2 in ambiente mainframe Andrea Maurino 2007 2008 Mainframe 1 Mainframe Terminologia Mainframe Storage Management Subsystem (SMS) Is an automated

More information

DB2 for z/os Stored Procedures Update

DB2 for z/os Stored Procedures Update Robert Catterall, IBM rfcatter@us.ibm.com DB2 for z/os Stored Procedures Update Michigan DB2 Users Group May 15, 2013 Information Management Agenda A brief review of DB2 for z/os stored procedure enhancements

More information

TMON for DB2 Release Notes Version 1.5

TMON for DB2 Release Notes Version 1.5 TMON for DB2 Release Notes Version 1.5 TMON for DB2 Release Notes Version 1.5 Copyright Notice Copyright IBM Corporation 2001 All rights reserved. May only be used pursuant to a Tivoli Systems Software

More information

DB2 UDB: App Programming - Advanced

DB2 UDB: App Programming - Advanced A Access Methods... 8:6 Access Path Selection... 8:6 Access Paths... 5:22 ACQUIRE(ALLOCATE) / RELEASE(DEALLOCATE)... 5:14 ACQUIRE(USE) / RELEASE(DEALLOCATE)... 5:14 Active Log... 9:3 Active Logs - Determining

More information

CA Unified Infrastructure Management Snap

CA Unified Infrastructure Management Snap CA Unified Infrastructure Management Snap Configuration Guide for DB2 Database Monitoring db2 v4.0 series Copyright Notice This online help system (the "System") is for your informational purposes only

More information

Locking, concurrency, and isolation

Locking, concurrency, and isolation Holdable result sets and autocommit When autocommit is on, a positioned update or delete statement will automatically cause the transaction to commit. If the result set has holdability ResultSet.CLOSE_CURSORS_AT_COMMIT,

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: The facilities of File-AID for DB2. How to create and alter objects. Creating test tables. Customizing data.

More information

DB2 is a complex system, with a major impact upon your processing environment. There are substantial performance and instrumentation changes in

DB2 is a complex system, with a major impact upon your processing environment. There are substantial performance and instrumentation changes in DB2 is a complex system, with a major impact upon your processing environment. There are substantial performance and instrumentation changes in versions 8 and 9. that must be used to measure, evaluate,

More information

DB2 11 for z/os Application Functionality (Check out these New Features) Randy Ebersole IBM

DB2 11 for z/os Application Functionality (Check out these New Features) Randy Ebersole IBM DB2 11 for z/os Application Functionality (Check out these New Features) Randy Ebersole IBM ebersole@us.ibm.com Please note IBM s statements regarding its plans, directions, and intent are subject to change

More information

Database Management and Tuning

Database Management and Tuning Database Management and Tuning Concurrency Tuning Johann Gamper Free University of Bozen-Bolzano Faculty of Computer Science IDSE Unit 8 May 10, 2012 Acknowledgements: The slides are provided by Nikolaus

More information

ODD FACTS ABOUT NEW DB2 for z/os SQL

ODD FACTS ABOUT NEW DB2 for z/os SQL ODD FACTS ABOUT NEW DB2 for z/os SQL NEW WAYS OF THINKING ABOUT OLD THINGS + STATIC/DYNAMIC SQL CHANGES, PREDICATE APPLICATION AND LOCKS. LATCHES, CLAIMS, & DRAINS Bonnie K. Baker Bonnie Baker Corporation

More information

What it does not show is how to write the program to retrieve this data.

What it does not show is how to write the program to retrieve this data. Session: A16 IFI DATA: IFI you don t know, ask! Jeff Gross CA, Inc. 16 October 2008 11:45 12:45 Platform: DB2 for z/os Abstract The Instrumentation Facility Interface (IFI) can be a daunting resource in

More information

Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and

Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and Connectivity DB2 Application Development DB2 Administration

More information

IBM i Version 7.3. Database Administration IBM

IBM i Version 7.3. Database Administration IBM IBM i Version 7.3 Database Administration IBM IBM i Version 7.3 Database Administration IBM Note Before using this information and the product it supports, read the information in Notices on page 45.

More information

Ten Breakthroughs That Changed DB2 Forever!

Ten Breakthroughs That Changed DB2 Forever! Ten Breakthroughs That Changed DB2 Forever! Sponsored by: align http://www.compuware.com 2013 Mullins Consulting, Inc. Craig S. Mullins Mullins Consulting, Inc. http://www.craigsmullins.com http://www.mullinsconsultinginc.com

More information

Ten Breakthroughs That Changed DB2 Forever

Ten Breakthroughs That Changed DB2 Forever Ten Breakthroughs That Changed DB2 Forever Session Number 1066 Craig S. Mullins Mullins Consulting, Inc. http://www.craigsmullins.com http://mullinsconsultinginc.com Objectives 1 Gain an historical perspective

More information

IBM Data Studio for Mainframe Developers. David Simpson, Senior Technical Advisor Themis, Inc.

IBM Data Studio for Mainframe Developers. David Simpson, Senior Technical Advisor Themis, Inc. IBM Data Studio for Mainframe Developers David Simpson, Senior Technical Advisor Themis, Inc. dsimpson@themisinc.com www.themisinc.com IBM Data Studio for Mainframe Developers Themis and Themis, Inc. are

More information

Outline. Database Tuning. Ideal Transaction. Concurrency Tuning Goals. Concurrency Tuning. Nikolaus Augsten. Lock Tuning. Unit 8 WS 2013/2014

Outline. Database Tuning. Ideal Transaction. Concurrency Tuning Goals. Concurrency Tuning. Nikolaus Augsten. Lock Tuning. Unit 8 WS 2013/2014 Outline Database Tuning Nikolaus Augsten University of Salzburg Department of Computer Science Database Group 1 Unit 8 WS 2013/2014 Adapted from Database Tuning by Dennis Shasha and Philippe Bonnet. Nikolaus

More information

<Insert Picture Here> Oracle Rdb Releases 7.2, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5

<Insert Picture Here> Oracle Rdb Releases 7.2, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5 Oracle Rdb Releases 7.2, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5 Norman Lastovica Oracle OpenVMS Development Team 19 April 2010 Agenda Rdb V7.2 Itanium migration V7.2

More information

L9: Storage Manager Physical Data Organization

L9: Storage Manager Physical Data Organization L9: Storage Manager Physical Data Organization Disks and files Record and file organization Indexing Tree-based index: B+-tree Hash-based index c.f. Fig 1.3 in [RG] and Fig 2.3 in [EN] Functional Components

More information

DB2 for z/os: Programmer Essentials for Designing, Building and Tuning

DB2 for z/os: Programmer Essentials for Designing, Building and Tuning Brett Elam bjelam@us.ibm.com - DB2 for z/os: Programmer Essentials for Designing, Building and Tuning April 4, 2013 DB2 for z/os: Programmer Essentials for Designing, Building and Tuning Information Management

More information

CA Plan Analyzer for DB2 for z/os

CA Plan Analyzer for DB2 for z/os CA Plan Analyzer for DB2 for z/os User Guide Version 17.0.00, Fourth Edition This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred to

More information

DB2 Performance Essentials

DB2 Performance Essentials DB2 Performance Essentials Philip K. Gunning Certified Advanced DB2 Expert Consultant, Lecturer, Author DISCLAIMER This material references numerous hardware and software products by their trade names.

More information

SQL Studio (BC) HELP.BCDBADASQL_72. Release 4.6C

SQL Studio (BC) HELP.BCDBADASQL_72. Release 4.6C HELP.BCDBADASQL_72 Release 4.6C SAP AG Copyright Copyright 2001 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express

More information

DB2 UDB: Application Programming

DB2 UDB: Application Programming A ABS or ABSVAL... 4:19 Access Path - Determining... 10:8 Access Strategies... 9:3 Additional Facts About Data Types... 5:18 Aliases... 1:13 ALL, ANY, SOME Operator... 3:21 AND... 3:12 Arithmetic Expressions...

More information

Contents. Using. Dynamic SQL 44. Bag of Tricks 56. Complex SQL Guidelines 90. Working with Nulls 115. Aggregate Functions 135

Contents. Using. Dynamic SQL 44. Bag of Tricks 56. Complex SQL Guidelines 90. Working with Nulls 115. Aggregate Functions 135 Contents Preface xxiii Part I SQL Techniques, Tips, and Tricks 1 The Magic Words 3 An Overview of SQL 4 SQL Tools of the Trade 13 Static SQL 42 Dynamic SQL 44 SQL Performance Factors 45 2 Data Manipulation

More information

I Didn't Know DB2 Did THAT! V9 & V10 Update CENTRAL CANADA DB2 USER GROUP

I Didn't Know DB2 Did THAT! V9 & V10 Update CENTRAL CANADA DB2 USER GROUP I Didn't Know DB2 Did THAT! V9 & V10 Update CENTRAL CANADA DB2 USER GROUP Bonnie K. Baker Bonnie Baker Corporation 1-813-477-4885 bkbaker@bonniebaker.com www.bonniebaker.com INTERNAL MYSTERIES SOLVED 2

More information

What Developers must know about DB2 for z/os indexes

What Developers must know about DB2 for z/os indexes CRISTIAN MOLARO CRISTIAN@MOLARO.BE What Developers must know about DB2 for z/os indexes Mardi 22 novembre 2016 Tour Europlaza, Paris-La Défense What Developers must know about DB2 for z/os indexes Introduction

More information

Listing of SQLSTATE values

Listing of SQLSTATE values Listing of values 1 of 28 5/15/2008 11:28 AM Listing of values The tables in this topic provide descriptions of codes that can be returned to applications by DB2 UDB for iseries. The tables include values,

More information

DB2 10 Capturing Tuning and Trending for SQL Workloads - a resource and cost saving approach

DB2 10 Capturing Tuning and Trending for SQL Workloads - a resource and cost saving approach DB2 10 Capturing Tuning and Trending for SQL Workloads - a resource and cost saving approach Roy Boxwell SOFTWARE ENGINEERING GmbH Session Code: V05 15.10.2013, 11:30 12:30 Platform: DB2 z/os 2 Agenda

More information

Quest Central for DB2

Quest Central for DB2 Quest Central for DB2 INTEGRATED DATABASE MANAGEMENT TOOLS Supports DB2 running on Windows, Unix, OS/2, OS/390 and z/os Integrated database management components are designed for superior functionality

More information

PL/SQL Block structure

PL/SQL Block structure PL/SQL Introduction Disadvantage of SQL: 1. SQL does t have any procedural capabilities. SQL does t provide the programming technique of conditional checking, looping and branching that is vital for data

More information

The Present and Future of Large Memory in DB2

The Present and Future of Large Memory in DB2 The Present and Future of Large Memory in DB2 John B. Tobler Senior Technical Staff Member DB2 for z/os, IBM Michael Schultz Advisory Software Engineer DB2 for z/os, IBM Monday August 12, 2013 3:00PM -

More information

Understanding Isolation Levels and Locking

Understanding Isolation Levels and Locking Platform: DB2 UDB for Linux, UNIX, and Windows Understanding Isolation Levels and Locking Roger E. Sanders Network Appliance, Inc. Global Systems Engineer Session: G10 Wednesday, 26 October 2005 11:00

More information

DB2 10 Capturing Tuning and Trending for SQL Workloads - a resource and cost saving approach. Roy Boxwell SOFTWARE ENGINEERING GmbH

DB2 10 Capturing Tuning and Trending for SQL Workloads - a resource and cost saving approach. Roy Boxwell SOFTWARE ENGINEERING GmbH 1 DB2 10 Capturing Tuning and Trending for SQL Workloads - a resource and cost saving approach Roy Boxwell SOFTWARE ENGINEERING GmbH 3 Agenda 1. DB2 10 technology used by SQL WorkloadExpert (WLX) 2. The

More information

TestBase's Patented Slice Feature is an Answer to Db2 Testing Challenges

TestBase's Patented Slice Feature is an Answer to Db2 Testing Challenges Db2 for z/os Test Data Management Revolutionized TestBase's Patented Slice Feature is an Answer to Db2 Testing Challenges The challenge in creating realistic representative test data lies in extracting

More information

Lets start with the standard disclaimer. Please go to the next slide

Lets start with the standard disclaimer. Please go to the next slide DB2 10 for z/os Security Enhancements James Click Pickel to edit Master text styles IBM Silicon Valley Laboratory DB2 for z/os Second Security level Architect Session: A05 Time: 9 November 2010 11:00 am

More information

IBM DB Developing Embedded SQL Applications SC

IBM DB Developing Embedded SQL Applications SC IBM DB2 9.7 for Linux, UNIX, and Windows Developing Embedded SQL Applications SC27-2445-00 IBM DB2 9.7 for Linux, UNIX, and Windows Developing Embedded SQL Applications SC27-2445-00 Note Before using

More information

SYSTEM 2000 Essentials

SYSTEM 2000 Essentials 7 CHAPTER 2 SYSTEM 2000 Essentials Introduction 7 SYSTEM 2000 Software 8 SYSTEM 2000 Databases 8 Database Name 9 Labeling Data 9 Grouping Data 10 Establishing Relationships between Schema Records 10 Logical

More information

DB2 11 for z/os Application Compatibility What you Need to Know

DB2 11 for z/os Application Compatibility What you Need to Know DB2 11 for z/os Application Compatibility What you Need to Know Christopher J. Crone IBM Platform: DB2 for z/os Disclaimer 1 Information regarding potential future products is intended to outline our general

More information

V9 Migration KBC. Ronny Vandegehuchte

V9 Migration KBC. Ronny Vandegehuchte V9 Migration Experiences @ KBC Ronny Vandegehuchte KBC Configuration 50 subsystems (15 in production) Datasharing (3 way) 24X7 sandbox, development, acceptance, production Timings Environment DB2 V9 CM

More information

Lock Tuning. Concurrency Control Goals. Trade-off between correctness and performance. Correctness goals. Performance goals.

Lock Tuning. Concurrency Control Goals. Trade-off between correctness and performance. Correctness goals. Performance goals. Lock Tuning Concurrency Control Goals Performance goals Reduce blocking One transaction waits for another to release its locks Avoid deadlocks Transactions are waiting for each other to release their locks

More information

New Security Options in DB2 for z/os Release 9 and 10

New Security Options in DB2 for z/os Release 9 and 10 New Security Options in DB2 for z/os Release 9 and 10 IBM has added several security improvements for DB2 (IBM s mainframe strategic database software) in these releases. Both Data Security Officers and

More information

DB2 11 Global variables

DB2 11 Global variables DB2 11 Global variables Rajesh Venkata Rama Mallina (vmallina@in.ibm.com) DB2 Z/OS DBA IBM 03 March 2017 The following document is for IBM DB2 for z/os, Topic is Global variables. As a DB2 DBA administrator

More information

Best Practices. Deploying Optim Performance Manager in large scale environments. IBM Optim Performance Manager Extended Edition V4.1.0.

Best Practices. Deploying Optim Performance Manager in large scale environments. IBM Optim Performance Manager Extended Edition V4.1.0. IBM Optim Performance Manager Extended Edition V4.1.0.1 Best Practices Deploying Optim Performance Manager in large scale environments Ute Baumbach (bmb@de.ibm.com) Optim Performance Manager Development

More information

DB2 9 for z/os V9 migration status update

DB2 9 for z/os V9 migration status update IBM Software Group DB2 9 for z/os V9 migration status update July, 2008 Bart Steegmans DB2 for z/os L2 Performance Acknowledgement and Disclaimer i Measurement data included in this presentation are obtained

More information

DB2 Version 7 Overview

DB2 Version 7 Overview IN THIS APPENDIX E-Business Enhancements Application Development Enhancements Data Management Enhancements Business Intelligence Enhancements Additional V7 Information This appendix contains a short overview

More information

IBM i Version 7.2. Database Embedded SQL programming IBM

IBM i Version 7.2. Database Embedded SQL programming IBM IBM i Version 7.2 Database Embedded SQL programming IBM IBM i Version 7.2 Database Embedded SQL programming IBM Note Before using this information and the product it supports, read the information in

More information

Vendor: IBM. Exam Code: C Exam Name: DB Fundamentals. Version: Demo

Vendor: IBM. Exam Code: C Exam Name: DB Fundamentals. Version: Demo Vendor: IBM Exam Code: C2090-610 Exam Name: DB2 10.1 Fundamentals Version: Demo QUESTION 1 If the following command is executed: CREATE DATABASE test What is the page size (in kilobytes) of the database?

More information

User's Guide c-treeace SQL Explorer

User's Guide c-treeace SQL Explorer User's Guide c-treeace SQL Explorer Contents 1. c-treeace SQL Explorer... 4 1.1 Database Operations... 5 Add Existing Database... 6 Change Database... 7 Create User... 7 New Database... 8 Refresh... 8

More information

How to Setup Application Server to Access DB2 z/os with High Availability

How to Setup Application Server to Access DB2 z/os with High Availability How to Setup Application Server to Access DB2 z/os with High Availability Maryela Weihrauch DE, IBM Silicon Valley Lab Aug 13 th, 2008 11:00 am #1330 Important Disclaimer THE INFORMATION CONTAINED IN THIS

More information

Self-test DB2 for z/os Fundamentals

Self-test DB2 for z/os Fundamentals Self-test DB2 for z/os Fundamentals Document: e1067test.fm 01/04/2017 ABIS Training & Consulting P.O. Box 220 B-3000 Leuven Belgium TRAINING & CONSULTING INTRODUCTION TO THE SELF-TEST DB2 FOR Z/OS FUNDAMENTALS

More information

Memory for MIPS: Leveraging Big Memory on System z to Enhance DB2 CPU Efficiency

Memory for MIPS: Leveraging Big Memory on System z to Enhance DB2 CPU Efficiency Robert Catterall, IBM rfcatter@us.ibm.com Memory for MIPS: Leveraging Big Memory on System z to Enhance DB2 CPU Efficiency Midwest DB2 Users Group December 5, 2013 Information Management Agenda The current

More information

Database Embedded SQL programming

Database Embedded SQL programming System i Database Embedded SQL programming Version 6 Release 1 System i Database Embedded SQL programming Version 6 Release 1 Note Before using this information and the product it supports, read the information

More information

DB2 Performance Health Check... in just few minutes. DUGI 8-9 April 2014

DB2 Performance Health Check... in just few minutes. DUGI 8-9 April 2014 DB2 Performance Health Check... in just few minutes DUGI 8-9 April 2014 Introduction DB2 is the preferred repository for mission critical data at all z/os sites Performance of z/os and non z/os based applications

More information

Best practices. IBMr. How to use OMEGAMON XE for DB2 Performance Expert on z/os to identify DB2 deadlock and timeout. IBM DB2 Tools for z/os

Best practices. IBMr. How to use OMEGAMON XE for DB2 Performance Expert on z/os to identify DB2 deadlock and timeout. IBM DB2 Tools for z/os IBMr IBM DB2 Tools for z/os Best practices How to use OMEGAMON XE for DB2 Performance Expert on z/os to identify DB2 deadlock and timeout Hong Zhou Advisory Software Engineer zhouh@us.ibm.com Issued: December,

More information

Building and Managing Efficient data access to DB2. Vijay Bommireddipalli, Solutions Architect, Optim

Building and Managing Efficient data access to DB2. Vijay Bommireddipalli, Solutions Architect, Optim Building and Managing Efficient data access to DB2 Vijay Bommireddipalli, vijayrb@us.ibm.com Solutions Architect, Optim September 16, 2010 Information Management Disclaimer THE INFORMATION CONTAINED IN

More information

See the mechanics of how to do this for a cycle-driven process with a high degree of usability and easy job output management.

See the mechanics of how to do this for a cycle-driven process with a high degree of usability and easy job output management. Abstract: When concurrency is not needed for warehouse applications it is possible to use standard z/os tools to load a Db2 Analytics Accelerator without sample programs or 3rd party tools. See the mechanics

More information

On slide 2 here I have a disclaimer about particular trademarks that are used in this presentation. Now let s go to slide 3.

On slide 2 here I have a disclaimer about particular trademarks that are used in this presentation. Now let s go to slide 3. DB2 for z/os Best Practices DDF Connectivity John J. Campbell Distinguished Engineer DB2 for z/os Development db2zinfo@us.ibm.com 2011 IBM Corporation Transcript of webcast Slide 1 (00:00) Hello, this

More information

C Exam Questions Demo IBM. Exam Questions C

C Exam Questions Demo   IBM. Exam Questions C IBM Exam Questions C2090-543 DB2 9.7 Application Development (C2090-543) Version:Demo 1. Which condition will prevent a developer from using the DB2 Call Level Interface in an application? A. The developer

More information

Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 1)

Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 1) Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 1) Robert Catterall IBM March 12, 2014 Session 14610 Insert Custom Session QR if Desired. The genesis of this presentation

More information

Deadlocks were detected. Deadlocks were detected in the DB2 interval statistics data.

Deadlocks were detected. Deadlocks were detected in the DB2 interval statistics data. Rule DB2-311: Deadlocks were detected Finding: Deadlocks were detected in the DB2 interval statistics data. Impact: This finding can have a MEDIUM IMPACT, or HIGH IMPACT on the performance of the DB2 subsystem.

More information

IBM EXAM QUESTIONS & ANSWERS

IBM EXAM QUESTIONS & ANSWERS IBM 000-730 EXAM QUESTIONS & ANSWERS Number: 000-730 Passing Score: 800 Time Limit: 120 min File Version: 69.9 http://www.gratisexam.com/ IBM 000-730 EXAM QUESTIONS & ANSWERS Exam Name: DB2 9 Fundamentals

More information

HP NonStop Structured Query Language (SQL)

HP NonStop Structured Query Language (SQL) HP HP0-780 NonStop Structured Query Language (SQL) http://killexams.com/exam-detail/hp0-780 B. EXEC SQL UPDATE testtab SET salary = 0; C. EXEC SQL UPDATE testtab SET salary = :-1; D. EXEC SQL UPDATE testtab

More information

Arrays are a very commonly used programming language construct, but have limited support within relational databases. Although an XML document or

Arrays are a very commonly used programming language construct, but have limited support within relational databases. Although an XML document or Performance problems come in many flavors, with many different causes and many different solutions. I've run into a number of these that I have not seen written about or presented elsewhere and I want

More information

Can I control a dynamic world? - Dynamic SQL Management for DB2 z/os

Can I control a dynamic world? - Dynamic SQL Management for DB2 z/os Can I control a dynamic world? - Dynamic SQL Management for DB2 z/os Ulf Heinrich SEGUS Inc Session Code: Y02 TBD Platform: DB2 z/os Agenda Dynamic SQL basics: What is the difference to static SQL? How

More information

IBM i Version 7.2. Database SQL programming IBM

IBM i Version 7.2. Database SQL programming IBM IBM i Version 7.2 Database SQL programming IBM IBM i Version 7.2 Database SQL programming IBM Note Before using this information and the product it supports, read the information in Notices on page 389.

More information

SQL. History. From Wikipedia, the free encyclopedia.

SQL. History. From Wikipedia, the free encyclopedia. SQL From Wikipedia, the free encyclopedia. Structured Query Language (SQL) is the most popular computer language used to create, modify and retrieve data from relational database management systems. The

More information

6232B: Implementing a Microsoft SQL Server 2008 R2 Database

6232B: Implementing a Microsoft SQL Server 2008 R2 Database 6232B: Implementing a Microsoft SQL Server 2008 R2 Database Course Overview This instructor-led course is intended for Microsoft SQL Server database developers who are responsible for implementing a database

More information

Concurrency Control Goals

Concurrency Control Goals Lock Tuning Concurrency Control Goals Concurrency Control Goals Correctness goals Serializability: each transaction appears to execute in isolation The programmer ensures that serial execution is correct.

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline

More information

The Oracle DBMS Architecture: A Technical Introduction

The Oracle DBMS Architecture: A Technical Introduction BY DANIEL D. KITAY The Oracle DBMS Architecture: A Technical Introduction As more and more database and system administrators support multiple DBMSes, it s important to understand the architecture of the

More information

Number: Passing Score: 800 Time Limit: 120 min File Version:

Number: Passing Score: 800 Time Limit: 120 min File Version: 000-610 Number: 000-610 Passing Score: 800 Time Limit: 120 min File Version: 1.0 http://www.gratisexam.com/ Exam A QUESTION 1 If the following command is executed: CREATE DATABASE test What is the page

More information

Westfield DB2 z/os System Management

Westfield DB2 z/os System Management Westfield DB2 z/os System Management Managing the Pain with Stats, Charts, Graphs, & REXX NEODBUG Aug 16, 2012 Mike Smith Westfield Insurance Agenda About Westfield DB2 Workload and Environment Tools and

More information

DB2 for z/os Distributed Data Facility Questions and Answers

DB2 for z/os Distributed Data Facility Questions and Answers DB2 for z/os Distributed Data Facility Questions and Answers Michigan DB2 Users Group Robert Catterall, IBM rfcatter@us.ibm.com May 11, 2016 2016 IBM Corporation Agenda DDF monitoring and tuning DDF application

More information

Vendor: IBM. Exam Code: Exam Name: IBM Certified Database Administrator - DB2 10 for z/os. Version: Demo

Vendor: IBM. Exam Code: Exam Name: IBM Certified Database Administrator - DB2 10 for z/os. Version: Demo Vendor: IBM Exam Code: 000-612 Exam Name: IBM Certified Database Administrator - DB2 10 for z/os Version: Demo QUESTION NO: 1 Workload Manager (WLM) manages how many concurrent stored procedures can run

More information

DB2 Stored Procedure and UDF Support in Rational Application Developer V6.01

DB2 Stored Procedure and UDF Support in Rational Application Developer V6.01 Session F08 DB2 Stored Procedure and UDF Support in Rational Application Developer V6.01 Marichu Scanlon marichu@us.ibm.com Wed, May 10, 2006 08:30 a.m. 09:40 a.m. Platform: Cross Platform Audience: -DBAs

More information

Software Announcement March 6, 2001

Software Announcement March 6, 2001 Software Announcement March 6, 2001 IBM DB2 Universal Database Server for OS/390 and z/os, Version 7 Utilities Deliver Improved Usability, Availability, and Performance for Managing your Databases Overview

More information

Websphere Server 8.5 Best Practices Oracle FLEXCUBE Universal Banking Release [December] [2016]

Websphere Server 8.5 Best Practices Oracle FLEXCUBE Universal Banking Release [December] [2016] Websphere Server 8.5 Best Practices Oracle FLEXCUBE Universal Banking Release 12.3.0.0.0 [December] [2016] Table of Contents 1. INTRODUCTION... 1-1 1.1 BACKGROUND... 1-1 1.2 BASICS OF WEBSPHERE... 1-1

More information

Pass IBM C Exam

Pass IBM C Exam Pass IBM C2090-612 Exam Number: C2090-612 Passing Score: 800 Time Limit: 120 min File Version: 37.4 http://www.gratisexam.com/ Exam Code: C2090-612 Exam Name: DB2 10 DBA for z/os Certkey QUESTION 1 Workload

More information

DB2 V8 Neat Enhancements that can Help You. Phil Gunning September 25, 2008

DB2 V8 Neat Enhancements that can Help You. Phil Gunning September 25, 2008 DB2 V8 Neat Enhancements that can Help You Phil Gunning September 25, 2008 DB2 V8 Not NEW! General Availability March 2004 DB2 V9.1 for z/os announced March 2007 Next release in the works and well along

More information