21.07.2013 Views

Script (.pdf file, 4 MB) - SAP MaxDB

Script (.pdf file, 4 MB) - SAP MaxDB

Script (.pdf file, 4 MB) - SAP MaxDB

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SAP</strong>® <strong>MaxDB</strong> Expert Sessions<br />

<strong>SAP</strong> <strong>MaxDB</strong> Tracing<br />

Martin Koerner, <strong>SAP</strong> AG<br />

Bettina Laidler, <strong>SAP</strong> AG<br />

June 19, 2012


Objective of this session<br />

© <strong>SAP</strong> AG 2010. All rights reserved. / Page 2<br />

Getting the answer to the following questions:<br />

What means tracing ?<br />

What is the purpose of tracing ?<br />

What kinds of traces are available ?<br />

When should I use which trace ?<br />

How can I create these traces ?


Agenda<br />

1. Introduction<br />

1.1. What is tracing all about ?<br />

1.2. Kinds of traces used in <strong>MaxDB</strong> context<br />

2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.1. At a glance<br />

2.2. Functional chain<br />

2.3. Additional functionality<br />

2.4. Using <strong>SAP</strong> <strong>MaxDB</strong> Tools for database tracing<br />

2.4.1. Database Manager CLI (DBMCLI)<br />

2.4.2. Database Manager GUI (DBMGUI)<br />

2.4.3. SQL Studio / SQLCLI<br />

2.4.4. Database Studio<br />

2.4.5. xkernprot<br />

2.5. Using <strong>SAP</strong> Transactions for database tracing<br />

2.5.1. DB50 / LC10<br />

2.5.2. DBACOCKPIT<br />

© <strong>SAP</strong> AG 2010. All rights reserved. / Page 3


Agenda<br />

3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1. SQLDBC Trace<br />

3.1.1. Using <strong>SAP</strong> <strong>MaxDB</strong> Tools for SQLDBC tracing<br />

3.1.2. Using <strong>SAP</strong> Transactions for SQLDBC tracing<br />

3.2. JDBC Trace<br />

3.3. ODBC Trace<br />

4. Additional Traces<br />

4.1. SQL Trace<br />

4.2. Developer Trace<br />

4.3. DBMRFC Trace<br />

5. Useful Information Resources<br />

© <strong>SAP</strong> AG 2010. All rights reserved. / Page 4


Agenda<br />

© <strong>SAP</strong> AG 2010. All rights reserved. / Page 5<br />

Please read the notes of the slides !


Agenda<br />

1. Introduction<br />

2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

4. Additional Traces<br />

5. Useful Information Resources


1. Introduction<br />

1.1. What is tracing all about ? [1]<br />

Software Engineering<br />

Design, Implementation, Modification<br />

Executable Software<br />

to fulfill specific requirements


1. Introduction<br />

1.1. What is tracing all about ? [2]<br />

Executable Software<br />

to fulfill specific requirements<br />

No errors<br />

Correct results<br />

Requirements fulfilled<br />

OK<br />

Verifying<br />

data input<br />

E r r o r<br />

errors or incorrect results<br />

E r r o r a n a l y s i s<br />

Analyzing<br />

log <strong>file</strong>s<br />

. . .<br />

Reproducing Tracing<br />

the error<br />

the error


1. Introduction<br />

1.1. What is tracing all about ? [3]<br />

T r a c i n g<br />

Advanced method used for error analysis<br />

Shouldn‘t be mixed up with event logging<br />

Creates trace output in a log<strong>file</strong> referring<br />

to the program flow<br />

Trace output details can be configured via<br />

certain trace levels<br />

In most cases trace output can only be<br />

analyzed by technical support staff


1. Introduction<br />

1.2. Kinds of traces used in <strong>SAP</strong> <strong>MaxDB</strong> context ? [1]<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> Database


1. Introduction<br />

1.2. Kinds of traces used in <strong>SAP</strong> <strong>MaxDB</strong> context ? [2]<br />

Database Trace (database kernel trace)<br />

SQLDBC Trace (interface trace)<br />

JDBC Trace (interface trace)<br />

ODBC Trace (interface trace)


Agenda<br />

1. Introduction<br />

2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

4. Additional Traces<br />

