Navigation:  Advantage SQL > System Procedures > Procedures >

sp_mgGetErrorLog

Advantage SQL Engine

Previous pageReturn to chapter overviewNext page

Retrieve error log entries from the ads_err.adt and/or ads_err.dbf error log files.

Syntax

sp_mgGetErrorLog();

sp_mgGetErrorLog( MaxEntries, Integer );

sp_mgGetErrorLog( MaxAdtEntries, Integer; MaxDbfEntries, Integer );

Parameters

The output parameters for this procedure are the same as the ads_err.adt error log.

Remarks

sp_mgGetErrorLog is an administrative procedure that will return the newest error entries from the error logs. This procedure may only be run on the active root dictionary and the user must be a member of the SERVER:Monitor group.

 

When this procedure is called without parameters, a default value of 25 is used for the number of entries to retrieve from both the ads_err.adt and ads_err.dbf error logs (if they both exist). The single parameter version specifies the number of entries for both error logs. And the two parameter version allows you to specify a specific number from each error log. In all cases, the newest error entries are retrieved.

 

When the request returns entries from both the ADT and DBF error logs, the ADT entries will be listed first followed by the DBF entries. Note that the entries from the DBF error log will have NULL values for the Error_Number field. Also, the individual Date and Time fields from ads_err.dbf are combined into the single DateTime field in the output.

Example

// Retrieve 10 entries from the ADT error log and 5 from the DBF error log

EXECUTE PROCEDURE sp_mgGetErrorLog(10, 5);

 

// Retrieve 5 entries from each error log and order them by DateTime

SELECT Error_Number, DateTime, Error_Code, Ads_Source, src_Line, FileName

    FROM ( EXECUTE_PROCEDURE sp_mgGetErrorLog(5, 5)) x

    ORDER BY DateTime