Академический Документы
Профессиональный Документы
Культура Документы
Error Diagnosis
Version 7.7
Heike Gursch
Overview
Analysis examples
Connection problems
DB full / log full situations
Hanger situations
Backup/restore problems
Analyzing system errors -9028 / -9026
Installation problems
Connect problems
Crash situations
Hanger situations
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite44
Installation
Call: sdbinst/sdbupd
Option –help lists valuable options.
Installation logs are written in <indepdatapath>/wrk.
...
dev logs
Precompiler Trace
SQLDBC
appldiag
xserver_<hostname>.prt
KnlMsg (knldiag)
Event Viewer
knltrace
knldump
rtedump
dbm.*
knldump
MaxDB kernel KnlMsg
Global
knltrace
memory
© SAP 2009 / MaxDB 7.7 Internals – Error Diagnosis/Page 10
SM21 – System Log
MaxDB Kernel
Profile parameter
dbs/ada/sql_trace = 0 no trace
1 short trace
2 long trace
Environment variable
SQLOPT = -F file name
-T short trace
-X long trace
-Y statement count
Irtrace
irtrace –p all –t <trace type>
irtrace –p <prozess-id> -t <trace type>
SESSION : 1;
SQLMODE : SAPR3 AT DATABASE : DB_000
SERVERDB : S10
SERVERNODE:
OPTION-CONNECT :
CONNECT "SAPR3 " IDENTIFIED BY :A SQLMODE SAPR3 ISOLATION LEVEL 0
TIMEOUT 0
SQL STATEMENT : FROM MODULE : dbslada AT LINE : 6390
START : DATE : 2001-07-13 TIME : 0013:01:01
END : DATE : 2001-07-13 TIME : 0013:01:01
sqldbc_cons
Creation and control of traces
Trace types:
SQL: SQL statements (sufficient for most analyses)
Short: method calls
Long: method calls with call parameters (most comprehensive trace)
Packet: communication packages
Example 1:
06.01 12:53:46 18286 -11205 sqlexec: system error, not enough space
06.01 12:58:25 18286 -11205 sqlexec: system error, not enough space
06.01 18:46:23 19025 -11109 database ‘S10’ is not running
07.01 11:47:37 10959 -11987 sql33_con_msl: task limit
07.01 11:47:59 12031 -11987 sql33_request: connection broken, kernel
cleared
08.02 13:11:07 18899 -11987 connection closed by communication partner
08.29 13:13:13 11199 -11987 comseg given away, assuming timeout
process ID
Example 2:
2008-01-25 10:28:55 8323 ERR -11987 COMMUNIC kernel aborted connection!
2008-01-25 10:28:55 8325 ERR -11987 COMMUNIC kernel aborted connection!
2008-02-18 10:03:13 18474 ERR -11608 COMMUNIC sql03_request: wrong connection st
ate, state is 'requested'
2008-03-17 16:00:07 26429 ERR -11987 COMMUNIC semid 206602379 disappeared!
2008-03-17 16:00:13 9231 ERR -11987 COMMUNIC semctl (setval 1084391433) error: Invalid argument
2008-03-17 16:00:13 9232 ERR -11987 COMMUNIC semctl (setval 1084391433) error: Invalid argument
2008-03-17 16:01:55 9237 ERR -11987 COMMUNIC semctl (setval 1084391433) error:
Identifier removed
2008-04-11 08:00:43 16194 ERR -11608 COMMUNIC sql03_request: wrong connection st
ate, state is 'requested'
2008-06-06 19:00:34 5216 ERR -11608 COMMUNIC sql03_request: wrong connection st
ate, state is 'requested'
Contents
Configuration values
Commands of the database kernel
Call of the backup tools
Returncodes of the backup tools and of the database kernel
Output of the backup tools
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite35
35
KnlMsg 3
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite36
36
KnlMsg 4 - protconv
protconv
–t KNLMSG
Examples:
protconv –d A1S –t KNLMSGARCHIVE –o KnlMsgArchive.prt
protconv –p /sapdb/data/wrk/A1S –t KNLMSGOLD
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite37
37
Stack Backtrace in knldiag
Under WINDOWS important messages are additionally written to the event log.
Example:
knltrace
trace_prot
ABKMNSTX A = AK vtrace
B = BD vtrace
K = KB vtrace
M = Message buffer
N = Net vtrace
<DBNAME>.prt S = Strategy
T = Time vtrace
X = SWITCH output
The file ‘knldump’ might become very huge. It contains binary data which can be
transferred to a readable form with DIAGNOSE.
Example:
Identification of the active
task (status "Running")
Detailed information
about this task
Identification of the
affected application server
If necessary, additional
information in the system
log as well as in the dev log
tell you more about the
triggering command.
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite54
54
DB50 – Access to Diagnosis Files
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite56
56
dbmcli
help
…
dbmgetf -d A1S -u control,control –k KNLMSG
dbmgetf -n p34777 -d E30 -u control,control -k DBMPRT
…
© SAP 2009 / MaxDB 7.7 Internals – Error Diagnosis/Page 60
DIAG_HISTORY
Mirroring
If data volumes are mirrored by means of the operating system or by hardware, the database
cannot influence which disk is used for reading pages. CHECK TABLE may not find any
errors.
Errors
If CHECK TABLE delivers an error, hardware problems must be solved and a backup must be
restored.
EXTENDED
Extended check of the key sequence
EXCEPT INDEX
Indexes are not checked
WITH UPDATE
Execution in DB mode ADMIN
Additional maintenance of the converter: page numbers with no references are removed.
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite65
65
Consistency Checks (3)
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite66
66
Consistency Checks (4) – Check Success
dbm.prt
2004-11-30 11:11:31 0x000009c0 0 DBM command db_execute CHECK DATA
2004-11-30 11:17:37 0x0000079c 0 DBM command db_execute CHECK TABLE
KnlMsg
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite67
67
Consistency Checks (5) – Error Situation
KnlMsg
Popup
dbm.prt
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite68
68
Consistency Checks – DBMGUI (1)
Different choices:
Extended
Except Index
With Long Check
Catalog
Right Click:
Check
Backup
Connect problems
Log full
DB full
System hanger
Restart problem
Backup-/Restore problems
System copy
I/O problems
knldiag
Error during write to a log volume
knldiag
xserver*.prt
Formatted display
in DBMGUI:
Information -> Backup
History
or
in Database Studio:
Administration ->
Backup
2nd attempt: RESTORE DATA fails, but is later successful with the identical
backup
© SAP
© SAP 2009
2008 / MaxDB
/ MaxDB 7.7 Internals
Internals – Error
Version 7.7 – Diagnosis/Page
Diagnose / Seite97
97
I/O Error: Verification of Checksum in Data Page
1. After a crash, the start procedure copies the diagnosis files to a directory. In the standard,
the parameter DiagnoseHistoryPath is set to <RUNDIRECTORY>/DIAGHISTORY. Only two
versions of these files are kept (parameter DiagnoseHistoryCount)
2. After the crash:
Try to restart the database (with vtrace switched on)
3. Check, if the error can be reproduced (with vtrace switched on)
4. Inform the support group, if the cause could not be identified – open a customer message.
Extraction of B* trees
Analysis of knldump
Command:
<instroot>/bin/x_diagnose
< instroot>/bin/x_diagnose
-u <dbm-user>,<dbm-pw> -d <SID>