5. Useful Information Resources


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.1. At a glance [1]<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> Database


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.1. At a glance [2]<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

When it is indicated to use this trace?<br />

An error occurs which most likely happens in<br />

database kernel<br />

Examples: SQL error, Table / Index error<br />

Catalog error<br />

Which tools can be used to activate?<br />

<strong>SAP</strong> <strong>MaxDB</strong> Tools <strong>SAP</strong> Transactions<br />

Database Studio DB50 / LC10<br />

Database Manager GUI DBACOCKPIT<br />

SQL Studio<br />

DBMCLI<br />

SQLCLI<br />

Where is the trace log <strong>file</strong> located?<br />

binary as well as readable trace log <strong>file</strong> are<br />

located in the work directory of the database<br />

instance (parameter RUNDIRECTORY)<br />

Example: /sapdb/data/wrk/


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.2. Functional chain<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

Database Trace<br />

Enable<br />

Switches on trace<br />

writing with at least<br />

one trace activity.<br />

Trace output is<br />

generated an kept<br />

in trace buffer.<br />

5<br />

1<br />

2<br />

3<br />

4<br />

Database is in mode ADMIN or ONLINE<br />

Trace <strong>file</strong> exists in its full size and is initialized<br />

Trace <strong>file</strong> name is ‘knltrace‘ by default<br />

Trace <strong>file</strong> is located in work directory of the<br />

database<br />

Database Trace<br />

Disable<br />

Switches off trace<br />

writing. The whole<br />

trace output is still<br />

located in trace<br />

buffer.<br />

Database Trace<br />

Flush<br />

The whole trace<br />

output is written<br />

from trace buffer to<br />

<strong>file</strong> ‘knltrace‘.<br />

Database Trace<br />

Generate log<br />

<strong>file</strong> (readable)<br />

6 7 8<br />

Converts the<br />

original binary<br />

trace output of <strong>file</strong><br />

‘knltrace‘ into<br />

readable text<br />

format.


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.3. Additional functionality<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

1<br />

2<br />

3<br />

Database trace can be activated only for a specific<br />

session<br />

This is helpful to analyze a very special case (e.g. a<br />

special SQL error) as only trace output is generated<br />

which is context relevant<br />

Database trace can stop automatically in the<br />

event of a specific error<br />

This is helpful if an error always ends with a<br />

specific kernel error message. Trace writing is<br />

stopped automatically once this error occurred. It<br />

avoids that relevant trace output is overwritten<br />

again by newer trace output.<br />

In case of a database emergency shutdown the<br />

database trace is flushed automatically<br />

Even if the database trace wasn‘t switched on in<br />

case of an emergency shutdown context<br />

information can be kept and written to the trace <strong>file</strong><br />

‘knltrace‘.


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4. Using <strong>SAP</strong> <strong>MaxDB</strong> Tools for database tracing<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

Database Trace<br />

is supported by <strong>MaxDB</strong>‘s own tools:<br />

Database Manager CLI (DBMCLI)<br />

Database Manager GUI (DBMGUI)<br />

SQL Studio / SQLCLI<br />

Database Studio


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.1. Database Manager CLI (DBMCLI) [1]<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

Database Trace<br />

Enable<br />

1<br />

Database is in mode ADMIN or ONLINE<br />

DBMCLI session has been opened<br />

(this is not a mandatory requirement,<br />

commands can be executed individually<br />

without an opened session, too)<br />

Database Trace<br />

Disable<br />

Database Trace<br />

Flush<br />

trace_on default trace_flush<br />

trace_off default<br />

2<br />

3<br />

Database Trace<br />

Generate log<br />

<strong>file</strong> (readable)<br />

trace_prot abkms<br />

4


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.1. Database Manager CLI (DBMCLI) [2]<br />

1<br />

2


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.1. Database Manager CLI (DBMCLI) [3]<br />

3<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.1. Database Manager CLI (DBMCLI) [4]<br />

2<br />

2<br />

3<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [1]<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

Database Trace<br />

Enable<br />

Check<br />

Database Trace<br />

check ‘TraceDefault‘<br />

choose button<br />

‘Selected Items ON‘<br />

1<br />

Database is in mode ADMIN or ONLINE<br />

