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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6: Connecting the <strong>Data</strong><strong>Server</strong><br />

Setting the log file location<br />

You can specify the absolute path of the log file name with –dslog startup switch to set<br />

the location of the log file. The absolute path is obtained from the $DSLOGDIR<br />

environment variable. So <strong>for</strong> example, setting $DSLOGDIR="C:\OE\Wrk\logs" and<br />

setting -dslog to mydatasrv.lg, yields the target server log file name of<br />

C:\OE\Wrk\logs\mydatasrv.lg. If $DSLOGDIR is not set and just the log file name is<br />

specified, then the log file is created in the directory where the <strong>OpenEdge</strong> session<br />

(client or agent) is started.<br />

The path <strong>for</strong> the log file name is derived in the following order of preference.<br />

1. Usage precedence is <strong>for</strong> –dslog with an absolute path name.<br />

2. On specifying –dslog with relative path then path name, the –dslog specified is<br />

relative to the $DSLOGDIR path.<br />

3. If –dslog is a relative path and no value has been specified <strong>for</strong> $DSLOGDIR, then<br />

the log file will located in the working directory where the <strong>Data</strong><strong>Server</strong> server<br />

component is started. This can be:<br />

a. The current directory where the <strong>OpenEdge</strong> client is started, if using an<br />

<strong>OpenEdge</strong> client with a self-service <strong>Data</strong><strong>Server</strong>.<br />

b. The working directory of your App<strong>Server</strong> broker instance when using a<br />

self-service <strong>Data</strong><strong>Server</strong> in the Unified Broker framework.<br />

c. The working directory of your <strong>Data</strong><strong>Server</strong> broker instance when using a<br />

client-server <strong>Data</strong><strong>Server</strong> in the Unified Broker framework.<br />

d. The current directory where you started your traditional broker using a<br />

client-server <strong>Data</strong><strong>Server</strong> with ProBroker.<br />

If neither –dslog nor $DSLOGDIR are specified, the default log file name dataserv.lg<br />

is used with the same directory path order of precedence as previously mentioned.<br />

Handling log file creation errors<br />

If creation of the <strong>Data</strong><strong>Server</strong> log file fails <strong>for</strong> any reason, an error is reported and the<br />

<strong>Data</strong><strong>Server</strong> continues to execute. If an error occurs, the <strong>Data</strong><strong>Server</strong> will derive its log<br />

file name as ds_.lg where pid is the process id of the server process. The<br />

<strong>Data</strong><strong>Server</strong> continues to write log messages to ds_.lg log file. For example, if<br />

you don’t have write privilege on the $DSLOGDIR directory, the ds_.lg file is<br />

created in the directory where the client or broker agent is started. This behavior is<br />

optionally available by default by setting environment variable $UNIQUE_DSLOG at<br />

startup.<br />

Restrictions on dynamic changes to log file<br />

When the client and server share the same log file in self-service mode, the<br />

LOG-MANAGER system handle is available to allow the log file to be managed. However,<br />

when self-service <strong>Data</strong><strong>Server</strong>s don’t share the same log file with the client, or if the<br />

<strong>Data</strong><strong>Server</strong> is run in client-server mode, the server log file is likely to exist among other<br />

servers writing to the same log simultaneously. For this reason, dynamic changes to<br />

the log file, such as renaming or closing the log file, are restricted <strong>for</strong> all server log file<br />

contexts. The one exception is the CLEAR-LOG(_) function which is allowed only if no<br />

other process than the one initiating the CLEAR-LOG(_) is writing to the log file<br />

simultaneously.<br />

246 <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>

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

Saved successfully!

Ooh no, something went wrong!