Threshold Errors

This section contains error messages pertaining to Adaptive Server thresholds. Refer to “Managing Free Space with Thresholds” in the Adaptive Server Enterprise System Administration Guide for information about thresholds.




Error 7401

Severity

10

Message text

Could not allocate memory for the threshold task's argument list; threshold task cannot be spawned for database %d, segment %d, free space %ld.

Explanation

This error occurs when a stored procedure associated with a threshold was not initiated because there was not enough memory available in procedure cache.

Action

Although Error 7401 indicates that the threshold task did not run because not enough memory was available in procedure cache at that time, the threshold task may have run later when enough memory did become available. Before performing the following steps, determine whether the threshold task ran at a later time. If the threshold task did run, the following steps are not necessary.

To perform the threshold task that did not run because of this error:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database for which the error occurred.

  2. Run sp_helpthreshold segment_name for the segment named in the error message. This will display the stored procedure associated with the threshold.

  3. Run the stored procedure manually.

To prevent this error from occurring in the future, make sure there is enough memory to run stored procedures associated with a threshold by testing them during the time when your system is most heavily loaded. If there is not enough memory, do one of the following:

Additional information

Refer to the Performance and Tuning Guide and “Configuring Memory” in the System Administration Guide for information about Adaptive Server memory use.

Refer to “Managing Free Space with Thresholds” in the System Administration Guide for information about Adaptive Server thresholds.

Versions in which this error is raised

All versions




Error 7402

Severity

10

Message text

Could not spawn the threshold handler procedure for database %d, segment %d, when only %ld free pages were left in the segment.

Explanation

Thresholds access Adaptive Server as a detached user. This means that, although a threshold does not access Adaptive Server through the network, it still requires a user connection. Error 7402 occurs when there are no available user connections when an Adaptive Server process reaches a threshold and Adaptive Server tries to execute the associated threshold procedure.

Action

To perform the threshold task that did not run because of this error:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database for which the error occurred.

  2. Run sp_helpthreshold segment_name for the segment named in the error message. This will display the stored procedure associated with the threshold.

  3. Run the stored procedure manually.

To prevent this error from occurring in the future, use sp_configure to make sure that there are enough user connections to allow for all clients and the threshold manager. Refer to “Setting Configuration Parameters” in the Adaptive Server Enterprise System Administration Guide for information about changing the number of user connections configuration parameter.

Additional information

Refer to “Managing Free Space with Thresholds” in the System Administration Guide for information about Adaptive Server thresholds.

Versions in which this error is raised

All versions




Error 7403

Severity

10

Message text

Threshold task could not use database %d, and so cannot execute the threshold procedure for segment %d, free space %ld.

Explanation

A threshold is “owned” by the user who created it, or the last user to modify it with sp_modifythreshold (refer to sp_addthreshold and sp_modifythreshold in the Reference Manual for details). Error 7403 occurs when the Threshold Manager tries to use a database and execute a stored procedure and access is denied. The procedure is not executed.

Action

To perform the threshold task that did not run because of this error:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database for which the error occurred.

  2. Run sp_helpthreshold segment_name for the segment named in the error message. This will display the stored procedure associated with the threshold.

  3. Run the stored procedure manually using the account of the user that owns it.

    To determine the owner of the procedure and user access to the database, type:

    1> sp_help procedure_name
    2> go
    

    1> sp_helpuser database_name
    2> go
    

    1> sp_helprotect procedure_name
    2> go
    

To prevent this error from occurring in the future, make sure that the owner of each threshold has access to the database to which the threshold applies, and that the user has execute permission on the stored procedure associated with the threshold.

Versions in which this error is raised

All versions




Error 7404

Severity

10

Message text

Could not find row in systhresholds for database %.*s describing segment %d, free space %ld.

Explanation

This error can occur for either of the following reasons:

Action

Run dbcc checktable (systhresholds) and dbcc tablealloc (systhresholds) to check consistency of the system table. If you have corruption on systhresholds, contact Sybase Technical Support for further instructions.

