IBM Systems and Technology Group © 2008 IBM Corporation IBM i – SQL0901 logger August 3, 2009.

Slides:



Advertisements
Similar presentations
Introduction to ReportSmith and Effective Dated Tables
Advertisements

Module 8 Importing and Exporting Data. Module Overview Transferring Data To/From SQL Server Importing & Exporting Table Data Inserting Data in Bulk.
1 R elational D ata B ase A id Copyright © 2002 Sakman Software Corp.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
With Microsoft Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Templates and Styles Excel Advanced. Templates are pre- designed and formatted spreadsheets –They provide consistency of layout/structure –They.
Sung Hsueh, Arvind Ranasaria Microsoft SQL Server Microsoft Corp 6/13/2008 SIGMOD DBTest Cross feature testing in database systems.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
A Guide to SQL, Seventh Edition. Objectives Embed SQL commands in PL/SQL programs Retrieve single rows using embedded SQL Update a table using embedded.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
07/19/04 NorCal OAUG Training Day, Paper 2.4 John Peters, JRPJR, Inc.1 Oracle Workflow Notifications John Peters JRPJR, Inc.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
1 An Introduction to SQL. 2 Objectives  Understand the concepts and terminology associated with relational databases  Create and run SQL commands 
Sayed Ahmed Computer Engineering, BUET, Bangladesh MSC, Computer Science, U of Manitoba, Canada
LSC Segment Database Duncan Brown Caltech LIGO-G Z.
Stored Procedures, Transactions, and Error-Handling
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
Key Applications Module Lesson 21 — Access Essentials
Triggers and Stored Procedures in DB 1. Objectives Learn what triggers and stored procedures are Learn the benefits of using them Learn how DB2 implements.
Set path vs current schema. Set Current Schema ‘The CURRENT SCHEMA special register specifies a VARCHAR(128) value that identifies the schema name used.
1 A Guide to SQL Chapter 2. 2 Introduction Mid-1970s: SQL developed under the name SEQUEL at IBM by San Jose research facilities to be the data manipulation.
Stored Procedures Week 9. Test Details Stored Procedures SQL can call code written in iSeries High Level Languages –Called stored procedures SQL has.
SCUHolliday - coen 1788–1 Schedule Today u Modifications, Schemas, Views. u Read Sections (except and 6.6.6) Next u Constraints. u Read.
Programmatic SQL Shaista Khan CS 157B. Topic Embedded SQL statements in high-level programming languages.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
DBT544. DB2/400 Advanced Features Level Check Considerations Database Constraints File Overrides Object and Record Locks Trigger Programs.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
Dr Gordon Russell, Napier University Unit Embedde SQL - V2.0 1 Embedded SQL Unit 5.1.
A Guide to SQL, Eighth Edition Chapter Eight SQL Functions and Procedures.
Altering Tables and Constraints Database Systems Objectives Add and modify columns. Add, enable, disable, or remove constraints. Drop a table. Remove.
Slide 1 Chapter 7 – Part 3 Stored Procedure, Function &Trigger.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Stored Procedures / Session 4/ 1 of 41 Session 4 Module 7: Introducing stored procedures Module 8: More about stored procedures.
IMS 4212: Application Architecture and Intro to Stored Procedures 1 Dr. Lawrence West, Management Dept., University of Central Florida
Basic SQL*Plus edit and execute commands SQL*Plus buffer and built-in editor holds the last SQL statement Statements are created in free-flow style and.
Unit-8 Introduction Of MySql. Types of table in PHP MySQL supports various of table types or storage engines to allow you to optimize your database. The.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
SAP R/3 User Administration1. 2 User administration in a productive environment is an ongoing process of creating, deleting, changing, and monitoring.
Dynamic SQL Writing Efficient Queries on the Fly ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
In this session, you will learn to: Create and manage views Implement a full-text search Implement batches Objectives.
1. Advanced SQL Functions Procedural Constructs Triggers.
Migration to Central Data Exchange (CDX)
Web Database Programming Using PHP
3 A Guide to MySQL.
Architecture Review 10/11/2004
The STEM Academy Data Solution
CS 3630 Database Design and Implementation
A Guide to SQL, Seventh Edition
CS320 Web and Internet Programming SQL and MySQL
Archiving and Document Transfer Utilities
SQL and SQL*Plus Interaction
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
Permissions to database objects Indexes RUNSQLSTM Referential Constraint options ON DELETE RESTRICT ON DELETE CASCADE ON DELETE SET DEFAULT Lab.
Web Database Programming Using PHP
Types of SQL Commands Farrokh Alemi, PhD
Chapter 2: Creating And Modifying Database Tables
CS3220 Web and Internet Programming SQL and MySQL
Grocery Store Outline csc242 – web programming.
IST 318 Database Administration
CS3220 Web and Internet Programming SQL and MySQL
Updating Databases With Open SQL
Permissions to database objects Indexes RUNSQLSTM Referential Constraint options ON DELETE RESTRICT ON DELETE CASCADE ON DELETE SET DEFAULT Lab.
Updating Databases With Open SQL
Presentation transcript:

