Presentation is loading. Please wait.

Presentation is loading. Please wait.

SQL for the System Administrator

Similar presentations


Presentation on theme: "SQL for the System Administrator"— Presentation transcript:

1 SQL for the System Administrator
Scott Forstie DB2 for i Business Architect For…

2 Commands, APIs and tools – consider the options
IBM i has a long history of creating Commands and APIs, so much so that we frequently conclude that further investment in these interfaces is the appropriate approach to deliver new capabilities to our customers The subject of this presentation is to explain the role of SQL based interfaces to allow non-DB2 for i products and components to understand that an alternative / additional choice exists Development Cost, Value to the customer and Risk are the important factors to consider for any enhancement Before talking about SQL, lets discuss traditional IBM i interfaces. IBM i a successful, even tenured, platform. Some of that success was based upon an object oriented architecture, founded before such topics were trendy. IBM i Commands and Application Programming Interfaces (APIs) have existed for 25+ years and serve a great purpose. The commands enable transferrable learning to occur. If you learn about one command, you’ll find it easier to use the next command because terminology and user interactions are consistent across commands. The same is true with APIs, they have a standardized structure and can be extended without breaking existing appliications. Don’t get me wrong, I love Commands and APIs. They work and work well. At the same time, most of them are proprietary technology. My point will come into clear view in the coming slides, but here’s the takeaway from this session: SQL is an accepted industry standard. SQL is available and incorporated into every language environment. SQL provides value beyond traditional Request-Reply style interfaces. Ergo… we (the IBM i team & the IBM i users) have a decision to make. Where should we invest our time and efforts?

3 Commands, APIs and tools – Why consider SQL?
Even though IBM i customers are used to commands and APIs, they are not always the easiest interfaces for customers to utilize (especially if from a client or the web). In many cases, customers are required to write specialized programs to exploit a new IBM i command or API. Across the industry, SQL is recognized as a standardized and easy language to access the database. SQL skills are either commonplace or customers have a desire to do more with SQL. SQL as a language construct does not need to be limited to database topics. SQL can be used on IBM i to easily extract deep details on non-database topics. This presentation contains proof of this point. As you have no doubt concluded already, I’m convinced that SQL is a key investment area, for us both. Why? If I haven’t convinced you already, consider the following: Even if you’re absolutely dedicated to use a Command or API, you need to study the interface structure to use it. APIs only work if you construct, deploy, authorize and manage a program. Commands can be used from program or interactively. What if you’re not onsite or can’t reach a command line? Some Commands don’t include an OUTPUT(*OUTFILE) option, making it near impossible to consume the command output within a program. Again, if we consider SQL as an alternative (additional) way to leverage existing proprietary technology, we position ourselves to achieve success. The “cost of entry” is low for those new to the IBM i platform For those experienced with IBM i, investing in growing your SQL skills is good for you and your employer SQL as a language can do things an API or Command can’t do

4 Commands, APIs and tools – Why consider SQL?
With SQL-based options, consider which interface provides the best “tool for the task” Customer feedback SQL based interfaces has been very positive Besides being easy to use, SQL queries can be used for: Selection (WHERE clause) Ordering Grouping Joining Top ‘n’ results IN, LIKE, NOT, and more… Unleash the power of the DB2 for i query engine Let me repeat that I love Commands and APIs. I use them and will continue to do so, and you should do the same. The notion of using SQL for tasks beyond traditional database tasks is all about business value. Value is gained by saving time and doing more with less. Don’t take it only from me, Mr. SQL. I’ve been accused of using SQL as a hammer… which can obviously be the wrong tool for some tasks. Customer feedback that we’ve received about DB2 for i SQL-based interfaces for non-database resources has been radiant. What’s all the fuss about SQL? See that tiger waiting to pounce. Just imagine yourself in control of such a powerful force. The SQL Query Engine (SQE) is the source of this resource potential. When you use SQL as an alternative to traditional interfaces, the query engine enables you to easily transform and manipulate the data. Wow, watch out for that tiger! /fun-noise-on Cue ferocious tiger noise here - /fun-noise-off

5 Where to start? Get educated
Understand the SQL coding environments: RUNSQL, RUNSQLSTM, Run SQL Scripts, STRSQL, CRTSQLxxxx, ODBC, JDBC, PHP, DRDA, etc… Understand the query engine and optimizer options: Understand the SQL coding options: Explicit 3-part names, Implicit 3-part names, INSERT with remote subselect, CREATE TABLE with remote subselect, etc... Keep the SQL Reference close by Like other crafts… with repeated study and practice, your skills will improve Dear reader, hang in there, we’ve almost made it to the good stuff. Education and experience are key factors for continued success in a technology career. I’ve made my case that SQL on DB2 for i should fall somewhere on your list. You can explore the SQL language itself, or the many interfaces which can be used to execute SQL. Download and keep this PDF handy: Information Center URL for the SQL Reference 

6 New to SQL? Use Navigator’s Run SQL Scripts
Powerful, graphical interface IBM i Navigator (aka System i Navigator) IBM i Access Windows Service Pack 7.1 – SI53584  TR8 Product Download Site: www-03.ibm.com/systems/power/software/i/access/windows_sp.html Next Planned Update…December 31, 2014 Right click

7 SQL catalogs  TCP/IP Services
Next stop… TCP/IP detail

8 QSYS2/TCPIP_INFO – view
Client/server identification, logging and other instrumentation is possible using SQL. The TCPIP_INFO view returns detailed information for the current connection. SELECT * from QSYS2/TCPIP_INFO Columns which don’t exist on IBM i 6.1: SERVER_IP_ADDRESS and SERVER_IP_ADDRESS_TYPE Consider this service a “Who am I?” or “What am I using?” type of service. The QSYS2/TCPIP_INFO catalog returns a single row table, with detail about the current connection. Using this catalog, you can discover: The IBM i OS level (under HOST_VERSION) The client IP address, address type and port, for this connection The server IP address, address type and port The complete local host name Note, if you’ve been wondering why the COLLECTED_TIME column appears in some of the catalogs, here’s the reason: while it isn’t strictly required, it was added to make it easier to identity the moment the data was collected (queried).

9 TCPIP_INFO – example usage
Well defined port numbers - Now it’s possible (and easy) to deploy interface specific logics with SQL

10 TCPIP_INFO – Trigger example
This trigger can have conditional logic when running within a QZDASOINIT job. Varies by the caller 