DBMGUI has been started and the <strong>MaxDB</strong><br />

instance in question has been added for<br />

administration<br />

Database Trace<br />

Disable<br />

Check<br />

Database Trace<br />

choose button<br />

‘Selected Items OFF‘<br />

2<br />

Database Trace<br />

Flush<br />

Check<br />

Database Trace<br />

choose button<br />

‘Flush‘<br />

3<br />

Database Trace<br />

Generate log<br />

<strong>file</strong> (readable)<br />

Check<br />

Database Trace<br />

Tab ‘Trace File‘<br />

choose button<br />

‘Make Protocol‘<br />

4


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

1<br />

2<br />

2.4.2. Database Manager GUI (DBMGUI) [2]


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [3]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [4]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [5]<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [6]<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [7]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [8]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.2. Database Manager GUI (DBMGUI) [9]<br />

1<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.3. SQL Studio / SQLCLI [1]<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

Database Trace<br />

Enable<br />

Database is in mode ADMIN or ONLINE<br />

SQL Studio or SQLCLI has been started and a<br />

session to the <strong>MaxDB</strong> instance in question has<br />

been opened<br />

Database Trace<br />

Disable<br />

Database Trace<br />

Flush<br />

1 3<br />

diagnose vtrace default on diagnose vtrace flush<br />

2<br />

diagnose vtrace default off<br />

Database Trace<br />

Generate log<br />

<strong>file</strong> (readable)<br />

not possible here<br />

4


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.3. SQL Studio / SQLCLI [2]<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.3. SQL Studio / SQLCLI [3]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.3. SQL Studio / SQLCLI [4]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.3. SQL Studio / SQLCLI [5]<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.4. Database Studio


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.5. xkernprot [1]<br />

2<br />

1<br />

3


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.4.5. xkernprot [2]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5. Using <strong>SAP</strong> Transactions for database tracing<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

Database Trace<br />

is supported by <strong>SAP</strong> Transactions:<br />

DB50<br />

LC10<br />

DBACOCKPIT


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.1. DB50 / LC10 [1]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.1. DB50 / LC10 [2]<br />

2<br />

1<br />

3


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.1. DB50 / LC10 [3]<br />

2<br />

1


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.1. DB50 / LC10 [4]<br />

1<br />

3<br />

4<br />

2


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.1. DB50 / LC10 [5]<br />

1 2


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.1. DB50 / LC10 [6]


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.2. DBACOCKPIT [1]


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.2. DBACOCKPIT [2]


2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

2.5.2. DBACOCKPIT [3]


Agenda<br />

1. Introduction<br />

2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

4. Additional Traces<br />

5. Useful Information Resources


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1. SQLDBC Trace [1]<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> Database


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1. SQLDBC Trace [2]<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC<br />

JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

When it is indicated to use this trace?<br />

An error occurs in the interface between application<br />

and database<br />

Examples: SQL error, Connect error, Short dump<br />

Which tools can be used to activate?<br />

<strong>SAP</strong> <strong>MaxDB</strong> Tools <strong>SAP</strong> Transactions<br />

SQLDBC_CONS DB50 / LC10<br />

DBACOCKPIT<br />

Where is the trace log <strong>file</strong> located?<br />

in the directory \wrk (Microsoft<br />

Windows) respectively<br />

/.sdb/ (UNIX/LINUX)<br />

as sqldbctrace-.prt <strong>file</strong><br />

Example: C:\sdb\globaldata\wrk\sqldbctrace-125.prt<br />

Name, location and size of the trace log <strong>file</strong> can be<br />

changed


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1. SQLDBC Trace [3]<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC<br />

JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

For which user the trace is written?<br />

The SQLDBC trace is written for the OS user<br />

who switches the trace on.<br />

On Windows the R/3 processes usually run as<br />

<strong>SAP</strong>Service. Therefore you must specify<br />

the -u option of sqldbc_cons when you activate<br />

the trace at operating system level:<br />

sqldbc_cons -u <strong>SAP</strong>Service <br />

This is not required in DB50/LC10/DBACOCKPIT<br />

since the environment of the <strong>SAP</strong>Service<br />

