13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

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.

Connecting a schema holder<br />

1. Each connection to a <strong>Data</strong><strong>Server</strong> is its own entity. The DB-CONTEXT attribute enables you to provide<br />

different logging settings <strong>for</strong> each data source connection. The DB-CONTEXT attribute must be set to the<br />

logical database name or alias which is currently connected, prior to setting any other attributes. The<br />

attribute defaults to the unknown value. If DB-CONTEXT does not contain the value of a valid logical<br />

database name, any attempt to access other attributes of DSLOG-MANAGER fails.<br />

2. The value returned by the LOGFILE-NAME is the default name dataserv.lg or; the name specified by the<br />

-dslog client startup parameter <strong>for</strong> self-service clients; the name specified by the -dslog startup<br />

parameter when ProBroker is started; the name specified by the srvrDSLogFile attribute in the<br />

ubroker.properties file when a Unified Broker instance is started <strong>for</strong> <strong>Data</strong><strong>Server</strong> connections.<br />

3. The value returned by the LOG-THRESHOLD is one of the following:the name specified by the<br />

-logthreshold client startup parameter <strong>for</strong> self-service clients; the name specified by the<br />

-logthreshold startup parameter when ProBroker is started; the name specified by the<br />

srvrLogThreshold attribute in the ubroker.properties file when a Unified Broker instance is started <strong>for</strong><br />

<strong>Data</strong><strong>Server</strong> connections.<br />

4. The value returned by the NUM-LOG-FILES is one of the following: the name specified by the<br />

-numlogfiles client startup parameter <strong>for</strong> self-service clients; the name specified by the<br />

-numlogfiles startup parameter when ProBroker is started; the name specified by the<br />

srvrNumLogFiles attribute in the ubroker.properties file when a Unified Broker instance is started <strong>for</strong><br />

<strong>Data</strong><strong>Server</strong> connections.<br />

By default, the DSLOG-MANAGER uses the dataserv.lg log file. You can change the file<br />

name by using the -dslog startup parameter from the <strong>OpenEdge</strong> client or the<br />

srvrDSLogFile UBROKER property from the <strong>Data</strong><strong>Server</strong> broker instance.<br />

The following example tests <strong>for</strong> an active connection be<strong>for</strong>e setting the DSLOG-MANAGER<br />

to that connected <strong>Data</strong><strong>Server</strong> context and getting a list of log entry types and setting a<br />

specific message inside the application at runtime.<br />

IF CONNECTED(“mymss”) THEN DO:<br />

DSLOG-MANAGER:DB-CONTEXT = ‘mymss’.<br />

MESSAGE DS-LOGMANAGER:LOG-ENTRY-TYPES.<br />

DSLOG-MANAGER:WRITE-MESSAGE (“Some message after connection”).<br />

END.<br />

For more in<strong>for</strong>mation on the DSLOG-MANAGER system handle or its attributes, see the<br />

DSLOG-MANAGER system handle reference entry in <strong>OpenEdge</strong> Development: ABL<br />

Reference.<br />

Table 36 lists the function of each DSLOG-MANAGER system handle method.<br />

Table 36: DSLOG-MANAGER system handle methods<br />

Method Function<br />

CLEAR-LOG( ) Clears all messages existing in the current client log file and<br />

leaves the file open <strong>for</strong> writing<br />

WRITE-MESSAGE( ) Writes user messages to the current log file<br />

Note: The CLOSE-LOG( ) is not a supported DSLOG-MANAGER system handle method.<br />

You cannot execute the CLOSE-LOG( ) method unless there is only one<br />

brokered <strong>Data</strong><strong>Server</strong> server spawned by the Unified Broker or by ProBroker.<br />

<strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> 233

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

Saved successfully!

Ooh no, something went wrong!