11 SYSIBMADM/ENV_SYS_INFO – view
SYSIBMADM/ENV_SYS_INFO catalog returns information about the current server This is a DB2 family compatible administrative view Similar to TCPIP_INFO, but slightly different, the SYSIBMADM/ENV_SYS_INFO catalog also provides detail about the current connection. It too returns just a single row. It exists because it is a DB2 family compatible catalog. Use the SYSIBMADM/ENV_SYS_INFO catalog if the application might be used on DB2 for LUW. As you may have noticed, this catalog contains CPU and memory detail not found in TCPIP_INFO. Also, TCPIP_INFO contains detail not found in ENV_SYS_INFO. Reasons exist to use either or both of these catalogs.

12 SQL catalogs  Program Temporary Fix (PTF)
PTF Services Lets begin the tour of catalogs with PTF detail.

13 QSYS2/GROUP_PTF_INFO – view
Explore the catalog columns and detail… SELECT * FROM QSYS2/GROUP_PTF_INFO A catalog looks like a table, maintained by DB2 for i, that contains extensive details. Catalogs exist for specific topics. I’ve often said that catalogs put the “relational” into a relational database. Every SQL table appears within the QSYS2/SYSTABLES catalog. Every column defined within a table has its own row of detail within the QSYS2/SYSCOLUMS catalog, and so on for every database resource. Whether the catalog truly is a physical file, a view joining one or more physical files or a view based upon User Defined Table Functions (UDTFs) is not important to the user. The QSYS2/GROUP_PTF_INFO the first example of resources beyond database being accessible via a database catalog. When approaching a catalog that is new to you, don’t rush in or that tiger could start growling again. Seriously though, either read up on the catalog on developerWorks or better yet, query the catalog. SELECT * FROM QSYS2/GROUP_PTF_INFO is shown in the example, executed on a machine running with IBM i 7.1.

14 QSYS2/GROUP_PTF_INFO – view
Use SQL to interrogate PTF Group information Alternative to the Work with PTF Groups (WRKPTFGRP) command Since this command has no OUTPUT(*OUTFILE) capability, the command is not easily consumable from a program -- What PTF Groups will change on the next IPL? SELECT * FROM QSYS2/GROUP_PTF_INFO WHERE PTF_GROUP_STATUS = ‘APPLY AT NEXT IPL’ ORDER BY PTF_GROUP_LEVEL DESC -- What is the most recently installed CUM? SELECT MAX(PTF_GROUP_LEVEL) AS CUM_LEVEL FROM QSYS2/GROUP_PTF_INFO WHERE PTF_GROUP_NAME IN (‘SF99610’,‘SF99710’) AND PTF_GROUP_STATUS = ‘INSTALLED’ After understanding that the QSYS2/GROUP_PTF_INFO catalog column names, data types and values, we can begin constructing SQL queries to answer questions. Notice that business value seeping in already. The first query uses a WHERE clause to limit the rows returned to those PTF Groups that will be applied at the next IPL. For extra credit, we order the results by PTF Group level descending. This query sets expectations for the next IPL. An exit program over the POWER DOWN SYSTEM (PWRDWNSYS) command could execute this query and INSERT the results into a permanent machine status tracking table. The second query answers a frequently asked question… what IBM CUMULATIVE PTF PACKAGE level is in use? For a little bit of extra sauce on this tasty treat, notice how the IN predicate is used. This query will work on systems using IBM i 6.1 or Cool.

15 QSYS2/PTF_INFO – view Similar to being able to use SQL to query PTF Group information, (QSYS2/GROUP_PTF_INFO) you can interrogate PTF information using a DB2 for i catalog (QSYS2/PTF_INFO) Data returned is similar to the QpzListPTF() API output -- I’m about to IPL, will the IPL impact PTF state? SELECT PTF_IDENTIFIER, PTF_IPL_ACTION, A.* FROM QSYS2/PTF_INFO A WHERE PTF_IPL_ACTION <> 'NONE‘ PTF_INFO returns a row for every PTF that exists on the machine, and is useful for individual PTF interrogation. What questions can we hope to answer with this catalog? Maybe your software needs to determine if pre-requisite PTFs are applied, or you’d like to see what PTFs were applied or removed within the last 7 days. Two working examples are provided to get you started. The first example focuses yet again on setting expectation of change for an upcoming IPL. The second example examines those PTFs that are loaded, but not applied. Consider this state to be “nearly installed”. In the lower right hand corner you see the details for which IBM i releases contain this support and the enabling DB2 PTF Group level.

16 QSYS2/PTF_INFO – view -- Which PTFs are loaded, but not applied? SELECT PTF_IDENTIFIER, PTF_PRODUCT_DESCRIPTION, A.* FROM QSYS2/PTF_INFO A WHERE PTF_LOADED_STATUS = 'LOADED' ORDER BY PTF_PRODUCT_ID PTF_INFO returns a row for every PTF that exists on the machine, and is useful for individual PTF interrogation. What questions can we hope to answer with this catalog? Maybe your software needs to determine if pre-requisite PTFs are applied, or you’d like to see what PTFs were applied or removed within the last 7 days. Two working examples are provided to get you started. The first example focuses yet again on setting expectation of change for an upcoming IPL. The second example examines those PTFs that are loaded, but not applied. Consider this state to be “nearly installed”. In the lower right hand corner you see the details for which IBM i releases contain this support and the enabling DB2 PTF Group level.

17 SYSTOOLS.GROUP_PTF_CURRENCY View
New with TR9 / TR1 SYSTOOLS.GROUP_PTF_CURRENCY View SELECT * from SYSTOOLS.GROUP_PTF_CURRENCY WHERE PTF_GROUP_RELEASE = ‘R720’ ORDER BY ptf_group_level_available - ptf_group_level_installed DESC Current or behind on service? PTF Group Info Level installed on this partition Level available from IBM Date that IBM last updated this group

18 SYSTOOLS.GROUP_PTF_CURRENCY View
New with TR9 / TR1 SYSTOOLS.GROUP_PTF_CURRENCY View XML namespace & structure

19 SYSTOOLS.GROUP_PTF_CURRENCY View
New with TR9 / TR1 SYSTOOLS.GROUP_PTF_CURRENCY View Study the XML structure to define the data to the HTTP function. HTTPXML document structure TCP/IP Enablement: ‘www-912.ibm.com’ maps to IBM i TCP/IP configuration Technote: White papers: Enablement Developer resources

20 SQL catalogs  Journal Services
Next stop… Journal detail.