IBM Systems and Technology Group © 2008 IBM Corporation IBM i – SQL0901 logger August 3, 2009

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – the problem 03/10/09  SQL0901 is the message that is sent when SQLCODE = -901, indicating that an unexpected DB2 for IBM i error has been encountered.  If the joblog is not saved, we ask customers to recreate the failure.  SQL0901’s encountered by Client based applications can be hard to isolate because its hard to find the related joblog

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – improved failure collection 03/10/09  A 901 logger table has been implemented for V5R4, IBM i 6.1 and future releases.  When an SQL0901 occurs, just prior to sending the SQL0901 message, we collect details regarding the failure and insert a new row in the QRECOVERY.QSQ901S table.  A unique instance of a job will log the first three SQL0901 failures. Any subsequent 901 failures are most likely uninteresting and therefore are not logged.  The QIBM_NO_901_LOGGING environment variable can be used to disable SQL0901 logging.

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – enabling PTFs 03/10/09  IBM i 5.4 PTFs: SI35568 and SI35570 The 5.4 PTFs are included with DB Group PTF SF99504 (Version #22), which became available on 8/7/2009.  IBM i 6.1 PTFs: SI35437 and SI35667 The 6.1 PTFs are included with DB Group PTF SF99601 (Version #10), which has a target availability of 8/28/2009.

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – table definition (V5R4) 03/10/09  QRECOVERY.QSQ901S columns:  SERVERNAME VARCHAR(18) The database name being used at the point of failure.  FAILTIME TIMESTAMP The timestamp when the SQL0901 occurred.  FAILRSN INTEGER The unique failure reason that appeared in the SQL0901 message. Note, this reason code is useful to IBM service but is not documented externally.  CURUSER VARCHAR(18) The user name of the user who encountered the SQL0901.  JOBNAME CHAR(28) The qualified job name of the job that encountered the SQL0901.

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – table definition (V5R4) 03/10/09  QRECOVERY.QSQ901S columns: (continued)  MSGS VARCHAR(3000) The messages, in order from most recent to least recent, which precede the SQL0901 message. Each message is prefixed with the text ‘MESSAGE: ‘. Example message text: MESSAGE: MCH3601 F/QSQRUN2-MODULE/QSQFETCH-PROCEDURE/F_GETNEXTL-STMT/9550 T/QSQRUN2-MODULE/QSQFETCH-PROCEDURE/F_GETNEXTL-STMT/9550  Note that the format of the message text makes it easy to cut and paste the point of failure detail into the System i support search facilities, making it possible for customers to find solutions to problems.  The MSGS column will most likely contain many messages. If a message was removed, it won’t appear in the MSGS column.

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – table definition (IBM i 6.1) 03/10/09  QRECOVERY.QSQ901S additional columns:  VRM CHAR(10) The version, release and modification level at the point of failure. For example: ‘V6R1M0 ’  DBGROUP CHAR(10) The Database Group PTF level at the point of failure. For example: ‘SF ’  CLIENTUSER VARCHAR(255) The value contained within the CURRENT CLIENT_USERID special register at the point of failure.  CLIENTAPP VARCHAR(255) The value contained within the CURRENT CLIENT_APPLNAME special register at the point of failure.  CLIENTPGM VARCHAR(255) The value contained within the CURRENT CLIENT_PROGRAMID special register at the point of failure.

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – table definition (IBM i 6.1) 03/10/09  QRECOVERY.QSQ901S additional columns:  CLIENTWRK VARCHAR(255) The value contained within the CURRENT CLIENT_WRKSTNNAME special register at the point of failure.  CLIENTACCT VARCHAR(255) The value contained within the CURRENT CLIENT_ACCTNG special register at the point of failure.  CONNUSER VARCHAR(128) The value contained within the SYSTEM_USER special register at the point of failure.  The SQL Reference explains how the Client Special registers can be set:

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – V5R4 example 03/10/09  MESSAGE: MCH3601 F/QSQRUN2-MODULE/QSQFETCH-PROCEDURE/F_GETNEXTL-STMT/9550 T/QSQRUN2-MODULE/QSQFETCH-PROCEDURE/F_GETNEXTL-STMT/9550  MESSAGE: SQL0508 F/QSQRUN3-MODULE/QSQUPDAT-PROCEDURE/CLEANUP-STMT/25204 T/QSQRUN3-MODULE/QSQUPDAT-PROCEDURE/CLEANUP-STMT/25204  MESSAGE: CPF501B F/QDBSIGEX-INS/01EA T/QSQRUN3-MODULE/QSQUPDAT-PROCEDURE/SQL_Update-STMT/12590  MESSAGE: CPI434B F/QQQQUERY-MODULE/QQQQUERY-PROCEDURE/CLEANUP-STMT/27382 T/QSQRUN3-MODULE/QSQOPEN-PROCEDURE/FULL_OPEN-STMT/23178  MESSAGE: CPF9898 F/QQQOOODBOP-MODULE/QQQOOOINV-PROCEDURE/CALLDBMAINTFOROPENOROPTIMIZE-STMT/4125 T/QQQOOODBOP-MODULE/QQQOOOINV- PROCEDURE/QDBOPINVOKE-STMT/3993  MESSAGE: CPI434A F/QQQQUERY-MODULE/QQQQUERY-PROCEDURE/QQQQUERY-STMT/14253 T/QSQRUN3-MODULE/QSQOPEN-PROCEDURE/FULL_OPEN-STMT/23178  MESSAGE: CPI434B F/QQQQUERY-MODULE/QQQQUERY-PROCEDURE/CLEANUP-STMT/27382 T/QSQRUN3-MODULE/QSQOPEN-PROCEDURE/FULL_OPEN-STMT/23178  MESSAGE: CPF9898 F/QQQOOODBOP-MODULE/QQQOOOINV-PROCEDURE/CALLDBMAINTFOROPENOROPTIMIZE-STMT/4125 T/QQQOOODBOP-MODULE/QQQOOOINV- PROCEDURE/QDBOPINVOKE-STMT/3993  MESSAGE: CPI434A F/QQQQUERY-MODULE/QQQQUERY-PROCEDURE/QQQQUERY-STMT/14253 T/QSQRUN3-MODULE/QSQOPEN-PROCEDURE/FULL_OPEN-STMT/23178  MESSAGE: CPI434B F/QQQQUERY-MODULE/QQQQUERY-PROCEDURE/CLEANUP-STMT/27382 T/QSQRUN3-MODULE/QSQOPEN-PROCEDURE/FULL_OPEN-STMT/23178  MESSAGE: CPF9898 F/QQQOOODBOP-MODULE/QQQOOOINV-PROCEDURE/CALLDBMAINTFOROPENOROPTIMIZE-STMT/4125 T/QQQOOODBOP-MODULE/QQQOOOINV- PROCEDURE/QDBOPINVOKE-STMT/3993  MESSAGE: CPI434A F/QQQQUERY-MODULE/QQQQUERY-PROCEDURE/QQQQUERY-STMT/14253 T/QSQRUN3-MODULE/QSQOPEN-PROCEDURE/FULL_OPEN-STMT/23178

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – IBM i 6.1 example 03/10/09 SQL0901’s hit when using Interactive SQL (STRSQL) or Run SQL Statement (RUNSQLSTM) commands will notice that the Client Special register values contain default values.

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – Database Group PTF 03/10/09 Use the WRKGRPPTF command to see the Database Group PTF level. IBM i WRKPTFGRP PTFGRP(SF99601) IBM i WRKPTFGRP PTFGRP(SF99504)

© 2008 IBM Corporation IBM Systems and Technology Group SQL0901 logger – FAQ 03/10/09  How is the QRECOVERY.QSQ901S table managed? Users can delete the table or specific rows in the table as they wish. The table is not protected like a catalog. When a -901 occurs, we will recreate the table, if needed.  How should the table be used? SQL0901’s are an indication of a DB2 for IBM i internal failure. You may observe logging of internal failures that are not causing significant problems or pain to the users. The logger is similar to First Failure Data Capture (FFDC) and STRDST VLOG’s, in that you may observe failures being logged that are less important. The high value use case for the SQL0901 logger is when a severe error is observed, the failure symptom includes an SQL0901 and the joblog can’t be found.  How can the customer collect this data and send it to IBM? Do the following: CRTSAVF QGPL/LOG901 SAVOBJ OBJ(QSQ901S) LIB(QRECOVERY) DEV(*SAVF) SAVF(QGPL/LOG901)

© 2008 IBM Corporation IBM Systems and Technology Group Questions or ideas for improvement? 03/10/09 Contact Scott Forstie