Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
By Y.P.Raju
Session logs contain information about the tasks that the Integration Service
performs during a session, plus load summary and transformation statistics. By
default, the Integration Service creates one session log for each session it runs.
If a workflow contains multiple sessions, the Integration Service creates a
separate session log for each session in the workflow. When you run a session
on a grid, the Integration Service creates one session log for each DTM process.
Use the Log Events window in the Workflow Monitor to view log events for a
session. The Log Events window displays all log events for a session. Select a
log event to view more information about the log event.
A session log file provides most of the same information as the Log Events
window for a session. The session log file does not include severity or DTM
prepare messages.
DIRECTOR> PETL_24044 The Master DTM will now connect and fetch the
prepared session from the Preparer DTM.
The session log file includes the Integration Service version and build number.
The amount of detail that logs contain depends on the tracing level that you set.
You can configure tracing levels for each transformation or for the entire session.
By default, the Integration Service uses tracing levels configured in the mapping.
Setting a tracing level for the session overrides the tracing levels configured for
each transformation in the mapping. If you select a normal tracing level or higher,
the Integration Service writes row errors into the session log, including the
transformation in which the error occurred and complete row data. If you
configure the session for row error logging, the Integration Service writes row
errors to the error log instead of the session log. If you want the Integration
Service to write dropped rows to the session log also, configure the session for
verbose data tracing.
Set the tracing level on the Config Object tab in the session properties.
You can also enter tracing levels for individual transformations in the mapping.
When you enter a tracing level in the session properties, you override tracing
levels configured for transformations in the mapping
Most recent session or workflow log. View the session or workflow log in the
Log Events window for the last run workflow.
Archived binary log files. View archived binary log files in the Log Events
window.
Archived text log files. View archived text log files in any text editor.
If you do not know the session or workflow log file name and location, check
the Log File Name and Log File Directory attributes on the Session or Workflow
1.Properties tab.
If you are running the Integration Service on UNIX and the binary log file is not
accessible on the Windows machine where the PowerCenter client is running,
you can transfer the binary log file to the Windows machine using FTP.
2.In the Workflow Monitor, click Tools > Import Log.
3.Navigate to the session or workflow log file directory.
4.Select the binary log file you want to view.
5.Click Open.
If you do not know the session or workflow log file name and location, check
the Log File Name and Log File Directory attributes on the Session or Workflow
1.Properties tab.
2.Navigate to the session or workflow log file directory.
The session and workflow log file directory contains the text log files and the
binary log files. If you archive log files, check the file date to find the latest log file
for the session.
3.Open the log file in any text editor.
By default, the Integration Service writes session events to binary log files on the
node where the service process runs. In addition, the Integration Service can
pass the session event information to an external library. In the external shared
library, you can provide the procedure for how the Integration Service writes the
log events.
When the Integration Service writes the session events, it calls the functions
specified in the Session Log Interface. The functions in the shared library you
create must match the function signatures defined in the Session Log Interface.
The Integration Service uses the shared library in the following manner:
The Integration Service loads the shared library and calls the
1.INFA_InitSessionLog() function before it logs the first event in the session.
Each time the Integration Service logs an event to the session log file, it calls
the INFA_OutputSessionLog() function to pass the message, codes, and
2.session information to the shared library.
When the session completes and the last event is logged, the Integration
3.Service calls the INFA_EndSessionLog() and then unloads the shared library.
To ensure that the shared library can be correctly called by the Integration
Service, follow the guidelines for writing the shared library.
You must implement all the functions in the Session Log Interface.
All calls from the Integration Service to the functions in the Session Log
Interface are serialized except for abnormal termination. The Integration Service
makes the calls to the functions as it logs events to the session log. Therefore,
when you implement the functions in the Session Log Interface, you do not need
to use mutex objects to ensure that only one thread executes a section of code
at a time.
When you implement the Session Log Interface in UNIX, do not perform any
signal handling within the functions. This ensures that the functions do not
interfere with the way that PowerCenter handles signals. Do not register or
unregister any signal handlers.
Since the Integration Service is a multi-threaded process, you must compile the
shared library as a multi-threaded library so that it can be loaded correctly.
The functions in the Session Log Interface do not return values. Therefore, a
session cannot fail because of an Integration Service call to a function in the
Session Log Interface.
The functions described in this section use the time structures declared in the
standard C header file time.h. The functions also assume the following
declarations:
INFA_InitSessionLog
void INFA_InitSessionLog(void ** dllContext,
const INFA_UNICHAR * sServerName,
const INFA_UNICHAR * sFolderName,
const INFA_UNICHAR * sWorkflowName,
const INFA_UNICHAR * sessionHierName[]);
INFA_OutputSessionLogMsg
void INFA_OutputSessionLogMsg(
void * dllContext,
time_t curTime,
INFA_UINT32 severity,
const INFA_UNICHAR * msgCategoryName,
INFA_UINT32 msgCode,
const INFA_UNICHAR * msg,
const INFA_UNICHAR * threadDescription);
The Integration Service calls this function each time it logs an event. The
parameters passed to the function include the different elements of the log event
message. You can use the parameters to customize the format for the log output
or to filter out messages.
INFA_OutputSessionLogFatalMsg
The Integration Service calls this function to log the last event before an
abnormal termination. The parameter msg is MBCS characters in the Integration
Service code page.
When you implement this function in UNIX, make sure that you call only
asynchronous signal safe functions from within this function.
INFA_OutputSessionLogFatalMsg has the following parameters:
INFA_EndSessionLog
The Integration Service calls this function after the last message is sent to the
session log and the session terminates normally. You can use this function to
perform clean up operations and release memory and resources.
INFA_AbnormalSessionTermination
The Integration Service calls this function after the last message is sent to the
session log and the session terminates abnormally. The Integration Service calls
this function after it calls the INFA_OutputSessionLogFatalMsg function. If the
Integration Service calls this function, then it does not call INFA_EndSessionLog.
For example, the Integration Service calls this function when the DTM aborts or
times out. In UNIX, the Integration Service calls this function when a signal
exception occurs.
Include only minimal functionality when you implement this function. In UNIX,
make sure that you call only asynchronous signal safe functions from within this
function.
Informatica provides a sample program that uses the Session Log Interface. The
sample program sends session log events to a text file called sesslog.log. You
can view the sample program to gain more understanding about how to use the
Session Log Interface to handle session log events based on your requirements.
You can also compile the sample program and build an external library to send
session log events to a text file.
The session log sample program is available when you install the PowerCenter
SDK files from the Informatica Development Platform installer. By default, the
session log sample program is installed in the following directory:
<SDKInstallationDir>/SessionLog_API/samples
Use the make files provided with the sample program demo_sesslog.cpp to build
the external library. The command to compile the library depends on the platform
on which you build it.
The following table shows the command to build the library on the different
platforms:
Use Microsoft Visual C++ 6.0 to build the sample session log library in Windows.
Open the sample program demo_sesslog.dsw in Visual C++ 6.0 and build the
project.
After you build the library, you can use it to write the output of the session log into
a file.
To use the sample external session log library, complete the following steps:
Log in to the Administration Console and select the Integration Service for
1.which you want to set up the session log file.
On the Properties tab of the Integration Service, edit the configuration
2.properties.
Set the ExportSessionLogLibName property to the path and file name of the
3.session log library you created from the session log sample program.