21 QSYS2.JOURNAL_INFO – View
New with TR9 / TR1 Use SQL to retrieve detail for local & remote journals Information from QjoRetrieveJournalInformation() API, RJRN0100 format. The view returns Key 1 & 3 information, one row == information about one journal. -- Which remote journals are the most heavily used? SELECT JOURNALED_OBJECTS, A.* FROM QSYS2.JOURNAL_INFO A WHERE NUMBER_REMOTE_JOURNALS > 0 AND JOURNALED_OBJECTS IS NOT NULL ORDER BY JOURNALED_OBJECTS DESC -- Find journals that are nearing the limit of journaled objects: SELECT * FROM QSYS2.JOURNAL_INFO WHERE JOURNALED_OBJECT_LIMIT = '*MAX250K' AND JOURNALED_OBJECTS > -- Search for journals not using the *RMVINTENT optimization SELECT * FROM QSYS2.JOURNAL_INFO WHERE REMOVE_INTERNAL_ENTRIES = 'NO'

22 QSYS2.JOURNAL_INFO – View
New with TR9 / TR1 Use this new source of information to achieve better journal management Recognize conditions that require attention -- Which remote journals fell the farthest behind this week? SELECT MAXIMUM_TIME_BEHIND, MAXIMUM_BEHIND_TIMESTAMP, ESTIMATED_TIME_BEHIND, TOTAL_SIZE_JOURNAL_RECEIVERS, RTRIM(ATTACHED_JOURNAL_RECEIVER_LIBRARY) CONCAT '/' CONCAT RTRIM(ATTACHED_JOURNAL_RECEIVER_NAME) AS JrnName, A.* FROM QSYS2.JOURNAL_INFO A WHERE MAXIMUM_BEHIND_TIMESTAMP > CURRENT TIMESTAMP - 7 DAYS AND MAXIMUM_TIME_BEHIND > 0 AND MAXIMUM_TIME_BEHIND IS NOT NULL ORDER BY MAXIMUM_TIME_BEHIND DESC FETCH FIRST 10 ROWS ONLY -- Search for journals not using the *RMVINTENT optimization SELECT * FROM QSYS2.JOURNAL_INFO WHERE REMOVE_INTERNAL_ENTRIES = 'NO'

23 QSYS2/DISPLAY_JOURNAL() – UDTF
Use SQL to extract data from journals Either call the UDTF directly or use IBM i Navigator Why use these capabilities over the green screen commands? Isolate detail from complex data, efficiently Automate frequent audit analysis Add logic to applications Leverage the SQL Query Engine (SQE) to order, group, join, transform journal based data After understanding that the QSYS2/GROUP_PTF_INFO catalog column names, data types and values, we can begin constructing SQL queries to answer questions. Notice that business value seeping in already. The first query uses a WHERE clause to limit the rows returned to those PTF Groups that will be applied at the next IPL. For extra credit, we order the results by PTF Group level descending. This query sets expectations for the next IPL. An exit program over the POWER DOWN SYSTEM (PWRDWNSYS) command could execute this query and INSERT the results into a permanent machine status tracking table. The second query answers a frequently asked question… what IBM CUMULATIVE PTF PACKAGE level is in use? For a little bit of extra sauce on this tasty treat, notice how the IN predicate is used. This query will work on systems using IBM i 6.1 or Cool.

24 QSYS2/Display_Journal – User Defined Table Function
Before 7.2 (must specify 15 parameters): SELECT journal_code, journal_entry_type, object, object_type, X.* FROM TABLE ( QSYS2.Display_Journal( 'PRODDATA', 'QSQJRN', -- Journal library and name '', '', Receiver library and name CAST(null as TIMESTAMP), -- Starting timestamp CAST(null as DECIMAL(21,0)), -- Starting sequence number '', Journal codes '', Journal entries '',‘’,'',‘', Object library, Object name, Object type, Object member ‘SCOTT', -- User '', Job '' Program ) ) AS x ORDER BY entry_timestamp DESC With 7.2 (leverage the optional parameters): SELECT journal_code, journal_entry_type, object, object_type, X.* FROM TABLE ( QSYS2.Display_Journal( 'PRODDATA', 'QSQJRN', -- Journal library and name “USER” => ‘SCOTT’ -- User ) ) AS x ORDER BY entry_timestamp DESC

25 DISPLAY_JOURNAL()  Example: What happened to my SALES data?
-- What rows were deleted from TOYSTORE5/SALES table this week? select ENTRY_DATA,ENTRY_TIMESTAMP,JOURNAL_ENTRY_TYPE,COUNT_OR_RRN as ROW_DELETED,"CURRENT_USER", RTRIM(JOB_NUMBER) CONCAT '/' CONCAT RTRIM(JOB_USER) CONCAT '/' CONCAT RTRIM(JOB_NAME) AS Qualified_Job_Name from table ( QSYS2.Display_Journal( 'TOYSTORE5', 'QSQJRN', -- Journal library and name '', '', -- Receiver library and name CURRENT TIMESTAMP - 7 DAYS, -- Starting timestamp CAST(null as DECIMAL(21,0)), -- Starting sequence number '', -- Journal codes 'DL', -- Journal entry type 'TOYSTORE5','SALES','*FILE','SALES', -- Object library, Object name, Object type, Object member '', -- User '', -- Job '' -- Program ) ) as x order by entry_timestamp desc ; Here’s an example of how to use the enhanced UDTF. In this example, a data journal is queried using the enhanced UDTF input parameters to find the data journal entries specific to changes made by SUPERUSER to the PRODDATA/SALES table. The example query further narrows the journal rows using a WHERE clause.

26 DISPLAY_JOURNAL()  Example: What happened to my SALES data?
-- What data was deleted from PRODDATA/SALES table this week? select cast(cast(substring(entry_data, ,10) as VARCHAR(10) for bit data) as DATE) AS SALES_DATE, cast(cast(substring(entry_data, ,15) as VARCHAR(15) for bit data) as varchar(15) ccsid 37) as SALES_PERSON, cast(cast(substring(entry_data, ,15) as VARCHAR(15) for bit data) as varchar(15) ccsid 37) as REGION, cast(cast(substring(entry_data, ,4) as VARCHAR(4) for bit data) as varchar(4)) as SALES from table ( QSYS2.Display_Journal( 'TOYSTORE5', 'QSQJRN', -- Journal library and name '', '', -- Receiver library and name CURRENT TIMESTAMP - 7 DAYS, -- Starting timestamp CAST(null as DECIMAL(21,0)), -- Starting sequence number '', -- Journal codes 'DL', -- Journal entries 'TOYSTORE5','SALES','*FILE','SALES', -- Object library, Object name, Object type, Object member '', -- User '', -- Job '' -- Program ) ) as x order by entry_timestamp desc Here’s an example of how to use the enhanced UDTF. In this example, a data journal is queried using the enhanced UDTF input parameters to find the data journal entries specific to changes made by SUPERUSER to the PRODDATA/SALES table. The example query further narrows the journal rows using a WHERE clause.