already exists there.


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.1. Using <strong>SAP</strong> <strong>MaxDB</strong> Tools for SQLDBC tracing<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

SQLDBC Trace<br />

is supported by <strong>MaxDB</strong>‘s own tools:<br />

SQLDBC_CONS


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.1. SQLDBC_CONS [1]<br />

sqldbc_cons [] []<br />

Description<br />

-h help; shows all options and commands<br />

-v detailed information (verbose)<br />

-p the following command is executed only for the specified<br />

process ID<br />

-f force tool execution, even if a lock <strong>file</strong> of another instance<br />

is found<br />

-u the following command is executed for the specified user


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.1. SQLDBC_CONS [2]<br />

sqldbc_cons [] []<br />

Description<br />

SHOW ALL Displays configuration and dynamic trace options<br />

CONFIG TRACE<br />

FILENAME <br />

TRACE SIZE <br />

Sets the name of the trace <strong>file</strong> name. A '%p' in the<br />

name is replaced by the process id of the application<br />

for which the trace is written.<br />

Limits the size of the trace <strong>file</strong> to bytes, at<br />

least 8192 bytes are required<br />

TRACE SQL ON|OFF Activates or deactivates the SQL trace<br />

TRACE LONG ON|OFF Activates or deactivates method argument and detail<br />

debug trace<br />

TRACE TIMESTAMP<br />

ON|OFF<br />

TRACE STOP ON ERROR<br />

|OFF [COUNT<br />

]<br />

Activates or deactivates the time stamp for each<br />

logged action<br />

Stops tracing after the error has happened<br />

times (default is 1), or switches the trace<br />

stop feature off


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.1. SQLDBC_CONS [3]<br />

1<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.1. SQLDBC_CONS [4]<br />

1<br />

3<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.1. SQLDBC_CONS [5]<br />

1<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.1. SQLDBC_CONS [6]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. Using <strong>SAP</strong> Transactions for SQLDBC tracing<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

SQLDBC Trace<br />

is supported by <strong>SAP</strong> Transactions:<br />

DB50<br />

LC10<br />

DBACOCKPIT


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DB50 / LC10 [1]


5<br />

6<br />

3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DB50 / LC10 [2]<br />

1 3<br />

4<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DB50 / LC10 [3]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DB50 / LC10 [4]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DB50 / LC10 [5]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DB50 / LC10 [6]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DB50 / LC10 [7]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.1.2. DBACOCKPIT [1]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [1]<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> Database


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [2]<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC<br />

ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

When it is indicated to use this trace?<br />

An error occurs in the Java interface between<br />

application and database<br />

Examples: Connect error, SQL error,<br />

Which tools can be used to activate?<br />

<strong>SAP</strong> <strong>MaxDB</strong> Tools <strong>SAP</strong> Transactions<br />

<strong>SAP</strong> <strong>MaxDB</strong> JDBC driver<br />

Where is the trace log <strong>file</strong> located?<br />

No fix location, can be configured<br />

Name of the trace log <strong>file</strong>s can also be changed<br />

Example: C:\ jdbctrace3945742732322446323.prt


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [3]<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC<br />

ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

For which user the trace is written?<br />

The JDBC trace is written for the OS user who<br />

activates the trace.<br />

On Windows systems the <strong>SAP</strong> R/3 processes<br />

usually run as OS user <strong>SAP</strong>Service.<br />

On UNIX systems the <strong>SAP</strong> R/3 processes<br />

usually run as OS user adm.


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [4]<br />

java –jar \runtime\jar\sapdbc.jar [] []<br />

Description<br />

-h help; shows all options and commands<br />

-V shows version of <strong>SAP</strong> <strong>MaxDB</strong> JDBC driver (attention: capital ‘v‘)<br />

-d <strong>SAP</strong> <strong>MaxDB</strong> database name<br />

-u <strong>SAP</strong> <strong>MaxDB</strong> database user<br />

-n host where the database is running on<br />

-c SQL command to be executed<br />

-a DBM command to be executed


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [5]<br />

java –jar \runtime\jar\sapdbc.jar [] []<br />

Description<br />

TRACE ON|OFF Enables|disables trace<br />

TRACE SIZE Limits the size of the trace <strong>file</strong> to bytes, at least<br />