Perform the threshold task that did not run because of this error:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database for which the error occurred.

  2. Run sp_helpthreshold segment_name for the segment named in the error message. This will display the stored procedure associated with the threshold.

  3. Run the stored procedure manually.

If the stored procedure is not found or there are incorrect entries for segment or free space, modify the row in systhresholds with sp_modifythreshold to add a stored procedure (threshold action). Refer to the Reference Manual for information about sp_modifythreshold.

Additional information

Refer to the material in this manual for errors reported by dbcc.

When calling Technical Support, have the following information available:

Versions in which this error is raised

All versions




Error 7406

Severity

16

Message text

%s: unknown option: %.*s

Explanation

lct_admin is a function used to manage the last-chance threshold (lct) on the log segment of a database. Error 7406 occurs when an invalid option is passed to lct_admin.

Action

Use one of the valid options listed below. Note that the options are all strings and require quotation marks.

Additional information

Refer to the Reference Manual for a description of valid lct_admin options for your version.

Versions in which this error is raised

All versions




Error 7407

Severity

10

Message text

Failed to execute the threshold procedure for database %d, segment %d, free space %ld.  

Explanation

This error occurs when an attempt to execute a stored procedure defined in systhresholds fails.

Action

To perform the threshold task that did not run because of this error:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database for which the error occurred.

  2. Run sp_helpthreshold segment_name for the segment named in the error message. This will display the stored procedure associated with the threshold.

  3. Run the stored procedure manually.

To determine whether you can prevent this error from occurring in the future, review the Adaptive Server error log for additional messages regarding this error. If there is specific information as to what caused the procedure to fail, take whatever steps are necessary to prevent future occurrences.

Versions in which this error is raised

All versions




Error 7408

Severity

20

Message text

Could not find a dbtable for database %d.

Explanation

Information about each database is kept in memory in a structure called a dbtable. Error 7408 occurs when an attempt to execute the built-in function lct_admin fails because the database table (database ID) information was either not available or incorrect.

Action

Verify that you have entered the correct database name (or database ID) in the threshold procedure. If it is not correct, modify the procedure.

This error can occur because the database is not open because the value of the number of open databases configuration parameter is too low. If the value for number of open databases is too low, use sp_configure to raise it.

If the database name is correct, the value of the number of open databases configuration parameter is large enough to accommodate all the system and user databases, and the command still fails with this message, check the Adaptive Server error log for messages.

To perform the threshold task that did not run because of this error:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database for which the error occurred.

  2. Run sp_helpthreshold segment_name for the segment for which the error occurred. This will display the stored procedure associated with the threshold.

  3. Run the stored procedure manually.

Versions in which this error is raised

All versions




Error 7409

Severity

20

Message text

This task tried to sleep waiting for space to become available in the log, but could not.  The current command is being aborted because no further database changes can be logged.

Explanation

The last-chance threshold has been reached in a database. All transactions trying to write to the transaction log should be put to sleep until space is free in the transaction log. Adaptive Server was unable to put the transaction to sleep, so the transaction has been aborted.

Action

Verify that the threshold action defined for the last-chance threshold has executed successfully. If it did not complete, manually execute a dump transaction command to create free space in the log. Then rerun the transaction that was aborted. If the transaction still fails, check the Adaptive Server error log for additional information.

Refer to “Managing Free Space with Thresholds” in the System Administration Guide for information about last-chance thresholds.

Versions in which this error is raised

All versions




Error 7410

Severity

26

Message text

%s: function called with invalid argument.

Explanation

This error occurs when an attempt to execute a threshold action fails because of a problem in a memory structure.

Action

If there are additional messages in the server error log that tell you which threshold was initiated, do the following steps:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database which contains the failed threshold.

  2. Determine the stored procedure that is associated with the segment for which the error occurred:

    1> sp_helpthreshold segment_name
    2> go
    

  3. Run the stored procedure manually.

If you were not able to determine which threshold was initiated by looking at the error log output, run the following curunreservedpgs query in each database to determine which threshold action did not execute properly:

1> use database_name
2> go

1> select db_name(dbid), d.name,
2> curunreservedpgs (dbid, lstart, unreservedpgs)
3> from sysuages u, sysdevices d
4> where d.low <= u.size + vstart
5> and d.high >= u.size + vstart - 1
6> and d.status &2 = 2
7> go