27 Navigator  Example: What happened to my SALES data?
Schemas  Journals  View Entries  Enter Filter Criteria We find the file and use the file format to format the data! Here’s an example of how to use the enhanced UDTF. In this example, a data journal is queried using the enhanced UDTF input parameters to find the data journal entries specific to changes made by SUPERUSER to the PRODDATA/SALES table. The example query further narrows the journal rows using a WHERE clause.

28 SQL catalogs  Work Management Services
Next stop… Work management detail, good stuff.

29 QSYS2/GET_JOB_INFO() – user defined table function
GET_JOB_INFO() accepts the jobname as input and returns a single row result table containing detail about that job. Enhanced with TR8: Use ‘*’ to return detail on the current job Current (or most recent) SQL Statement text returned Example 1) Get job information for the current job select a.* from table(qsys2.get_job_info('*')) a; Example 2) Get job information for the current job select a.* from table(qsys2.get_job_info('803868/Quser/Qzdasoinit')) a; Enhanced with TR8 This is our first instance of a UDTF style service. With DB2 for i, its not hard to use/consume UDTFs. Note the syntax is: SELECT * FROM TABLE(<UDTF invocation>) <table correlation name> Why is a User Defined Table Function provided for this service? The answer is that by using a UDTF, we have the ability to pass in a parameter to guide the data being returned. This service accepts a single parameter, the Qualified Job Name. The service examines that job and returns a single row table with loads of detail about that job. The service was initially built as a mechanism to provide extra detail when the QSYS2/SYSLIMITS catalog is queried. (a subject covered in a different powerticle)

30 QSYS2/SYSTEM_VALUE_INFO – view
Added in TR7 The new view return the same data as the Retrieve System Values (QWCRSVAL) API *ALLOBJ or *AUDIT special authority is required to retrieve the values for QAUDCTL, QAUDENDACN, QAUDFRCLVL, QAUDLVL, QAUDLVL2, and QCRTOBJAUD (‘*NOTAVL’ or -1 are returned when accessed by an unauthorized user): Catalog definition: SYSTEM_VALUE_NAME VARCHAR(10) – Name of the system value CURRENT_NUMERIC_VALUE BIGINT – System value when binary data is returned CURRENT_CHARACTER_VALUE VARGRAPHIC(1280) – System value when character data is returned Example: -- Examine the system values related to maximums SELECT * FROM QSYS2/SYSTEM_VALUE_INFO WHERE SYSTEM_VALUE_NAME LIKE '%MAX%' ORDER BY SYSTEM_VALUE_NAME System values are a critical component to system administration. Now, SQL users can access the same data that is returned via the The QSYS2/SYSTEM_VALUE_INFO catalog columns require a bit of explanation. System value come in two data types: character and numeric While every defined system value will have a single row returned, each row will have either a character or numeric value returned. The other column will contain the NULL value. The form and content of the data returned is consistent with the data returned on the Work with System Value (WRKSYSVAL) command and the Retrieve System Values (QWCRSVAL) API. Information Center reference  System administrators should love this catalog. You can automate reporting or use the query engine to keep two machines in sync.

31 QSYS2/SYSTEM_VALUE_INFO – view
Added in TR7 DECLARE GLOBAL TEMPORARY TABLE SESSION . Remote_System_Values ( SYSTEM_VALUE_NAME,CURRENT_NUMERIC_VALUE,CURRENT_CHARACTER_VALUE ) AS (SELECT * FROM X1423P2.QSYS2.SYSTEM_VALUE_INFO) WITH DATA WITH REPLACE; SELECT 'LP13UT16' AS "System Name", A.SYSTEM_VALUE_NAME,A.CURRENT_NUMERIC_VALUE,A.CURRENT_CHARACTER_VALUE FROM QSYS2.SYSTEM_VALUE_INFO A LEFT EXCEPTION JOIN SESSION.Remote_System_Values B ON A.SYSTEM_VALUE_NAME = B.SYSTEM_VALUE_NAME AND A.CURRENT_NUMERIC_VALUE IS NOT DISTINCT FROM B.CURRENT_NUMERIC_VALUE AND A.CURRENT_CHARACTER_VALUE IS NOT DISTINCT FROM B.CURRENT_CHARACTER_VALUE UNION ALL SELECT 'X1423P2' AS "System Name", B.SYSTEM_VALUE_NAME,B.CURRENT_NUMERIC_VALUE,B.CURRENT_CHARACTER_VALUE FROM QSYS2.SYSTEM_VALUE_INFO A RIGHT EXCEPTION JOIN SESSION.Remote_System_Values B ORDER BY SYSTEM_VALUE_NAME; Remote 3-part DGTT statement Use a query to find the SYSVAL differences between the two systems Powerticle bonus! Here’s a working, but more in-depth example. Suppose the I’m running on LP13UT16, my primary machine. The failover machine is named X1423P2, that’s my DR machine. The two machines should be identical. This example only works when LP13UT16 is running with IBM i 7.1, because we’re using a remote 3-part name on the DGTT statement.

32 QSYS2/SYSTEM_VALUE_INFO – view
Added in TR7 Example exception join output using SYSTEM_VALUE_INFO. If any rows are returned, there are system value differences between the two machines. The example, using the new SYSTEM_VALUE_INFO catalog, has enabled us to easily compare two machines and enable proactive systems management!

33 SQL catalogs  Command Services
Librarian Services Next stop… Command execution. Not a catalog, but definitely worth a look.

34 QSYS2.LIBRARY_LIST_INFO – view
New with TR9 / TR1 With direct access to the library list, SQL users can tap into the library list detail to: Programmatically review the environment Know when the library list needs to be adjusted Derive information about the libraries IASP Number Schema vs Library name mapping User vs System vs Product libraries Above all else, order of libraries searched for unqualified objects Example: SELECT * FROM QSYS2.LIBRARY_LIST_INFO

35 SQL catalogs  Command Services
Message Handling Services Next stop… Command execution. Not a catalog, but definitely worth a look.