8192 bytes are required<br />

TRACE FILENAME<br />

<br />

TRACE STOP ON ERROR<br />

|OFF<br />

SHOW<br />

[ALL|TRACESETTINGS]<br />

Sets the name of the trace <strong>file</strong>. An unique suffix to the<br />

trace <strong>file</strong> name is added.<br />

Stops trace writing after error occurred or<br />

switches the trace stop feature off<br />

Displays the current trace settings


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [6]<br />

2<br />

1<br />

3<br />

3<br />

1


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [7]<br />

1<br />

1<br />

2<br />

3


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [8]<br />

2<br />

1


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [9]<br />

1<br />

3<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.2. JDBC Trace [10]<br />

1


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC Trace [1]<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

Application<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> Database


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC Trace [2]<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

When it is indicated to use this trace?<br />

An error occurs in the interface between application<br />

and database<br />

Examples: SQL error, Connect error, HTTP error<br />

Which tools can be used to activate?<br />

<strong>SAP</strong> <strong>MaxDB</strong> Tools <strong>SAP</strong> Transactions<br />

ODBC_CONS<br />

Where is the trace log <strong>file</strong> located?<br />

in the directory \wrk (Microsoft<br />

Windows) respectively<br />

/.sdb/ (UNIX/LINUX)<br />

as odbctrace-.prt <strong>file</strong><br />

Example: C:\sdb\globaldata\wrk\odbctrace-125.prt<br />

Name, location and size of the trace log <strong>file</strong> can be<br />

changed


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC Trace [3]<br />

Application<br />

<strong>SAP</strong> or Third-Party<br />

<strong>SAP</strong> <strong>MaxDB</strong> client<br />

SQLDBC JDBC ODBC<br />

<strong>SAP</strong> <strong>MaxDB</strong> X Server<br />

<strong>SAP</strong> <strong>MaxDB</strong><br />

Database<br />

For which user the trace is written?<br />

The ODBC trace is written for the OS user<br />

who switches the trace on.


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC_CONS [1]<br />

odbc_cons [] []<br />

Description<br />

-h help; shows all options and commands<br />

-v detailed information (verbose)<br />

-p the following command is executed only for the specified<br />

process ID<br />

-f force tool execution, even if a lock <strong>file</strong> of another instance<br />

is found<br />

-u the following command is executed for the specified user


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC_CONS [2]<br />

odbc_cons [] []<br />

Description<br />

SHOW ALL Displays configuration and dynamic trace options<br />

CONFIG TRACE<br />

FILENAME <br />

TRACE SIZE <br />

Sets the name of the trace <strong>file</strong> name. A '%p' in the<br />

name is replaced by the process id of the application<br />

for which the trace is written.<br />

Limits the size of the trace <strong>file</strong> to bytes, at<br />

least 8192 bytes are required<br />

TRACE SQL ON|OFF Activates or deactivates the SQL trace<br />

TRACE LONG ON|OFF Activates or deactivates method argument and detail<br />

debug trace<br />

TRACE TIMESTAMP<br />

ON|OFF<br />

TRACE STOP ON ERROR<br />

|OFF [COUNT<br />

]<br />

Activates or deactivates the time stamp for each<br />

logged action<br />

Stops tracing after the error has happened<br />

times (default is 1), or switches the trace<br />

stop feature off


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC_CONS [3]<br />

1<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC_CONS [4]<br />

1<br />

3<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC_CONS [5]<br />

1<br />

2


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC_CONS [6]


3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

3.3. ODBC_CONS [7]


Agenda<br />

1. Introduction<br />

2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

4. Additional Traces<br />

5. Useful Information Resources


4. Additional Traces<br />

4.1. SQL Trace


4. Additional Traces<br />

4.2. Developer Trace


4. Additional Traces<br />

4.3. DBMRFC Trace [1]


4. Additional Traces<br />

4.3. DBMRFC Trace [2]


4. Additional Traces<br />

4.3. DBMRFC Trace [3]


4. Additional Traces<br />

4.3. DBMRFC Trace [4]


Agenda<br />

1. Introduction<br />

2. <strong>SAP</strong> <strong>MaxDB</strong> Database Trace<br />