This query returns the database name, device name, and the number of unreserved pages for each device fragment. If you can determine which threshold was reached (compare the output of the curunreservedpgs query with the free space for the segment), execute the threshold action manually. Refer to “Transact-SQL Functions” in the Reference Manual for information about curunreservedpgs.

To prevent this error from occurring in the future, review the Adaptive Server error log and look for other messages associated with this error. There may be other errors that will tell you why the threshold failed. If more information is available, take the necessary steps to prevent the error from recurring.

Versions in which this error is raised

All versions




Error 7411

Severity

21

Message text

Table 'systhresholds' in database '%.*s' is not in its correct sort order.  Either the clustered index is missing or there is data corruption in the table.

Explanation

This error occurs when an attempt to execute a threshold action fails because of possible corruption on system table systhresholds or its clustered index.

Action

Run dbcc checktable (systhresholds) and dbcc tablealloc (systhresholds) to check consistency of the system table. If you find corruption in systhresholds, call Sybase Technical Support for further instructions.

Have the following information available when you call Sybase Technical Support:

Versions in which this error is raised

All versions




Error 7412

Severity

10

Message text

Space available in the log segment has fallen critically low in database '%.*s'.  All future modifications to this database will be %S_MSG until the log is successfully dumped and space becomes available.

Explanation

This message notifies users that the last-chance threshold has been reached. All transactions requiring access to the transaction log will either be suspended or aborted until the appropriate action is taken to clear the transaction log.

Action

  1. Ensure that the action defined by the last-chance threshold procedure was able to execute successfully. If the procedure failed for any reason, manually run dump transaction to create free space in the transaction log.

  2. Look for errors in the Adaptive Server error log to determine why the procedure failed.

  3. Restart any transactions that have been aborted.

Additional information

Refer to “Managing Free Space with Thresholds” in the System Administration Guide for information about last-chance thresholds.

Versions in which this error is raised

All versions




Error 7413

Severity

10

Message text

%d task(s) are sleeping waiting for space to become available in the log segment for database %.*s.

Explanation

This message is written to the Adaptive Server error log by the checkpoint process when the last-chance threshold has been exceeded, and the specified number of processes have been put to sleep.

Action

Ensure that the appropriate last-chance threshold action is executed to create free space in the log. If the procedure did not run for any reason, manually create free space in the transaction log with a dump transaction command and check on the cause of the failure by referring to the documentation in this manual.

Additional information

Refer to “Managing Free Space with Thresholds” in the Adaptive Server Enterprise System Administration Guide for information about last-chance thresholds.

Versions in which this error is raised

All versions




Error 7414

Severity

10

Message text

Threshold procedure '%.*s' returned an error indication (@status=%d) when called for database '%.*s', segment '%.*s', free_space %ld.

Explanation

This error occurs when a threshold procedure is activated but is not able to execute successfully.

Action

Check the Adaptive Server error log for additional information on the reason for the failure. Correct the situation that caused the failure.

Execute the procedure that failed:

  1. Select the database:

    1> use database_name
    2> go
    

    where database_name is the database which contains the failed threshold.

  2. Determine the stored procedure that is associated with the segment for which the error occurred:

    1> sp_helpthreshold segment_name
    2> go
    

  3. Run the stored procedure manually.

Versions in which this error is raised

All versions




Error 7415

Severity

10

Message text

The transaction log in database %.*s is almost full.  Your transaction is being %S_MSG until space is made available in the log.

Explanation

This error occurs when the last-chance threshold has been exceeded for the specified database. Each transaction accessing the transaction log will receive this message, indicating whether the transaction will be put to sleep or aborted until log space is available.

Action

This message does not ordinarily require action if the transaction was put to sleep and the threshold procedure frees log space. In that circumstance, the sleeping processes will awaken and continue. If the process was aborted, it will be necessary to restart it. If the process is not able to continue, determine why it cannot continue by looking at the error log and manually dump the transaction log.

Versions in which this error is raised

All versions