36 QSYS2.JOBLOG_INFO – UDTF
New with TR9 / TR1 Job logs contain essential information. To understand a failure, job log messages are reviewed To understand which CL commands were issued, REQUEST messages in the job log are reviewed Even though trace and failure collection instrumentation exists, job logs are frequently requested by IBM Service The JOBLOG_INFO() UDTF provides a new service for application developers and system managers A single parameter indicates the target job. ‘*’ can be used to indicate use the current job as the target. Example 1: Find the most recently executed command in a target job SELECT MESSAGE_TEXT FROM TABLE(QSYS2.JOBLOG_INFO('706721/SCOTTF/QPADEV0006')) A WHERE A.MESSAGE_TYPE = 'REQUEST' ORDER BY ORDINAL_POSITION DESC FETCH FIRST 1 ROW ONLY

37 QSYS2.JOBLOG_INFO – UDTF
New with TR9 / TR1 Example 2: Automatic consumption of job log in an application CREATE OR REPLACE PROCEDURE TOYSTORE.UPDATE_SALES (IN P_NEW_SALES INTEGER, IN P_SALES_PERSON VARCHAR(100), IN P_SALES_DATE DATE) DYNAMIC RESULT SETS 1 LANGUAGE SQL MODIFIES SQL DATA SET OPTION COMMIT = *CHG BEGIN DECLARE C_RESULT_SET1 CURSOR WITH RETURN TO CALLER FOR SELECT MESSAGE_ID, MESSAGE_TEXT, MESSAGE_TYPE FROM SESSION.My_Joblog; Mainline: BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION DECLARE GLOBAL TEMPORARY TABLE My_Joblog AS (SELECT * FROM TABLE(QSYS2.JOBLOG_INFO('*')) A) WITH DATA WITH REPLACE; OPEN C_RESULT_SET1; END; UPDATE TOYSTORE.SALES SET SALES = SALES + P_NEW_SALES WHERE SALES_PERSON = P_SALES_PERSON AND SALES_DATE = P_SALES_DATE; END Mainline; END ; CALL TOYSTORE.UPDATE_SALES(3, 'LUCCHESSI', ' ')

38 QSYS2.REPLY_LIST_INFO – view
New with TR9 / TR1 One reply list handles system wide automatic response to messages Now, SQL can be used to: Compare (exception join) the configuration of two machines Determine whether a specific sequence number is already in use Confirm whether setup is complete REPLY_LIST_INFO matches the Work Reply List Entry (WRKRPYLE) command behavior of allowing *PUBLIC users to view the reply list information Example: SELECT * FROM QSYS2.REPLY_LIST_INFO WHERE message_ID like 'CPA%'

39 SQL catalogs  Security Services
Next stop… Security. This is a long stop because there’s lots of Security detail.

40 QSYS2/GROUP_PROFILE_ENTRIES – view
Use SQL to understand: What Group Profiles exist Which User Profiles belong to specific Group Profiles The text associated with the profile Handles both: Group profile GRPPRF Supplemental groups SUPGRPPRF Example: select * from qsys2.group_profile_entries The QSYS2/GROUP_PROFILE_ENTRIES catalog provides an easy way to determine which Group profiles are defined and which user’s belong to those groups. If you don’t know the Group profile name or you just want to see all Group profile membership across the machine, this catalog gets the job done. This is a simple, but useful catalog.

41 SYSIBM.AUTHORIZATIONS – view
The AUTHORIZATIONS catalog has been extended to include a new column, which differentiates users from groups. The AUTHORIZATIONS view is a DB2 family compatible catalog which contains one row for every authorization ID. If you prefer to use a DB2 standards based approach for handling Group profiles, use the SYSIBM.AUTHORIZATIONS catalog. With the addition of the AUTHORIZATION_ATTR column, you can use SQL to discern between users and groups. However, this catalog doesn’t indicate Group profile membership. You’ll have to use QSYS2/GROUP_PROFILE_ENTRIES or QSYS2/GROUP_USERS() if you need to see Group profile membership detail.

42 QSYS2/USER_INFO – view Added in TR7
Built upon the data returned by the Retrieve User Information (QSYRUSRI) API. Users see the data for any *USRPRF to which they have *READ authority Setup details, authorizations, and more… easy access to deep details Example: -- Which users are having trouble signing on? SELECT * FROM USER_INFO WHERE SIGN_ON_ATTEMPTS_NOT_VALID > 0 With the QSYS2/USER_INFO catalog, you have been given a catalog that opens the door to many uses. The example shown is just one of many questions that are easily answered by querying the catalog. Besides enabling Systems management problem resolution, a security model can be monitored and cataloged using SQL and DB2 for i. For instance, once a week, a program could run that uses 3-part naming to seamlessly connect to all machines and query QSYS2/USER_INFO, saving the detail away in a Systems management tracking table. When an employee leaves the company, SQL could be used to assess where action needs to be taken. To understand the data returned by this catalog, visit Information Center at the link provided. The catalog returns the same data as the Retrieve User Information (QSYRUSRI) API. Information Center reference 