3. <strong>SAP</strong> <strong>MaxDB</strong> Interface Traces<br />

4. Additional Traces<br />

5. Useful Information Resources


5. Useful Information Resources<br />

© <strong>SAP</strong> AG 2010. All rights reserved. / Page 97<br />

<strong>SAP</strong> <strong>MaxDB</strong> documentation:<br />

http://maxdb.sap.com<br />

following “Documentation” “Version 7.8”<br />

<strong>SAP</strong> notes:<br />

“Glossary” “Trace”<br />

837385 “FAQ: <strong>SAP</strong> <strong>MaxDB</strong> database trace (VTRACE)”<br />

822239 “FAQ: <strong>SAP</strong> <strong>MaxDB</strong> Interfaces”<br />

1428709 “Creating ODBC trace as of <strong>SAP</strong> <strong>MaxDB</strong> Version 7.7“<br />

903018 “<strong>SAP</strong> <strong>MaxDB</strong>: JDBC trace“<br />

<strong>SAP</strong> Community Network (SCN):<br />

http://wiki.sdn.sap.com/wiki/display/<strong>MaxDB</strong>/<strong>SAP</strong>+<strong>MaxDB</strong>+traces<br />

(<strong>SAP</strong> <strong>MaxDB</strong> traces)


Questions and Answers<br />

© <strong>SAP</strong> AG 2009. All rights reserved. / Page 98


Thank You!<br />

Bye, Bye – And Remember Next Session<br />

August 14, 2012 <strong>SAP</strong> <strong>MaxDB</strong> No-Reorganization Principle<br />

All Expert Sessions: http://maxdb.sap.com/training


Disclaimer<br />

This presentation reflects current planning.<br />

Contents may be changed<br />

without prior notice, and are in no way<br />

binding upon <strong>SAP</strong>.


© 2010 <strong>SAP</strong> AG. All Rights Reserved<br />

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of <strong>SAP</strong> AG. The information contained herein<br />

may be changed without prior notice.<br />

Some software products marketed by <strong>SAP</strong> AG and its distributors contain proprietary software components of other software vendors.<br />

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.<br />

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries,<br />

eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+,<br />

POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex,<br />

MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.<br />

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.<br />

Adobe, the Adobe logo, Acrobat, Post<strong>Script</strong>, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other<br />

countries.<br />

Oracle is a registered trademark of Oracle Corporation.<br />

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.<br />

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.<br />

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.<br />

Java is a registered trademark of Sun Microsystems, Inc.<br />

Java<strong>Script</strong> is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.<br />

<strong>SAP</strong>, R/3, <strong>SAP</strong> NetWeaver, Duet, PartnerEdge, ByDesign, Clear Enterprise, <strong>SAP</strong> BusinessObjects Explorer and other <strong>SAP</strong> products and services mentioned herein as well<br />

as their respective logos are trademarks or registered trademarks of <strong>SAP</strong> AG in Germany and other countries.<br />

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and<br />

services mentioned herein as well as their respective logos are trademarks or registered trademarks of <strong>SAP</strong> France in the United States and in other countries.<br />

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only.<br />

National product specifications may vary.<br />

The information in this document is proprietary to <strong>SAP</strong>. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the<br />

express prior written permission of <strong>SAP</strong> AG.<br />

This document is a preliminary version and not subject to your license agreement or any other agreement with <strong>SAP</strong>. This document contains only intended strategies,<br />

developments, and functionalities of the <strong>SAP</strong>® product and is not intended to be binding upon <strong>SAP</strong> to any particular course of business, product strategy, and/or<br />

development. Please note that this document is subject to change and may be changed by <strong>SAP</strong> at any time without notice.<br />

<strong>SAP</strong> assumes no responsibility for errors or omissions in this document. <strong>SAP</strong> does not warrant the accuracy or completeness of the information, text, graphics, links, or other<br />

items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of<br />

merchantability, fitness for a particular purpose, or non-infringement.<br />

<strong>SAP</strong> shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these<br />

materials. This limitation shall not apply in cases of intent or gross negligence.<br />

The statutory liability for personal injury and defective products is not affected. <strong>SAP</strong> has no control over the information that you may access through the use of hot links<br />

contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!