43 USER_INFO & GROUP_PROFILE_ENTRIES
Leverage multiple services to answer more interesting questions -- -- Which users have *ALLOBJ authority either directly -- or via a Group or Supplemental profile? SELECT AUTHORIZATION_NAME, STATUS, NO_PASSWORD_INDICATOR, PREVIOUS_SIGNON, TEXT_DESCRIPTION FROM QSYS2.USER_INFO WHERE SPECIAL_AUTHORITIES LIKE '%*ALLOBJ%' OR AUTHORIZATION_NAME IN ( SELECT USER_PROFILE_NAME FROM QSYS2.GROUP_PROFILE_ENTRIES WHERE GROUP_PROFILE_NAME IN ( SELECT AUTHORIZATION_NAME WHERE SPECIAL_AUTHORITIES like '%*ALLOBJ%' ) ORDER BY AUTHORIZATION_NAME;

44 USER_INFO & GROUP_PROFILE_ENTRIES
Query results…

45 QSYS2/USER_INFO – view New Columns
Enhanced with TR8 Extended to include columns that are available to users of the QSYRUSRI() API. Example: -- Which enabled users are at risk of becoming disabled due to lack of use? SELECT * FROM QSYS2.USER_INFO WHERE STATUS = '*ENABLED' AND LAST_USED_TIMESTAMP IS NOT NULL ORDER BY LAST_USED_TIMESTAMP ASC FETCH FIRST 20 ROWS ONLY New Columns With the QSYS2/USER_INFO catalog, you have been given a catalog that opens the door to many uses. The example shown is just one of many questions that are easily answered by querying the catalog. Besides enabling Systems management problem resolution, a security model can be monitored and cataloged using SQL and DB2 for i. For instance, once a week, a program could run that uses 3-part naming to seamlessly connect to all machines and query QSYS2/USER_INFO, saving the detail away in a Systems management tracking table. When an employee leaves the company, SQL could be used to assess where action needs to be taken. To understand the data returned by this catalog, visit Information Center at the link provided. The catalog returns the same data as the Retrieve User Information (QSYRUSRI) API. Information Center reference 

46 QSYS2/USER_STORAGE – view
Added in TR7 Built upon the data returned by the Retrieve User Information (QSYRUSRI) API. Users see the data for any *USRPRF to which they have *READ authority User storage is broken down by SYSBAS and iASPs Example: -- How much storage has user SCOTTF consumed? SELECT * FROM QSYS2/USER_STORAGE WHERE USER_NAME = ‘SCOTTF’ Similar to USER_INFO, the QSYS2/USER_STORAGE catalog returns a breakdown of the storage consumed by the user’s on the system. The information is granular to the database, so you can see the iASP specific consumption. Using the SQL Query Engine, you can SUM and ORDER BY descending to see the top storage consumers by USER_NAME or by ASPGRP. If user profiles has been configured to have storage maximums, the catalog can be used to easily determine the highest percentage used or answer other storage consumption questions. To study the data returned by this catalog, visit Information Center at the link provided. The catalog returns the same data as the Retrieve User Information (QSYRUSRI) API. Information Center reference 

47 QSYS2/FUNCTION_INFO – view
Added in TR7 Built upon the data returned by the Retrieve Function Information (QSYRTVFI, QsyRetrieveFunctionInformation) API Any user can examine the function usage identifiers. Only users with *SECADM user special authority can examine the function usage configuration details returned via the QSYS2.FUNCTION_INFO catalog. Each row describes the function usage defined on the machine. Example: -- Which function usage IDs exist and what is the default configuration? SELECT * FROM QSYS2/FUNCTION_INFO ORDER BY FUNCTION_ID Function usage is great for security because it’s a granular control. Instead of weighing the risks involved with granting user special authority, function usage can be used to enable or block many tasks. Better yet, function usage is auditable. Changes to the function usage and instances of failed function usage authorization are captured in the IBM i Audit Journal (QSYS/QAUDJRN), if you’ve configured security tracking. What are all the function usage IDs available for use? The answer is at your fingertips with a simple query of the QSYS2/FUNCTION_INFO catalog. This catalog returns all the definitional details for each function usage. Dig deeper by querying your system using the catalog and reading about the detail in Information Center: Information Center reference 

48 QSYS2/FUNCTION_USAGE – view
Added in TR7 The detail returned corresponds to the data returned by the Retrieve Function Usage Information  (QSYRTFUI, QsyRetrieveFunctionUsageInfo) API. Only users with *SECADM user special authority can examine the function usage configuration details returned with this view.  Users without *SECADM authority who attempt to reference this view will get SQLCODE -443. Each row corresponds with users or groups that have function usage settings Example: -- What function usage has been granted or revoked? SELECT * FROM QSYS2/FUNCTION_USAGE ORDER BY FUNCTION_ID, USER_NAME Where QSYS2/FUNCTION_INFO is the catalog to use to see the possible function usage IDs, the QSYS2/FUNCTION_INFO catalog returns the function usage user/group detail. Use this catalog when you need to determine which users/groups have been permitted (ALLOWED) or disallowed (DENIED) to use the function. One row will be returned for every instance of ALLOWED/DENIED function usage detail. Dig deeper by querying your system using the catalog and reading about the detail in Information Center: Information Center reference 

49 SQL catalogs  Storage Services
Next stop… Storage. Not database objects, but storage devices.

50 QSYS2/SYSDISKSTAT – view
The SYSDISKSTAT catalog can be used to quickly and easily understand the DISK information using SQL. Examples: -- Query information for all SSD units SELECT * FROM QSYS2/SYSDISKSTAT WHERE UNIT_TYPE = 1 -- Query information for all DISKs, order by percentage used SELECT PERCENT_USED, A.* FROM QSYS2/SYSDISKSTAT A ORDER BY PERCENT_USED DESC Can you name a system command that allows you to query the statistical details for your Solid State Disk (SSD)? If you’re willing to entertain using SQL, you can use the QSYS2/SYSDISKSTAT to query SSDs and more. Read about the columns here and consider using the assess and track unit storage devices.

51 QSYS2/SYSTMPSTG – view Improved System Management with DB2 for i Observe System-wide Temporary storage consumption via a new DB2 for i Service: QSYS2/SYSTMPSTG Read all about it in IBM Knowledge Center: -- Which jobs are the top consumers of temporary storage? SELECT bucket_current_size, bucket_peak_size, rtrim(job_number) concat '/' concat rtrim(job_user_name) concat '/' concat rtrim(job_name) as q_job_name FROM QSYS2.SYSTMPSTG WHERE job_status = '*ACTIVE' ORDER BY bucket_current_size desc

52 SQL catalogs  Command Services
Next stop… Command execution. Not a catalog, but definitely worth a look.

53 QSYS2/QCMDEXC – Procedure
The QCMDEXC procedure can be used within SQL applications to easily execute CL Commands. Examples: DECLARE V_CPYLIB_COMMAND VARCHAR(500); DECLARE V_CPYLIB_LEN DECIMAL(15, 5); SET V_CPYLIB_COMMAND = 'CPYLIB FROMLIB(' CONCAT RTRIM(V_LIBRARY) CONCAT ') TOLIB(' CONCAT RTRIM(V_NEW_LIBRARY) CONCAT ') DATA(*NO)‘; SET V_CPYLIB_LEN = CHARACTER_LENGTH(V_CPYLIB_COMMAND); CALL QSYS2/QCMDEXC(V_CPYLIB_COMMAND, V_CPYLIB_LEN); CALL QSYS2/QCMDEXC('ADDLIBLE PRODLIB2',17); Length argument no longer required: CALL QSYS2/QCMDEXC('ADDLIBLE PRODLIB2'); This is a good place to have the last slide focused on a specific capability. When using SQL, you can execute IBM i Commands. The command invocation can be hardcoded or dynamically built. Of course, you still have to satisfy the specific command requirements for minimum authorization. The examples illuminate how easy it is to incorporate command execution into an SQL application. The first example is the most complex. It uses the SET statement to build a command string, with the help of the CONCAT, RTRIM & CHARACTER_LENGTH built-in functions. When the command is built, the CALL statement is used to commence execution of the statement. The second example shows a hard-coded command string with a hard-coded command string length. The third example demonstrates the same command string, without the second parameter. For this procedure execution, Added in TR7, the procedure calculates the command string length. Added in TR7

54 DB2 for i built-in Global Variables
Next stop… Command execution. Not a catalog, but definitely worth a look.

55 DB2 for i Built-in Global Variables
Enhanced with TR1 The qualified job name of the current connection is easily accessed When SQL Server Mode is used, the job name of the application instance which owns the connection is accessed through SERVER_MODE_JOB_NAME Use these variables to deploy advanced logic in triggers, RCAC rules, and more Variable name Schema Data Type Size JOB_NAME QSYS2 VARCHAR 28 SERVER_MODE_JOB_NAME CLIENT_IPADDR SYSIBM 128 CLIENT_HOST 255 CLIENT_PORT INTEGER - PACKAGE_NAME PACKAGE_SCHEMA PACKAGE_VERSION 64 ROUTINE_SCHEMA ROUTINE_SPECIFIC_NAME ROUTINE_TYPE CHAR 1 New with IBM i 7.2 SF99702 Level 3 Available with base IBM i 7.2

56 Built-in Global Variables – Client information
SELECT SYSIBM.client_host AS CLIENT_HOST, SYSIBM.client_ipaddr AS CLIENT_IP, SYSIBM.client_port AS CLIENT_PORT FROM LP92UT27.SYSIBM.SYSDUMMY1 SELECT * FROM LP92UT27.QSYS2.TCPIP_INFO Two ways to extract the detail Global variables fit nicely into View definitions & RCAC masks/permissions

57 SQL catalogs  Landscape view
At this point, you may have wondered to yourself, where are all these services documented? Or Is there a single point of reference for all these DB2 for i supplied services? Turn the page…

58 IBM® DB2® for i Catalogs SYSCATALOGS INFORMATION_SCHEMA_CATALOG_NAME
Privileges SYSFUNCS SYSJARCONTENTS SYSJAROBJECTS SYSPARMS SYSPROCS SYSROUTINEDEP SYSROUTINES SQLFUNCTIONCOLS SQLFUNCTIONS SQLPROCEDURECOLS SQLPROCEDURES PARAMETERS ROUTINES Routines Statistics SYSCOLUMNSTAT SYSINDEXSTAT SYSMQTSTAT SYSPACKAGESTAT SYSPACKAGESTMTSTAT SYSPARTITIONDISK SYSPARTITIONINDEXES SYSPARTITIONINDEXDISK SYSPARTITIONINDEXSTAT SYSPARTITIONMQTS SYSPARTITIONSTAT SYSPROGRAMSTAT SYSPROGRAMSTMTSTAT SYSTABLEINDEXSTAT SYSTABLESTAT SQLSTATISTICS SQLCOLPRIVILEGES SQLTABLEPRIVILEGES AUTHORIZATIONS ROUTINE_PRIVILEGES UDT_PRIVILEGES USAGE_PRIVILEGES VARIABLE_PRIVILEGES SYSCOLAUTH SYSCONTROLS SYSCONTROLSDEP SYSPACKAGEAUTH SYSROUTINEAUTH SYSSCHEMAAUTH SYSSEQUENCEAUTH SYSTABAUTH SYSUDTAUTH SYSVARIABLEAUTH SYSXSROBJECTAUTH SQLSCHEMAS SCHEMATA Schemas SYSSCHEMAS SQL_FEATURES SQL_LANGUAGES SQL_SIZING CHARACTER_SETS Database Support SYSCOLUMNS SYSCOLUMNS2 SYSFIELDS SYSINDEXES SYSKEYS SYSTABLEDEP SYSTABLES SYSVIEWDEP SYSVIEWS SQLCOLUMNS SQLSPECIALCOLUMNS SQLTABLES COLUMNS TABLES VIEWS Tables Views Indexes Constraints SYSCHKCST SYSCST SYSCSTCOL SYSCSTDEP SYSKEYCST SYSREFCST Miscellaneous Objects SYSPACKAGE SYSSEQUENCES SYSTYPES SYSVARIABLEDEP SYSVARIABLES SYSTRIGCOL SYSTRIGDEP SYSTRIGGERS SYSTRIGUPD Triggers XSRANNOTATIONINFO XSROBJECTCOMPONENTS XSROBJECTHIERARCHIES XSROBJECTS XML Schemas SQLFOREIGNKEYS SQLPRIMARYKEYS SQLTYPEINFO SQLUDTS CHECK_CONSTRAINTS REFERENTIAL_CONSTRAINTS TABLE_CONSTRAINTS DB2 for i catalog views (QSYS2) ODBC and JDBCTM catalog views (SYSIBM) ANS and ISO catalog views (QSYS2) USER_DEFINED_TYPES SEQUENCES Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Other company, product or service names may be trademarks or service marks of others.

59 Health Center Procedures
IBM® DB2® for i Services Health Center Procedures Application Services PTF Services QSYS2.PTF_INFO – VIEW QSYS2.GROUP_PTF_INFO – VIEW QSYS2.HEALTH_ACTIVITY QSYS2.HEALTH_DATABASE_OVERVIEW QSYS2.HEALTH_DESIGN_LIMITS QSYS2.HEALTH_ENVIRONMENTAL_LIMITS QSYS2.HEALTH_SIZE_LIMITS QSYS2.RESET_ENVIRONMENTAL_LIMITS QSYS2.QCMDEXC - PROCEDURE QSYS2.OVERRIDE_TABLE – PROCEDURE QSYS2.DELIMIT_NAME – UDF SYSPROC.WLM_SET_CLIENT_INFO – PROCEDURE TCP/IP Services QSYS2.TCPIP_INFO – VIEW SYSIBMADM.ENV_SYS_INFO – VIEW Utility Procedures Security Services QSYS2.CANCEL_SQL QSYS2.DUMP_SQL_CURSORS QSYS2.EXTRACT_STATEMENTS QSYS2.FIND_AND_CANCEL_QSQSRVR_SQL QSYS2.FIND_QSQSRVR_JOBS QSYS2.GENERATE_SQL QSYS2.RESTART_IDENTITY SYSTOOLS.CHECK_CST SYSTOOLS.CHECK_SYSROUTINE QSYS2.FUNCTION_INFO – VIEW QSYS2.FUNCTION_USAGE – VIEW QSYS2.GROUP_PROFILE_ENTRIES – VIEW SYSPROC.SET_COLUMN_ATTRIBUTE - PROCEDURE QSYS2.SQL_CHECK_AUTHORITY - UDF QSYS2.USER_INFO – VIEW Work Management Services QSYS2.SYSTEM_VALUE_INFO – VIEW QSYS2.GET_JOB_INFO – UDTF Object Services QSYS2.OBJECT_STATISTICS – UDTF System Health Services QSYS2.SYSLIMTBL - TABLE QSYS2.SYSLIMITS – VIEW Storage Services QSYS2.CHANGE_PLAN_CACHE_SIZE QSYS2.DUMP_PLAN_CACHE QSYS2.DUMP_PLAN_CACHE_PROPERTIES QSYS2.DUMP_PLAN_CACHE_topN QSYS2/DUMP_SNAP_SHOT_PROPERTIES QSYS2.END_ALL_PLAN_CACHE_EVENT_MONITORS QSYS2.END_PLAN_CACHE_EVENT_MONITOR QSYS2.START_PLAN_CACHE_EVENT_MONITOR (2) Plan Cache Procedures QSYS2.SYSDISKSTAT – VIEW QSYS2.SYSTMPSTG – VIEW QSYS2.USER_STORAGE – VIEW Journal Services QSYS2.DISPLAY_JOURNAL – UDTF QSYS2.JOURNAL_INFO – View Message Handling Services QSYS2.JOBLOG_INFO – View QSYS2.REPLY_LIST_INFO – View SYSTOOLS.ACT_ON_INDEX_ADVICE - PROCEDURE SYSTOOLS.HARVEST_INDEX_ADVICE - PROCEDURE QSYS2.OVERRIDE_QAQQINI - PROCEDURE QSYS2.RESET_TABLE_INDEX_STATISTICS - PROCEDURE QSYS2.SYSIXADV - TABLE SYSTOOLS.REMOVE_INDEXES - PROCEDURE Performance Services Librarian Services QSYS2.LIBRARY_LIST_INFO – View DB2 for i Services IBM i Services

60 Documentation With IBM i 7.2, these and other services will be documented within the “Database Performance and Optimization” book The Technology Updates wiki includes fact pages for these services

61 Special notices This document was developed for IBM offerings in the United States as of the date of publication. IBM may not make these offerings available in other countries, and the information is subject to change without notice. Consult your local IBM business contact for information on the IBM offerings available in your area. Information in this document concerning non-IBM products was obtained from the suppliers of these products or other public sources. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. Send license inquires, in writing, to IBM Director of Licensing, IBM Corporation, New Castle Drive, Armonk, NY USA. All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. The information contained in this document has not been submitted to any formal IBM test and is provided "AS IS" with no warranties or guarantees either expressed or implied. All examples cited or described in this document are presented as illustrations of the manner in which some IBM products can be used and the results that may be achieved. Actual environmental costs and performance characteristics will vary depending on individual client configurations and conditions. IBM Global Financing offerings are provided through IBM Credit Corporation in the United States and other IBM subsidiaries and divisions worldwide to qualified commercial and government clients. Rates are based on a client's credit rating, financing terms, offering type, equipment type and options, and may vary by country. Other restrictions may apply. Rates and offerings are subject to change, extension or withdrawal without notice. IBM is not responsible for printing errors in this document that result in pricing or information inaccuracies. All prices shown are IBM's United States suggested list prices and are subject to change without notice; reseller prices may vary. IBM hardware products are manufactured from new parts, or new and serviceable used parts. Regardless, our warranty terms apply. Any performance data contained in this document was determined in a controlled environment. Actual results may vary significantly and are dependent on many factors including system hardware configuration and software design and configuration. Some measurements quoted in this document may have been made on development-level systems. There is no guarantee these measurements will be the same on generally-available systems. Some measurements quoted in this document may have been estimated through extrapolation. Users of this document should verify the applicable data for their specific environment.

62 Special notices (cont.)
IBM, the IBM logo, ibm.com AIX, AIX (logo), AIX 6 (logo), AS/400, BladeCenter, Blue Gene, ClusterProven, DB2, ESCON, i5/OS, i5/OS (logo), IBM Business Partner (logo), IntelliStation, LoadLeveler, Lotus, Lotus Notes, Notes, Operating System/400, OS/400, PartnerLink, PartnerWorld, PowerPC, pSeries, Rational, RISC System/6000, RS/6000, THINK, Tivoli, Tivoli (logo), Tivoli Management Environment, WebSphere, xSeries, z/OS, zSeries, AIX 5L, Chiphopper, Chipkill, Cloudscape, DB2 Universal Database, DS4000, DS6000, DS8000, EnergyScale, Enterprise Workload Manager, General Purpose File System, , GPFS, HACMP, HACMP/6000, HASM, IBM Systems Director Active Energy Manager, iSeries, Micro-Partitioning, POWER, PowerExecutive, PowerVM, PowerVM (logo), PowerHA, Power Architecture, Power Everywhere, Power Family, POWER Hypervisor, Power Systems, Power Systems (logo), Power Systems Software, Power Systems Software (logo), POWER2, POWER3, POWER4, POWER4+, POWER5, POWER5+, POWER6, POWER6+, System i, System p, System p5, System Storage, System z, Tivoli Enterprise, TME 10, Workload Partitions Manager and X-Architecture are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. UNIX is a registered trademark of The Open Group in the United States, other countries or both. Linux is a registered trademark of Linus Torvalds in the United States, other countries or both. Microsoft, Windows and the Windows logo are registered trademarks of Microsoft Corporation in the United States, other countries or both. Intel, Itanium, Pentium are registered trademarks and Xeon is a trademark of Intel Corporation or its subsidiaries in the United States, other countries or both. AMD Opteron is a trademark of Advanced Micro Devices, Inc. Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United States, other countries or both. TPC-C and TPC-H are trademarks of the Transaction Performance Processing Council (TPPC). SPECint, SPECfp, SPECjbb, SPECweb, SPECjAppServer, SPEC OMP, SPECviewperf, SPECapc, SPEChpc, SPECjvm, SPECmail, SPECimap and SPECsfs are trademarks of the Standard Performance Evaluation Corp (SPEC). NetBench is a registered trademark of Ziff Davis Media in the United States, other countries or both. AltiVec is a trademark of Freescale Semiconductor, Inc. Cell Broadband Engine is a trademark of Sony Computer Entertainment Inc. InfiniBand, InfiniBand Trade Association and the InfiniBand design marks are trademarks and/or service marks of the InfiniBand Trade Association. Other company, product and service names may be trademarks or service marks of others.


Download ppt "SQL for the System Administrator"

Similar presentations


Ads by Google